Skip to main content
Glama
x402 Oracle MCP (Base USDC)

x402 Oracle MCP (Base USDC)

oracle_diagnose_402

Decode and audit a single HTTP 402 PAYMENT-REQUIRED header to validate Base USDC terms, Bazaar schema, and resource URL alignment before facilitator settlement.

Instructions

Decode and audit an HTTP 402 PAYMENT-REQUIRED header (base64 or JSON) for accepts[], Base USDC terms, extensions.bazaar schema validity, and resource.url alignment ($0.50 USDC on Base). Unpaid calls return 402 terms. Use this instead of oracle_review_mcp when debugging a single 402 payload before facilitator settlement.

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": {
      "challenge_b64_or_json": "<challenge_b64_or_json>"
    },
    "name": "oracle_diagnose_402"
  }
}

Input Schema

NameRequiredDescriptionDefault
resource_urlNoOptional canonical HTTPS URL of the protected endpoint being challenged.
challenge_b64_or_jsonYesRaw base64-encoded PAYMENT-REQUIRED header value or its decoded JSON string.

Output Schema

NameRequiredDescriptionDefault
riskNoRisk warning for malformed indexing or wasted settlement gas.
wisdomYesActionable explanation of what passed or failed in the 402 handshake.
verdictYesDiagnosis code such as challenge_shape_ok, missing_bazaar_extension, or missing_accepts.
citationsNoCoinbase CDP validate and Bazaar doc links.
implementation_promptNoStep-by-step repair instructions for the challenged endpoint.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / challenge_b64_or_json / description
      Added value: +"Raw base64-encoded PAYMENT-REQUIRED header value or its decoded JSON string."
    • addedInput schema / properties / challenge_b64_or_json / minLength
      Added value: +1
    • addedInput schema / properties / resource_url / description
      Added value: +"Optional canonical HTTPS URL of the protected endpoint being challenged."
    • addedInput schema / properties / resource_url / format
      Added value: +"uri"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "citations": {
      +      "description": "Coinbase CDP validate and Bazaar doc links.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "implementation_prompt": {
      +      "description": "Step-by-step repair instructions for the challenged endpoint.",
      +      "type": "string"
      +    },
      +    "risk": {
      +      "description": "Risk warning for malformed indexing or wasted settlement gas.",
      +      "type": "string"
      +    },
      +    "verdict": {
      +      "description": "Diagnosis code such as challenge_shape_ok, missing_bazaar_extension, or missing_accepts.",
      +      "type": "string"
      +    },
      +    "wisdom": {
      +      "description": "Actionable explanation of what passed or failed in the 402 handshake.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "verdict",
      +    "wisdom"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations it discloses that unpaid calls return 402 terms and that the audit covers specific structural checks, which is real behavioral context. It does not explain the tension between 'decode and audit' and readOnlyHint=false/openWorldHint=true — an agent cannot tell whether a network fetch of resource.url or a paid call occurs. Not a contradiction, but a gap worth closing.

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

Conciseness4/5

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

Three sentences, front-loaded with the verb and the audit targets before the sibling routing. Dense with domain jargon ('extensions.bazaar schema validity', 'facilitator settlement') but each clause carries information; minor tightening possible in the parenthetical '$0.50 USDC on Base'.

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?

An output schema exists, so return shape needn't be described, and the description covers inputs, checks performed, and sibling routing for a 2-parameter diagnostic. The remaining omission is whether the tool performs live network/payment operations, which matters given readOnlyHint=false and openWorldHint=true.

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 both parameters are already documented. The description adds only marginal meaning — that the header may be raw base64 or decoded JSON, and that resource.url is checked for alignment — which largely restates the schema. Baseline 3 applies.

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?

Specific verb+resource: 'Decode and audit an HTTP 402 PAYMENT-REQUIRED header (base64 or JSON)', followed by an enumeration of exactly what is validated (accepts[], Base USDC terms, extensions.bazaar schema validity, resource.url alignment). An agent can tell this apart from oracle_review_mcp or oracle_pricing without opening any 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?

Explicitly routes the agent: 'Use this instead of oracle_review_mcp when debugging a single 402 payload before facilitator settlement' names both the alternative and the selecting condition (single payload, pre-settlement debug). It also notes unpaid calls return 402 terms, clarifying the operating context.

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