fresh402_smart_diff
Explain structured changes in a registered public document: JSON Pointer changes, HTML block changes and deterministic significance hints. Use instead of Check when a changed/unchanged flag or short text diff is insufficient. First obtain watch_id with free fresh402_register; saved URL/rules are reused. compare_to is previous (default) or baseline; previous_hash overrides it when the same-watch snapshot is retained. Up to200 content changes; explicit json_array_keys match unique typed item identities and report moves separately, with pure reorder unchanged and source hashes still order-sensitive. Saved html_attributes rules compare selected links/attributes independently of visible text. Omit new options for existing index/text behavior. Legacy HTML may have text-only fidelity. No LLM, JavaScript rendering or complete API compatibility guarantee. $0.015 USDC per call on Base mainnet (eip155:8453); requires an x402-capable MCP payment client and funded native-USDC payer, otherwise returns a payment challenge. Alternatively use prepaid credits through REST or this MCP tool: X-Fresh402-API-Key in HTTP, with params._meta["fresh402/prepaid"] containing idempotency_key, tariff_version and max_credits. When root mpp_payments.enabled is true, native MPP EVM charge is another option at the same USDC price: use an authorized Base EIP-712 signer and official mppx client, org.paymentauth/credential metadata and a persisted private recovery token. MPP receipt: org.paymentauth/receipt; see docs/MPP.md. Never combine MPP, prepaid and x402. Discover packages at /v2/prepaid/plans; see docs/AGENT_PREPAID.md for browserless wallet enrollment, bounded early credits and recovery. Optional Circle Gateway x402 is available only when root circle_gateway.enabled is true. Use the GatewayWalletBatched quote, a funded Base Gateway EOA and a persisted private recovery token. Pending batches return 409; replay the original proof/input/token after 60 seconds. Results require Gateway confirmed/completed evidence; never mix providers. No Circle prepaid funding. See docs/CIRCLE_GATEWAY.md. Optional free evaluation: inspect GET /v3/agent-trial for the CAPTCHA-free machine trial (unfunded EOA ownership signing required). Web tools may also use the separate human trial at /v2/trial. Only enabled, eligible allowances authorize free execution; shared capacity can return 429 earlier. Send X-Fresh402-Trial-Key and a distinct persisted Idempotency-Key per logical REST or MCP call. Reuse the same tool/input/key for retained recovery. Never mix trial and payment/prepaid credentials. Exhaustion never authorizes a charge; ordinary requests without trial credentials retain the paid challenge.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| watch_id | Yes | Required existing watch ID: 'w_' plus 32 lowercase hexadecimal characters, returned by free fresh402_register or POST /v1/register (a URL-based Check can also create it). Reuses the saved public URL and content rules; do not pass url or new rules here. Replace illustrative IDs with a real returned ID before paying. | |
| compare_to | No | Optional comparison mode: 'previous' (default) uses the latest Smart Diff snapshot, falling back to the current registered watch state on the first call. 'baseline' uses the fixed Smart Diff baseline, initially seeded from the earliest retained compatible watch snapshot. previous_hash overrides either mode. 'hash' is a result label, not an accepted input value. | previous |
| previous_hash | No | Optional explicit reference hash: 64 hexadecimal characters, case-insensitive, from this same watch's retained Smart Diff snapshot, fixed baseline or retained registration/Check snapshot. Overrides compare_to. Unknown or pruned hashes return 404; recent snapshot history is limited to 20 per store, with the fixed Smart Diff baseline retained separately. Omit for the selected mode. | |
| json_array_keys | No | Optional1-4 explicit nonoverlapping JSON array identity rules, JSON only. Omit for existing index comparison. Matches unique typed scalar keys, reports moves separately from content changes; pure reorder is changed:false while source hashes remain order-sensitive. At most2000 combined array items/20000 comparison work units, no fallback for ambiguity. Rules affect this comparison only, not the watch/hash; persist identical input for payment recovery. Example:[{path:'/items',key:'/id'}]. |