Skip to main content
Glama

inspect_402

Reads an x402 402 challenge before payment, returning price, token, network, payee, bound resource, and a PASS/CAUTION/BLOCK verdict with reasons and a receipt; read-only.

Instructions

Read an x402 402 challenge BEFORE paying it. Pass a public endpoint URL (or the challenge you already have) and get back the price, token, network, payee, the bound resource, and a PASS / CAUTION / BLOCK verdict with typed reasons and a receipt. Use this when an agent is about to pay a server you do not control. The service fetches the challenge once, read-only: it never signs, pays, or settles. A recognized dollar stable (USDC, USDT, DAI, USDG) is named; a volatile asset gets a caution because it cannot be priced in USD. Free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "inspect_402"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPublic http(s) endpoint that answers with an x402 402 challenge. Only public hosts are fetched; localhost and private ranges are refused.
headerNoThe base64 PAYMENT-REQUIRED header value. Makes no request.
methodNoHTTP method for the probe (default GET). A POST sends an empty {} body.
targetNoThe URL the challenge belongs to. Binds the challenge's resource so the verdict can check it.
challengeNoA 402 challenge you already have. Makes no request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full load, and it does disclose the key safety traits: the fetch is read-only, single-shot, never signs/pays/settles, and is free. It omits rate limits, latency, and failure modes when a non-402 response comes back, which matters for a pre-payment check an agent must rely on.

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?

Front-loaded with the action and the pre-payment timing caveat, then safety, then cost. Dense but nearly every clause carries information; the stablecoin-naming sentence is slightly more detail than needed for a selection decision.

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

Completeness5/5

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

There is no output schema, yet the description names the returned fields, the verdict taxonomy (PASS/CAUTION/BLOCK), typed reasons, and a receipt, so an agent knows what to expect. Inputs, safety profile, and cost are all covered for a moderately complex tool.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3; the description adds the useful disambiguation that url triggers a fetch while header/challenge 'makes no request,' complementing the schema. It says nothing about method or target beyond what the schema already documents.

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

Purpose4/5

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

States a specific verb and resource ('Read an x402 402 challenge BEFORE paying it') and enumerates the returned fields (price, token, network, payee, bound resource, verdict). It never names or contrasts the sibling tools (directory_402, preflight_gate), so an agent cannot tell from this text alone how it differs from preflight_gate.

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

Usage Guidelines4/5

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

Gives a clear triggering condition: 'Use this when an agent is about to pay a server you do not control,' plus the two input modes (probe a URL or pass an existing challenge/header). It stops short of when-not-to-use guidance or explicit routing to the sibling tools.

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