Skip to main content
Glama

Diogenes Web3, DeFi & 402 Security MCP

Bitcoin SegWit/Taproot UTXO Dust Consolidation & Fee-Window Planner

plan_bitcoin_utxo_consolidation
Read-onlyIdempotent

Analyzes a set of Bitcoin UTXO balances in satoshis to compute exact vByte transaction weight, identify uneconomical dust inputs, and recommend whether to consolidate now or hold. Use when optimizing on-chain Bitcoin treasury UTXO sets to minimize long-term miner fee drag; for fetching current live Bitcoin mempool sat/vB feerates alone, use estimate_bitcoin_mempool_fees instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'utxos_sats_json' ('script_type' defaults to 'p2wpkh_segwit'), supports '?demo=true' or L402 (20 sats), and returns HTTP 400 if invalid.

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": {
      "utxos_sats_json": "<utxos_sats_json>"
    },
    "name": "plan_bitcoin_utxo_consolidation"
  }
}

Input Schema

NameRequiredDescriptionDefault
script_typeNoBitcoin input script type determining vByte weight per input; defaults to 'p2wpkh_segwit' when omitted.
utxos_sats_jsonYesJSON array or comma-separated list of UTXO values in satoshis (e.g. '[1200, 45000, 85000]').

Output Schema

NameRequiredDescriptionDefault
utxo_countYesNumber of UTXO inputs analyzed.
recommended_actionYesExecution timing advice ('CONSOLIDATE_NOW' or 'HOLD_UNTIL_SUB_15_SAT_VB').
high_fee_dust_utxosYesCount of UTXOs whose input weight costs more than 3% of their value.
estimated_consolidation_vbytesYesTotal virtual byte (vB) size of the consolidation transaction.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety bar is met structurally. The description adds genuinely useful context the annotations do not encode: stateless execution, a 32 KB payload cap, 60 RPM throttling, demo/L402 payment options, and an HTTP 400 on invalid input. However it omits what the recommendation output contains and how weight is derived, so it is solid but not exhaustive.

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?

Purpose is front-loaded in the first sentence, followed by the when-to-use/alternative routing and then operational constraints. Dense but nearly every clause carries information; the packing of rate limit, auth, and error behavior into one parenthetical sentence is slightly crowded but not wasteful.

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?

With only two simple parameters, full schema coverage, and an output schema, the description need not explain return values. It covers the remaining agent-critical unknowns: statelessness, payload cap, rate limit, payment/auth path, and failure behavior on invalid input.

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%: both utxos_sats_json (JSON array or comma-separated satoshi values) and script_type (enum with default) are fully documented in the schema. The description restates the script_type default rather than adding new meaning such as accepted value ranges or size limits per UTXO. Baseline 3 applies when the schema carries the load.

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 (analyzes) and resource (Bitcoin UTXO satoshi values) plus the three concrete outputs: vByte weight, dust identification, and a consolidate/hold recommendation. It explicitly distinguishes itself from the sibling estimate_bitcoin_mempool_fees, so an agent can route without opening either 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 an explicit when-to-use condition ('optimizing on-chain Bitcoin treasury UTXO sets to minimize long-term miner fee drag') and names the alternative plus the exact condition that selects it ('for fetching current live Bitcoin mempool sat/vB feerates alone, use estimate_bitcoin_mempool_fees instead'). Nothing is left to inference.

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.