Compare structured document changes
fresh402_smart_diffObserves public documents without modifying their source. Execution can charge USDC or prepaid credits, consume trial quota and update Fresh402 records. A new charge requires prior spending authorization. Without billing/trial credentials, a valid call returns an unpaid quote without executing the observation. Use Smart Diff for bounded JSON Pointer/HTML block changes and deterministic significance evidence across sessions. Requires real registered watch_id; fetches using saved rules. compare_to: previous(default) or baseline; previous_hash overrides with compatible retained same-watch evidence. json_array_keys explicitly matches unique typed identities; ambiguity fails. No cache-age option or scheduler. Missing history404; truncated/incompatible baseline409. Not complete semantic proof. Use Check for a focused changed/unchanged signal; choose the advertised Website Change Intelligence workflow for combined supported observation and comparison. change_evidence supplies bounded stable mechanical change IDs and pointers; these are not a business-impact or authenticity assessment. $0.015 USDC/call on Base (eip155:8453), including cache hits. Needs an x402-capable MCP payment client and funded native-USDC payer; ordinary MCP returns a payment challenge. Optional MPP (root mpp_payments.enabled): mppx, org.paymentauth/credential. Prepaid: X-Fresh402-API-Key plus params._meta["fresh402/prepaid"] {idempotency_key,tariff_version,max_credits}; inspect authenticated quote. Choose one billing method; never auto-pay. Persist original proof/input/private recovery token; recover originals after uncertainty. Circle only if root circle_gateway.enabled. Clients, limits and recovery: https://fresh402.com/docs#payments. Free signed trial: /v3/agent-trial requires an unfunded EOA ownership signature; human Web trial: /v2/trial. Eligibility/capacity may return429. Use only X-Fresh402-Trial-Key plus persisted Idempotency-Key; replay exact tool/input/key. Exhaustion never authorizes a charge. The same fixed x402 service price may also be paid in native Circle USDC on Solana Mainnet (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp), when advertised by the unpaid challenge. Explicitly select one accepted network and pin its mint, merchant, amount and sponsored fee payer before signing. Solana payers need no Base wallet; Standalone native Solana MPP solana/charge is also advertised; its client pays a separately authorized SOL network fee, with no server fee sponsorship. Prepaid MPP funding remains Base-only. Payment network does not change the observed chain: blockchain products still inspect finalized Base. Solana delivery requires finalized matching USDC evidence. Persist the original network, resource, input, proof and private recovery capability; never switch networks or authorize a replacement after uncertainty.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"watch_id": "<watch_id>"
},
"name": "fresh402_smart_diff"
}
}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'}]. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| hash | No | ||
| counts | No | ||
| changed | No | ||
| changes | No | ||
| warnings | No | ||
| watch_id | No | ||
| algorithm | No | ||
| final_url | No | ||
| compare_to | No | ||
| fetched_at | No | ||
| array_moves | No | ||
| content_kind | No | ||
| significance | No | ||
| previous_hash | No | ||
| change_evidence | No | fresh402-mechanical-change-index-v1: up to20 stable change IDs and original /changes list pointers, kinds and omissions. Content identifiers are neither access capabilities nor assessed business impact. | |
| html_attributes | No | ||
| json_array_keys | No | ||
| array_move_count | No | ||
| changes_truncated | No | ||
| comparison_source | No | ||
| persistence_error | No | ||
| comparison_quality | No | ||
| evidence_assessment | No | At most20 deduplicated mechanical inspection targets with explicit omissions; no inferred causality or semantic certainty. | |
| semantic_model_used | No | ||
| array_moves_truncated | No | ||
| html_attribute_rules_version | No |