Skip to main content
Glama

Will agents' payments go through?

check_payment_setup
Read-only

Call this after building or changing a paid (x402) endpoint, or when agents' payments fail: we call it unpaid like a paying agent, read the 402, and check the payment request parses (v1 or v2), the token's EIP-712 domain (extra.name/version) matches the contract on-chain (the usual cause of 'invalid signature' payments), network id, amount, payTo, timeout, CORS headers for browser agents, resource URL, description and Bazaar discovery. Pass / warn / fail per check with exact fixes. Never pays.

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": "check_payment_setup"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe paid endpoint's public https:// URL (an x402 resource).
bodyNoOptional example JSON body for POST endpoints.
methodNoHTTP method the endpoint expects (default GET).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false; the description reinforces this with 'Never pays' and adds substantial context beyond annotations: it performs an unpaid request, expects a 402, and returns pass/warn/fail per check with exact fixes. It also explains the diagnostic theory (EIP-712 domain mismatch as the usual cause of 'invalid signature').

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 trigger condition, then a compact enumeration of the checks and the pass/warn/fail output. It is dense but every clause carries information; the list of checks is long yet each item maps to a distinct failure mode.

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?

No output schema exists, so the description must explain returns — and it does, stating pass/warn/fail per check with exact fixes. Combined with the read-only annotations and the fully documented 3-parameter schema, nothing an agent needs to invoke or interpret it is missing.

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 schema already documents url, method, and body. The description mentions resource URL as something checked, but adds no format, default, or constraint details beyond the schema, so the 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?

States a specific verb and resource: it calls the endpoint unpaid, reads the 402, and validates the payment request (parse version, EIP-712 domain vs on-chain contract, network id, amount, payTo, timeout, CORS, resource URL, description, Bazaar discovery). This is far more specific than siblings like verify_mcp or reliability_score and an agent can distinguish it 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 Guidelines4/5

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

Gives explicit trigger conditions: 'after building or changing a paid (x402) endpoint' and 'when agents' payments fail'. It does not name a sibling alternative or state when-not to use it, but the context is clear enough for correct selection.

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