Skip to main content
Glama

PayStage — x402 payment safety and spend policy

evaluate_mcp_payment

Read-only

verify the recipient. Call this BEFORE signing any x402 payment. Verdict is pay | review | do_not_pay, each with stable reason codes (e.g. 'amount 1.00 USDC exceeds max_amount 0.05 USDC'). Returns the decision plus a signed receipt you can verify offline with verify_receipt. Read-only: holds no keys, never signs, never moves funds. A refusal costs nothing.

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": {
      "payment_required": "<payment_required>"
    },
    "name": "evaluate_mcp_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
policyNo
agent_idNoWhich agent is asking. Required to reach per-agent budgets in policy.agents.
policy_pathNo
payment_requiredYes

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/openWorldHint/destructiveHint, but the description goes well beyond them: it states the tool holds no keys, never signs, never moves funds, and returns a signed receipt verifiable offline. It also discloses the verdict taxonomy and that reason codes are stable (e.g. 'amount 1.00 USDC exceeds max_amount 0.05 USDC'), which is behavioral detail found nowhere in the structured fields.

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 timing imperative, and each sentence carries distinct information (when to call, what returns, safety profile, cost). The opening fragment 'verify the recipient' is slightly narrower than what the tool actually does, which costs it the top mark.

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?

With no output schema, the description steps up by describing the verdict, reason codes, and signed receipt. What it omits is any characterization of the two undocumented object parameters (payment_required, policy), which is the main gap for a 4-parameter tool.

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

Parameters2/5

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

Schema coverage is only 25%, so the description needed to carry parameter meaning, yet it explains none of them. It never says what the required payment_required object contains, nor how 'policy' differs from 'policy_path', leaving half the inputs opaque in both the schema and the prose. Only agent_id is documented, and that documentation lives in the schema, not the description.

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?

The description states a concrete verb and resource ('evaluate/verify an x402 payment') and names the output vocabulary (pay | review | do_not_pay), so an agent knows exactly what comes back. It also implicitly distinguishes itself from verify_receipt, which is described as the offline receipt check rather than the pre-signing decision.

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?

'Call this BEFORE signing any x402 payment' gives an explicit timing condition, and 'verify offline with verify_receipt' routes the agent to the right sibling for the post-hoc check. The 'a refusal costs nothing' line removes the main hesitation about calling it speculatively.

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.