Skip to main content
Glama

Prepare: pay an x402 request from a hold

hold_pay
Read-onlyIdempotent

The voucher for one x402 request (HTTP 402 offering the borro-hold scheme): the typed data the hold's payer signs, saying what it owes the merchant in all on the hold, counted on from the last voucher Borro's facilitator accepted (or what the hold has paid on chain, if more). Give payment_required and hold (its id), or wallet to use its newest hold the merchant takes. Refused in words when the hold cannot pay it (another payee, a vault the merchant does not take, too close to its expiry, its cap used, too little value) or the request costs more than max_usdg. Nothing is sent: sign typed_data (eth_signTypedData_v4), then hold_header.

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

Input Schema

NameRequiredDescriptionDefault
holdNoThe hold's id (hold_open returned it)
walletNoThe payer: finds its hold for this merchant when hold is not given
max_usdgNoThe most one request may cost, in whole units as a decimal string, like "1.5"
payment_requiredYesThe 402's PaymentRequired (PAYMENT-REQUIRED header value or JSON body)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description reinforces this with the non-obvious 'Nothing is sent' – the agent must know this only produces typed data for the caller to sign. It goes further with concrete refusal semantics (wrong payee, unsupported vault, near expiry, cap exhausted, insufficient value) and the voucher accounting basis (last accepted voucher or on-chain payments, whichever is greater). The one gap is what exactly the response contains besides typed_data.

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

Conciseness3/5

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

Everything stated is substantive, but it is delivered as one dense paragraph with nested parentheticals ('counted on from the last voucher Borro's facilitator accepted (or what the hold has paid on chain, if more)') that take real effort to parse. Front-loading the artifact is good; sentence structure is not.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers inputs, refusals, safety profile and the follow-up call, which is most of what an agent needs for a read-only preparation step. With no output schema, however, the description never states the return shape (typed_data, and apparently a hold_header token), leaving the agent to infer key names from the prose.

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 baseline is 3; the description adds real semantics on top – hold vs wallet as alternative selectors, and max_usdg as a hard ceiling that triggers refusal when the request costs more. It clarifies that max_usdg is a spend limit, not a hold parameter, which the schema alone does not make explicit.

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?

States a concrete artifact – the voucher / typed data for one x402 request under the borro-hold scheme – and who signs it. That distinguishes it from the sibling hold_header (the subsequent step) and hold_open. The core verb is implicit ('prepare/build') rather than stated, and the run-on opening clause makes the purpose slower to extract than it should be.

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 the two accepted input routes explicitly ('Give payment_required and hold (its id), or wallet to use its newest hold the merchant takes') and closes with the downstream workflow: 'Nothing is sent: sign typed_data (eth_signTypedData_v4), then hold_header.' It also enumerates when the tool refuses, which effectively defines its operating envelope. No explicit when-not-to-use against siblings beyond the implied sequence.

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