Define a watchlist of product identifiers (URLs, SKUs, or feed item IDs) and store them with their last-known price and availability in a persistent store (database or KV store).
Schedule periodic fetch jobs at an interval appropriate to the merchant's update cadence (e.g., every 15–60 minutes); use conditional GET requests with If-None-Match or If-Modified-Since headers to minimize bandwidth.
After each fetch, diff the new price and availability values against the stored snapshot; compute percentage price change and flag transitions in availability (InStock → OutOfStock and vice versa).
Emit structured change events (product_id, field_changed, old_value, new_value, detected_at) to a queue or webhook for downstream consumers such as a purchasing agent or notification service.
Implement exponential backoff and circuit-breaker logic: if a merchant endpoint returns repeated errors, reduce polling frequency and alert rather than hammering the server.
Persist a rolling history of price points with timestamps to support price trend analysis and price-protection claim lookups.
Known gotchas
Price changes caused by temporary flash sales or personalized pricing can trigger false positives; include a confirmation re-fetch after a short delay before acting on a price drop.
Some merchants serve different prices to different user agents or based on cookies; ensure your fetcher uses consistent headers and sessions to get comparable data across runs.
Monitoring too aggressively can get your agent's IP blocked; rate-limit requests, distribute across time, and respect Retry-After headers.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp