Skip to main content
Glama

SML PreSign

x402 payment preflight

presign_preflight_x402
Read-only

Paste the 402 challenge you are about to pay (and optionally your signed payment). Checks asset contract, amount vs quote, EIP-712 domain, EIP-3009 support, payer balance, dry-run of the value move, signature recovery, nonce reuse, expiry, payTo sanctions/freeze/exposure and seller domain age. Returns a signed verdict. Free: 25 calls/day; then $0.003 USDC per call via x402.

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": {
      "challenge": "<challenge>"
    },
    "name": "presign_preflight_x402"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexNo
payerNo
policyNoOptional: your rules. Hashed into the signed receipt.
paymentNox402 payment payload (JSON or base64 PAYMENT-SIGNATURE)
challengeYes402 JSON body, base64 PAYMENT-REQUIRED header, or one requirements object

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?

The annotations already declare readOnlyHint=true and openWorldHint=true, which the description is consistent with, and it adds genuinely useful operational context: outbound lookups (balance, sanctions, domain age) and the cost model (25 free calls/day, then $0.003 USDC via x402). It does not disclose latency, whether results are cached, or how a 'signed verdict' is structured, which matters since no output schema exists.

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 imperative action is front-loaded, followed by a compact check inventory and the pricing line, with no filler sentences. The middle check list is a long comma-run that is dense to parse but every item carries distinct information.

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?

For a 5-parameter, nested-policy tool with no output schema, the description covers input intent, the breadth of checks performed, and the commercial model. The remaining gap is the verdict itself — what fields it returns or what a negative verdict implies for proceeding — which is left entirely to the caller to discover.

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 coverage is 60% and the nested policy object is self-documented in the schema, so the baseline is 3. The description adds one real clarification — that 'payment' is optional and that the challenge may be a JSON body, base64 header, or single requirements object — but says nothing about 'index' or 'payer'.

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 names a specific verb and resource ('Paste the 402 challenge you are about to pay') and then enumerates exactly what is checked: asset contract, amount vs quote, EIP-712 domain, EIP-3009 support, payer balance, dry-run, signature recovery, nonce reuse, expiry, sanctions/exposure, and seller domain age. That enumeration makes the tool's scope unmistakable against the screening and simulation siblings.

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 establishes a clear trigger point — immediately before paying a 402 challenge — and notes the payment payload is optional, so an agent knows both the pre-signature and post-signature entry paths. It stops short of naming an alternative (e.g. when to use presign_simulate_tx instead) or stating what to do if the verdict is negative.

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