fresh402_openapi_contract_diff
Detect bounded directional compatibility evidence in a public JSON OpenAPI3.0/3.1 contract: paths/methods, required fields, supported scalar type/enum/null domains, and effective authentication alternatives/scopes. Request acceptance and response guarantees have opposite compatibility directions. Complex schema composition, custom dialects, ambiguous visibility and unexpanded references remain review/unknown; no general satisfiability or compatibility proof. Use for API contract review; Smart Diff is for general documents. First register the contract URL with free fresh402_register, without selectors or ignore rules, then reuse watch_id. compare_to accepts previous (default) or baseline; an available same-watch previous_hash overrides it. Limits include 256000 decoded document bytes, 100 paths and 500 operations. No YAML, external reference fetching, API-operation execution, LLM or complete compatibility guarantee. $0.020 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. Obtain it with free fresh402_register or POST /v1/register using the public JSON OpenAPI 3.0/3.1 URL and no selector or ignore rules. Reuses the saved URL; do not pass url here. YAML, non-OpenAPI documents and scoped/filtered watches are unsupported. Illustrative IDs must be replaced. | |
| compare_to | No | Optional mode: 'previous' (default) compares with the latest saved OpenAPI Contract Diff snapshot; 'baseline' uses its fixed saved baseline. Before contract history exists, the current registered watch state seeds the initial baseline. previous_hash overrides the mode. 'hash' appears only in results, not as an accepted input mode. | previous |
| previous_hash | No | Optional 64-character hexadecimal reference hash, case-insensitive. Prefer a hash returned by OpenAPI Contract Diff for this same watch, matching a retained contract snapshot or fixed baseline. The current registered core hash is also accepted as a fallback: without a matching contract snapshot, the fixed baseline (or registered state if no baseline exists) is used. Overrides compare_to; unavailable hashes return 404. Omit to use the selected mode. |