Skip to main content
Glama

fresh402_check

Check whether public HTML, JSON or text changed; optional html_attributes on a new URL watch detects same-text link and selected attribute changes without altering older watches; use for on-demand freshness checks and a compact deterministic text diff, not background monitoring. Supply exactly one of url or watch_id. A URL-based paid Check can create a watch; an ID reuses its saved URL/rules, so omit all content-rule fields. Reuse returned watch_id/hash for later checks; first URL check without prior state reports changed:null. Optional cache reuse still costs $0.005 USDC per call on Base mainnet (eip155:8453). Requires an x402-capable MCP payment client and funded native-USDC payer; an ordinary MCP client receives a payment challenge, not a paid result. 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. No JavaScript execution. 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

NameRequiredDescriptionDefault
urlNoSupply exactly one of url or watch_id. URL must be absolute public HTTPS on port 443, at most 4096 characters, with no credentials/private targets, e.g. 'https://example.com/docs'. Fresh402's own service URLs, including its discovery /openapi.json, cannot be targets; choose an external public document. With url, optional content rules identify the watch; an existing watch is reused or a new one is created by this paid Check. Separate registration is not required. No JavaScript rendering.
selectorNoOptional HTML CSS scope, 1-256 characters, e.g. 'main'; accepted only with url. Omit for the page after built-in noise removal. No match returns 422; not supported for JSON/plain text. With watch_id, omit this field: the saved selector is reused.
watch_idNoSupply exactly one of watch_id or url. An existing ID returned by fresh402_register (free), POST /v1/register, or a URL-based Check: 'w_' followed by 32 lowercase hexadecimal characters. Reuses that watch's stored URL and rules. When supplied, omit selector, ignore_selectors and ignore_json_paths entirely, even empty arrays. Do not invent an ID.
include_diffNoOptional boolean; runtime default: true. Request a compact deterministic text diff when content changed and compatible prior text is retained. False omits the diff; true cannot recover unavailable old content and does not enable Smart Diff's structural analysis.
previous_hashNoOptional previous Fresh402 content hash: exactly 64 hexadecimal characters, case-insensitive. Overrides comparison with the watch's current stored hash. Omit to use that stored hash; a new URL watch without a prior hash returns changed:null. Hash comparison does not require retained old text, but a text diff does; a hash cannot reconstruct missing content.
html_attributesNoOptional HTML-only watch rule: up to4 of href,title,alt,aria-label; default[] retains existing text-only normalization. Distinct names are sorted; nonempty rules create a separate version1 watch/baseline. Records bounded meaningful attributes within the saved selector or filtered page, including same-text link destination changes. Cannot be supplied with watch_id, even[]. Unsafe hrefs are hashed, never fetched. Limits:200 elements,2048 characters/value,32768 evidence bytes; excess fails, never clips silently.
max_age_secondsNoOptional integer cache age in seconds, 0-86400; runtime default: 0. A positive value permits reuse of a sufficiently recent watch result without fetching. Zero contacts the source (conditional HTTP may return 304). Cached Checks still require payment; this does not schedule background polling.
ignore_selectorsNoOptional HTML-only exclusion array, up to 20 supported CSS selectors of 1-256 characters each, e.g. ['.timestamp']. Accepted only with url; default []. With watch_id, omit the field entirely (including []): saved exclusions are reused.
ignore_json_pathsNoOptional JSON-only exclusions, up to 20 paths of 1-256 characters starting with '/'; '~0'/'~1' escapes and '*' segments are supported. Example: ['/updated_at']. Accepted only with url; default []. With watch_id, omit entirely (including []): saved paths are reused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / html_attributes
      Added value: +{
      +  "description": "Optional HTML-only watch rule: up to4 of href,title,alt,aria-label; default[] retains existing text-only normalization. Distinct names are sorted; nonempty rules create a separate version1 watch/baseline. Records bounded meaningful attributes within the saved selector or filtered page, including same-text link destination changes. Cannot be supplied with watch_id, even[]. Unsafe hrefs are hashed, never fetched. Limits:200 elements,2048 characters/value,32768 evidence bytes; excess fails, never clips silently.",
      +  "items": {
      +    "description": "One explicitly observed HTML attribute: href (a/area only),title,alt or aria-label. No class/style/event attributes; links are inert evidence and never fetched.",
      +    "enum": [
      +      "alt",
      +      "aria-label",
      +      "href",
      +      "title"
      +    ],
      +    "type": "string"
      +  },
      +  "maxItems": 4,
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • addedInput schema / oneOf
      Added value: +[
      +  {
      +    "required": [
      +      "url"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "watch_id"
      +    ]
      +  }
      +]
  3. Changed1 schema field changed
    • changedInput schema / properties / url / description
      Previous value: -"Supply exactly one of url or watch_id. URL must be absolute public HTTPS on port 443, at most 4096 characters, with no credentials/private targets, e.g. 'https://example.com/docs'. With url, optional content rules identify the watch; an existing watch is reused or a new one is created by this paid Check. Separate registration is not required. No JavaScript rendering."New value: +"Supply exactly one of url or watch_id. URL must be absolute public HTTPS on port 443, at most 4096 characters, with no credentials/private targets, e.g. 'https://example.com/docs'. Fresh402's own service URLs, including its discovery /openapi.json, cannot be targets; choose an external public document. With url, optional content rules identify the watch; an existing watch is reused or a new one is created by this paid Check. Separate registration is not required. No JavaScript rendering."
  4. Changed12 schema fields changed
    • addedInput schema / description
      Added value: +"Paid Check input: exactly one of url or watch_id is required. Content rules are allowed only on the url path; watch_id always reuses saved rules. Optional previous_hash overrides the reference hash; max_age_seconds controls cache reuse and include_diff controls text-diff output."
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "include_diff": true,
      +    "max_age_seconds": 0,
      +    "selector": "main",
      +    "url": "https://example.com/docs"
      +  }
      +]
    • addedInput schema / properties / ignore_json_paths / description
      Added value: +"Optional JSON-only exclusions, up to 20 paths of 1-256 characters starting with '/'; '~0'/'~1' escapes and '*' segments are supported. Example: ['/updated_at']. Accepted only with url; default []. With watch_id, omit entirely (including []): saved paths are reused."
    • addedInput schema / properties / ignore_json_paths / items / description
      Added value: +"JSON Pointer-style path, 1-256 characters, starting with '/'. Decode '~0' as '~' and '~1' as '/'; '*' matches all object keys or array elements. Example: '/items/*/updated_at'."
    • addedInput schema / properties / ignore_selectors / description
      Added value: +"Optional HTML-only exclusion array, up to 20 supported CSS selectors of 1-256 characters each, e.g. ['.timestamp']. Accepted only with url; default []. With watch_id, omit the field entirely (including []): saved exclusions are reused."
    • addedInput schema / properties / ignore_selectors / items / description
      Added value: +"HTML element(s) to remove before normalization: a supported CSS selector, 1-256 characters, e.g. '.timestamp' or 'nav'."
    • addedInput schema / properties / include_diff / description
      Added value: +"Optional boolean; runtime default: true. Request a compact deterministic text diff when content changed and compatible prior text is retained. False omits the diff; true cannot recover unavailable old content and does not enable Smart Diff's structural analysis."
    • addedInput schema / properties / max_age_seconds / description
      Added value: +"Optional integer cache age in seconds, 0-86400; runtime default: 0. A positive value permits reuse of a sufficiently recent watch result without fetching. Zero contacts the source (conditional HTTP may return 304). Cached Checks still require payment; this does not schedule background polling."
    • addedInput schema / properties / previous_hash / description
      Added value: +"Optional previous Fresh402 content hash: exactly 64 hexadecimal characters, case-insensitive. Overrides comparison with the watch's current stored hash. Omit to use that stored hash; a new URL watch without a prior hash returns changed:null. Hash comparison does not require retained old text, but a text diff does; a hash cannot reconstruct missing content."
    • addedInput schema / properties / selector / description
      Added value: +"Optional HTML CSS scope, 1-256 characters, e.g. 'main'; accepted only with url. Omit for the page after built-in noise removal. No match returns 422; not supported for JSON/plain text. With watch_id, omit this field: the saved selector is reused."
    • addedInput schema / properties / url / description
      Added value: +"Supply exactly one of url or watch_id. URL must be absolute public HTTPS on port 443, at most 4096 characters, with no credentials/private targets, e.g. 'https://example.com/docs'. With url, optional content rules identify the watch; an existing watch is reused or a new one is created by this paid Check. Separate registration is not required. No JavaScript rendering."
    • addedInput schema / properties / watch_id / description
      Added value: +"Supply exactly one of watch_id or url. An existing ID returned by fresh402_register (free), POST /v1/register, or a URL-based Check: 'w_' followed by 32 lowercase hexadecimal characters. Reuses that watch's stored URL and rules. When supplied, omit selector, ignore_selectors and ignore_json_paths entirely, even empty arrays. Do not invent an ID."
  5. Changed2 schema fields changed
    • addedInput schema / properties / ignore_json_paths / items / pattern
      Added value: +"^\\/"
    • addedInput schema / properties / url / maxLength
      Added value: +4096
  6. First observed

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description carries the full behavioral burden: it discloses the $0.005 USDC cost, x402 payment challenge behavior, no JavaScript execution, cache reuse still costing money, first URL check without prior state returning changed:null, 409 pending-batch replay, and trial-capacity 429s. It also states that exhaustion never authorizes a charge and that ordinary requests retain the paid challenge.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core check semantics are front-loaded, but the description is a dense wall of text dominated by payment protocol routing, MPP receipt metadata, Circle Gateway recovery tokens, and trial enrollment details. Those details may be operationally relevant, yet they are repeated and interleaved rather than structured, so many sentences do not earn their place for simple tool selection and invocation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex paid tool with no output schema, the description is unusually complete: it covers payment prerequisites, cache behavior, first-check changed:null, watch reuse, no-JS execution, and key error states. It does not fully describe the result payload shape beyond changed:null and the compact diff, which keeps it from a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description usefully reinforces the exactly-one-of url/watch_id rule and the rule that content fields are omitted with watch_id, but it does not add syntax or format meaning beyond what the schema already documents for selector, previous_hash, html_attributes, ignore_selectors, and ignore_json_paths.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence states a specific verb and resource: check whether public HTML, JSON, or text changed, with optional same-text link/attribute detection. It also scopes the tool as an on-demand freshness check with a compact diff, not background monitoring, and later names fresh402_register as the free watch-registration path. An agent can distinguish it from siblings without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says to supply exactly one of url or watch_id, to omit all content-rule fields when watch_id is used, and to reuse returned watch_id/hash for later checks. It contrasts on-demand checks with background monitoring and names alternative payment routes (prepaid credits, MPP, Circle Gateway, free trial) with the condition for each. When-to-use and when-not-to-use are both present.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources