Skip to main content
Glama

Batch transaction fee budget analysis

analyze
Idempotent

Analyze one to 25 buyer-supplied transaction sizes against a per-transaction fee cap. plan=budget_sats:vbytes[,vbytes...], e.g. 1000:140,220,350. Uses fresh node fee estimates, rounds up to whole sats, and returns the fastest observed estimate fitting each cap. Estimates do not guarantee confirmation. No transaction is signed or broadcast. Price: 20 sats or US$0.01 (USDC) per call.

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": {
      "plan": "<plan>"
    },
    "name": "analyze"
  }
}

Input Schema

NameRequiredDescriptionDefault
l402NoOptional. After paying the Lightning invoice: '<token>:<preimage>'.
passNoOptional. A Diamond budget token (dp_...) that your user approved once (from US$0.89; USDC or other Base tokens, or Lightning) or that you funded with the free diamond_budget tool. Each call deducts its price; no wallet needed in the agent.
planYesPer-transaction fee cap in sats, colon, and one to 25 comma-separated transaction sizes in vbytes. Example 1000:140,220,350. Fee cap 1..100000000; each size 60..100000.
pay_withNoOptional. 'lightning' requests a BOLT11 invoice and a token when Diamond can receive Lightning payments.

Output Schema

NameRequiredDescriptionDefault
as_ofYes
plansYes
productYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / pay_with / description
      Previous value: -"Optional. 'lightning' returns a BOLT11 invoice and a token instead of the x402 payment request."New value: +"Optional. 'lightning' requests a BOLT11 invoice and a token when Diamond can receive Lightning payments."
  2. Changed1 schema field changed
    • changedInput schema / properties / pass / description
      Previous value: -"Optional. A Diamond pass (dp_...) that your user funded in a browser (USDC on Base or Lightning, from US$1). Each call deducts its price; no wallet needed in the agent."New value: +"Optional. A Diamond budget token (dp_...) that your user approved once (from US$0.89; USDC or other Base tokens, or Lightning) or that you funded with the free diamond_budget tool. Each call deducts its price; no wallet needed in the agent."
  3. Changed1 schema field changed
    • addedInput schema / properties / pass
      Added value: +{
      +  "description": "Optional. A Diamond pass (dp_...) that your user funded in a browser (USDC on Base or Lightning, from US$1). Each call deducts its price; no wallet needed in the agent.",
      +  "type": "string"
      +}
  4. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Adds real context beyond the annotations: rounding up to whole sats, returning the fastest observed estimate fitting each cap, the explicit disclaimer that estimates do not guarantee confirmation, and that no transaction is signed or broadcast. It also discloses cost (20 sats / US$0.01 per call), which annotations do not cover. The readOnlyHint=false is not contradicted, since the charge itself is a side effect, but the description could have clarified that the only state change is payment.

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 core capability and the plan format are front-loaded, with the four sentences each carrying useful content (format, behavior, disclaimer, price). Slight cost: pricing and payment details crowd the tail rather than being grouped separately.

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

Completeness5/5

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

Output schema exists, so return values need not be described, and the definition still covers inputs, rounding behavior, disclaimers, and payment route. It reads as complete for a paid, idempotent analysis tool, with only minor edge-case behavior (e.g., no cap satisfiable) left implicit.

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 100%, so the schema already defines l402, pass, plan, and pay_with with enums and bounds. The description reinforces the plan syntax and the 1-to-25 size limit, but adds no new meaning about payment token handling or how pay_with interacts with l402/pass. Baseline 3 is appropriate.

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: it analyzes one to 25 buyer-supplied transaction sizes against per-transaction fee caps, and shows the concrete plan syntax. An agent can tell this is a scheduling/budgeting tool rather than a raw fee query, though it never names siblings such as bitcoin_fee_estimates or bitcoin_batch_risk to sharpen the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied through the worked example ('1000:140,220,350') and the note that it uses fresh node fee estimates, so the agent can infer this is the tool for fitting sizes under a cap. However, there is no explicit when-to-use or when-not-to-use statement, and no routing to fee-estimate or risk siblings for related questions.

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