Skip to main content
Glama

Check a 402 quote against what you expected before you sign it (paid, x402)

check_counterparty

PAID: grade an x402 challenge you are about to sign against what you expected -- payee, resource, network, asset and price -- and get back a verdict, score and reasons in the same response the payment settles. Pass the accepts[] entry you already hold: we never re-fetch the seller, because a second fetch would grade a different response than the one you are about to pay for. A missing or hostile field inside the quote is a FINDING in the answer, never a refusal. Call it once without payment to receive the price as an x402 PaymentRequired (Base USDC, and Solana USDC where offered); call it again with a signed payment in _meta['x402/payment'] to complete it. The receipt comes back in _meta['x402/payment-response']. No account, no API key. Complaints, questions, quote requests, or a service you wish we had: POST /feedback on this host -- free, no account. Every report is read and analysed daily; there is no individual reply.

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": {
      "quote": "<quote>",
      "claim": "<claim>"
    },
    "name": "check_counterparty"
  }
}

Input Schema

NameRequiredDescriptionDefault
claimYesWhat you believed before you asked: the URL you requested, and optionally the payee, network, asset and ceiling you agreed to.
quoteYesOne accepts[] entry out of the 402 you received, verbatim. Every field optional: an absent one is a finding.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations, it explains that the call is paid, describes the two-call x402 handshake, states where the receipt appears in _meta['x402/payment-response'], and confirms no account or API key is needed. It also discloses the unusual behavior that a missing or hostile field becomes a FINDING instead of a refusal, and that the seller is never re-fetched. This is exactly the behavioral detail annotations cannot carry.

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?

The purpose and the payment handshake come first, and the sentences are dense with information. The closing feedback/complaints paragraph is service boilerplate that does not help an agent choose or invoke the tool, which is the main source of bloat.

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?

For a paid, nested-object tool with no output schema, the description covers the payment flow, the required inputs, the return content (verdict, score, reasons), the receipt location, and the no-auth model. Nothing an agent needs in order to call it correctly is missing.

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 the baseline is 3. The description still adds real meaning: the quote must be the verbatim accepts[] entry and why (a second fetch would grade a different response), and the claim is 'what you believed before you asked'. It also lists the dimensions being compared, which helps map claim fields to quote fields.

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?

The description names a concrete verb and resource: grade an x402 challenge before signing, checking payee, resource, network, asset and price, and returning a verdict, score and reasons. That is far more specific than a restatement of the name. It does not differentiate itself from similar siblings such as x402_verify or x402_supported, so it falls short of a 5.

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?

It gives clear operating guidance: pass the accepts[] entry you already hold, never re-fetch the seller, call once to get the price and again with a signed payment. The context (before you sign a 402 quote) is explicit. It never states when to choose a different sibling tool, such as x402_verify instead, so it is not a 5.

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