Search for a product across multiple retailers in parallel, save pricing data to disk, and produce an HTML report with the best deals and direct product links. Use when the user asks to compare prices, find the best deal, or check prices across stores.
Search for a product across retailers in parallel using a hidden window, save pricing data incrementally to disk, and deliver a clean HTML comparison report with direct links to every product page.
Activate when the user asks to compare prices for a product, find the cheapest option, check if a price is good, or shop across multiple stores.
Confirm with the user before searching:
| Step | Tool | Detail |
|---|---|---|
| Create output directory | evaluate_script |
Create compare-<product-slug>/ in your working directory with a raw/ subfolder |
| Open hidden window | create_hidden_window | Dedicated workspace — keeps the user's browsing undisturbed |
| Open parallel tabs | new_hidden_page | Open up to 10 tabs concurrently, one per retailer/search |
Default search targets (adjust based on product type and user's region):
| Tab | Target |
|---|---|
| 1 | Google Shopping — https://www.google.com/search?tbm=shop&q=<product> |
| 2 | Amazon — https://www.amazon.com/s?k=<product> |
| 3 | Walmart — https://www.walmart.com/search?q=<product> |
| 4 | Best Buy — https://www.bestbuy.com/site/searchpage.jsp?st=<product> |
| 5 | Target — https://www.target.com/s?searchTerm=<product> |
| 6 | eBay — https://www.ebay.com/sch/i.html?_nkw=<product> |
| 7–10 | Additional retailers relevant to the product category (Newegg for tech, Home Depot for tools, etc.) |
For each tab, extract pricing data and save immediately:
| Step | Tool | Detail |
|---|---|---|
| Navigate | navigate_page | Go to the search URL |
| Read results | get_page_content | Extract the search results page as markdown |
| Find best match | navigate_page | Click through to the most relevant product listing |
| Extract pricing | get_page_content | Pull the product page content — price, availability, shipping, seller |
| Save raw data | evaluate_script | Write to raw/<retailer>.json with all extracted fields (see format below) |
| Close tab | close_page | Free the tab after saving |
Never hold all retailer data in memory. Save each retailer's data to its own file immediately after extraction.
raw/<retailer>.json){
"retailer": "Amazon",
"product_name": "Product Title as Listed",
"product_url": "https://www.amazon.com/dp/...",
"price": 299.99,
"original_price": 349.99,
"currency": "USD",
"shipping": "Free",
"availability": "In Stock",
"seller": "Amazon.com",
"condition": "New",
"rating": "4.5/5",
"notes": "Prime eligible",
"extracted_at": "2025-03-11T10:30:00Z"
}
After all retailers are processed, read the saved raw/*.json files and generate a self-contained report.html:
| Requirement | Detail |
|---|---|
| Theme | Light background (#ffffff), clean sans-serif typography, generous whitespace |
| Header | Product name, search date, number of retailers checked |
| Best Deal banner | Highlighted card at the top showing the lowest total price with a direct link to the product page |
| Comparison table | All retailers sorted by total price (lowest first) with columns: Retailer, Price, Shipping, Total, Stock, Seller, Rating, Link |
| Product links | Every retailer name and a "View Deal" button must be a clickable <a href> linking to the actual product page URL |
| Price highlights | Lowest price in green, highest in muted gray. Show discount percentage if original price differs. |
| Self-contained | All styles in a <style> block — no external CSS or JS |
| Responsive | Readable on desktop and mobile |
| Footer | "Generated by Orion Compare Prices" with date |
Use evaluate_script to write report.html to the output directory.
| Step | Tool | Detail |
|---|---|---|
| Close hidden window | close_window | Clean up the research workspace |
| Open report | new_page | Open file://<path>/report.html in the user's active window |
| Notify user | — | Tell the user the comparison is complete, highlight the best deal, and provide the report path |
| Category | Tools Used |
|---|---|
| Window management | create_hidden_window, close_window |
| Tab management | new_hidden_page, close_page, new_page |
| Navigation | navigate_page |
| Content extraction | get_page_content |
| Data & file I/O | evaluate_script |