Skip to main content
Glama

Inspect an x402 endpoint (price + requirements, no payment)

inspect_endpoint
Read-only

Fetch an x402 endpoint's 402 payment requirements without paying: accepted schemes, networks, assets, prices, and pay-to addresses. For free endpoints, return the result; check cost before paying.

Instructions

Fetch an x402 endpoint and return its 402 payment requirements — every accepted scheme, network, asset, price and pay-to address — WITHOUT paying. If the endpoint is free, returns its result instead. No signer required. Use this to learn the cost before pay_and_call.

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": {
      "url": "<url>"
    },
    "name": "inspect_endpoint"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe x402 endpoint URL to inspect.
bodyNoJSON body for a POST probe.
methodNoHTTP method to probe with.GET

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.3
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / body / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds genuinely non-derivable traits: no signer required, no payment is made, and free endpoints return their result instead of requirements. That last behavior is important and not inferable from any structured field.

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

Conciseness5/5

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

Three tight sentences; the scope and no-payment guarantee are front-loaded, then the free-endpoint fallback, then the sibling routing. Nothing is repeated and nothing is filler.

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, and the description compensates by listing the fields returned (scheme, network, asset, price, pay-to) plus the alternate free-endpoint return. Combined with annotations covering the safety profile, an agent has enough to call it correctly and interpret results.

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 url, body and method are already documented, including the POST-probe purpose of body and the GET default. The description adds no syntax, format or constraint information about any parameter, so 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?

Names a specific verb (fetch/inspect) and resource (x402 endpoint's 402 payment requirements) and enumerates exactly what comes back: scheme, network, asset, price, pay-to address. The 'WITHOUT paying' clause separates it cleanly from pay_and_call.

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?

Explicitly routes the agent: 'Use this to learn the cost before pay_and_call.' Also covers the free-endpoint case, which is a usage branch an agent would otherwise guess at. No explicit when-not-to-use case (e.g. already-known prices or non-x402 URLs), so it stops short of a 5.

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