Skip to main content
Glama

l402-pay

Destructive

Pay a challenge that l402-fetch or l402-discover returned, by its paymentHash, and store the credential so the next l402-fetch succeeds.

Instructions

Pay a challenge that l402-fetch or l402-discover returned, by its paymentHash, and store the credential so the next l402-fetch succeeds. For human wallets, polls the payment page for settlement for up to 120s; call it straight after showing the payment URL to the user. An invoice that did not come from such a challenge is paid only if the human approves it in the client.

Input Schema

NameRequiredDescriptionDefault
methodNoPayment method override. Defaults to wallet priority: NWC > Cashu > LNURLcash > human.
invoiceNoBOLT-11 invoice. Leave out when paying a challenge by paymentHash; any other invoice needs the human to approve it.
macaroonNoMacaroon from the L402 challenge. Optional if paymentHash matches a cached challenge.
paymentFlowNoPass the storage paymentFlow from search results. Wildbloom checkout is refused before wallet access.
paymentHashNoPayment hash of a challenge from l402-fetch or l402-discover.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.4.0
    • addedInput schema / properties / paymentFlow
      Added value: +{
      +  "const": "wildbloom-checkout-v1",
      +  "description": "Pass the storage paymentFlow from search results. Wildbloom checkout is refused before wallet access.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv4.3.0
    • changedInput schema / properties / invoice / description
      Previous value: -"BOLT-11 invoice to pay. Optional if paymentHash matches a cached challenge from l402-discover."New value: +"BOLT-11 invoice. Leave out when paying a challenge by paymentHash; any other invoice needs the human to approve it."
    • changedInput schema / properties / paymentHash / description
      Previous value: -"Payment hash to look up cached challenge from l402-discover."New value: +"Payment hash of a challenge from l402-fetch or l402-discover."
  3. First observedv4.2.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and openWorldHint=true, so the description doesn't need to restate that this spends funds. It adds real behavioral context beyond them: credential persistence so the next l402-fetch succeeds, a 120s settlement poll for human wallets, and an approval gate for foreign invoices. It stops short of describing failure/timeout outcomes.

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

Conciseness5/5

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

Three sentences, all load-bearing: the primary action and its goal first, then human-wallet timing, then the edge-case invoice rule. No filler, no repetition of schema text.

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 tool with no output schema, it covers the full workflow handoff (fetch/discover → pay → credential stored → fetch succeeds) and the human-approval veto. Missing only what happens on poll timeout or payment failure, which the agent would want before retrying.

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 description coverage is 100%, so the baseline is 3. The description still adds meaning by tying paymentHash to the source tools, clarifying the invoice-vs-paymentHash branch, and noting the approval requirement for non-challenge invoices, which is parameter-selecting behavior rather than restatement.

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+resource (pay an L402 challenge and store the credential) and identifies exactly which siblings produce the input (l402-fetch, l402-discover). An agent can distinguish this from l402-redeem-cashu or l402-store-token without opening any schema.

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?

Gives explicit routing ('a challenge that l402-fetch or l402-discover returned, by its paymentHash'), timing ('call it straight after showing the payment URL'), and an exclusion ('an invoice that did not come from such a challenge is paid only if the human approves it'). This is close to a complete decision procedure.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.