Skip to main content
Glama

Pay BSV HTTP 402 API

pay_402
Destructive

Preview the exact invoice price before signing, then pay HTTP 402 pay-per-call BSV APIs within a satoshi cap using the kit's own BSV.

Instructions

Pay a BSV pay-per-call API (HTTP 402, BRC-166) from this kit's own BSV. Call with confirm false to see the price first.

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>",
      "max_sats": "<max_sats>",
      "confirm": "<confirm>"
    },
    "name": "pay_402"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesHTTPS URL of the BSV pay-per-call API resource.
bodyNoOptional request body, sent unchanged on the price check and payment retry.
methodNoOptional HTTP method. Defaults to GET.
confirmYesfalse previews the exact invoice price without signing; true signs and sends the BRC-166 payment header.
max_satsYesMaximum invoice amount in satoshis. The kit refuses a higher price and its own caps may be lower.
content_typeNoOptional Content-Type for body. Without it, a body is sent as application/json.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.24

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already flag a non-readonly, destructive, open-world, non-idempotent operation, and the description reinforces this by disclosing that funds come from the kit's own BSV balance and that a BRC-166 payment header is signed only when confirm=true. It also notes the kit enforces max_sats and may impose lower internal caps, which is real behavior beyond the annotations. It stops short of saying what a successful payment returns.

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?

Two short sentences, front-loaded with what the tool does and immediately followed by the actionable preview instruction. No filler or redundancy.

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?

For a fund-spending tool with no output schema, the description never says what the caller gets back - the invoice payload on a preview, or the API response after payment. Given the destructive hint and the money at stake, that is a meaningful gap, though the core invocation path is otherwise clear.

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 every parameter including confirm, max_sats, body, method, and content_type is already documented. The description's only parameter-level contribution is the confirm=false preview workflow, which the schema also states, so it adds little beyond the structured fields.

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 specific verb and resource ('Pay a BSV pay-per-call API'), plus the protocol (HTTP 402 / BRC-166) and the funding source ('this kit's own BSV'). That is enough for an agent to distinguish it from wallet siblings like withdraw_bsv or swap_asset_to_bsv, though it never explicitly names a sibling it is not.

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 a concrete operating instruction: call with confirm=false to preview the price before paying, which establishes a two-step workflow. It does not state when to avoid the tool or what to do if the invoice exceeds max_sats, so it falls short of full when/when-not guidance.

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