Skip to main content
Glama

optimal_send_window

Read-only

Bitcoin transaction timing intelligence. Returns a congestion forecast for the next 1-4h, a recommended UTC send window when fees are projected at/below your target, a fee trajectory (rising/stable/falling) with a calibrated confidence score, next-block minimum fee, confirmation targets for 3/6/144 blocks, and an RBF-viability flag. A synthesis layer above raw fee data — the decision an autonomous payment agent needs before broadcasting. Source: mempool.space. Price: 25 sats per call.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "optimal_send_window"
  }
}

Input Schema

NameRequiredDescriptionDefault
l402_proofNoL402 payment proof "<macaroon>:<preimage>". Omit on the first call; an unpaid call returns a 25 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set.
hours_aheadNoHow far ahead to search for the optimal window (1-6h, default 4).
target_sat_vbNoYour fee ceiling in sat/vB. The recommended window targets at-or-below this rate. Omit to get the lowest-projected window.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / l402_proof / description
      Previous value: -"L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 0 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set."New value: +"L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 25 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set."
  2. Changed1 schema field changed
    • changedInput schema / properties / l402_proof / description
      Previous value: -"L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 25 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set."New value: +"L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 0 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set."
  3. Changed1 schema field changed
    • addedInput schema / properties / l402_proof
      Added value: +{
      +  "description": "L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 25 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set.",
      +  "type": "string"
      +}
  4. Added

TDQS

A3.7/5.0
Behavior4/5

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

Read-only, open-world and non-destructive behavior is already covered by annotations, but the description adds material context beyond them: the upstream data source (mempool.space) and a concrete price of 25 sats per call, which an agent needs for cost-aware tool selection. It omits rate limits, caching/freshness of the forecast, and failure behavior, which keeps it below a 5.

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 return surface is front-loaded and the sentences are dense with useful detail. There is some positioning rhetoric ("A synthesis layer above raw fee data — the decision an autonomous payment agent needs") that consumes space without adding callable information, but the overall size is appropriate for a tool that returns six distinct data points.

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?

With no output schema, the description carries the full burden of explaining return values and does so thoroughly, including confirmation targets and an RBF flag. The L402 payment-and-retry flow is fully documented in the schema, so its absence from the description is acceptable. Only the freshness of the forecast and the 1-4h vs 1-6h range discrepancy are unresolved.

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 documents all three parameters and the baseline is 3. The description reinforces target_sat_vb semantics ("fees projected at/below your target") but adds no syntax or format detail beyond the schema, and its "next 1-4h" phrasing is narrower than the schema's hours_ahead range of 1-6, which slightly muddies rather than clarifies.

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?

The description names a specific resource and enumerates concrete return fields: congestion forecast, recommended UTC send window, fee trajectory with confidence, next-block minimum fee, confirmation targets for 3/6/144 blocks, and an RBF-viability flag. That is far more than a restatement of the name. However, it never distinguishes itself from the sibling btc_send_decision, which by name appears to serve a very similar decision-making role, so an agent cannot route between them from this text alone.

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?

"The decision an autonomous payment agent needs before broadcasting" implies the usage context (pre-broadcast, payment-agent workflows), but no explicit when-to-use/when-not conditions or alternatives are given. The most likely alternative, btc_send_decision, is not mentioned at all, leaving the agent to infer which of the two to pick.

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