Skip to main content
Glama

get_block_stats

Retrieve Bitcoin block statistics including median fees, transaction counts, total outputs, block weight, and subsidy by specifying the block height.

Instructions

Get raw block statistics: median fee, total output, subsidy, weight, tx count.

Args: height: Block height

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
heightYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the `get_block_stats` tool. It takes a block height as input, calls the `getblockstats` RPC method on the Bitcoin RPC interface, and returns the result as a JSON-encoded string.
    def get_block_stats(height: int) -> str:
        """Get raw block statistics: median fee, total output, subsidy, weight, tx count.
    
        Args:
            height: Block height
        """
        stats = get_rpc().getblockstats(height)
        return json.dumps(stats)
Behavior2/5

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

With no annotations provided, the description carries full burden but only lists returned metrics. It fails to disclose error behavior (invalid height), whether the operation is safe/read-only, rate limits, or data freshness. The 'raw' qualifier adds minimal behavioral context.

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?

Efficiently front-loaded with the specific metrics enumerated. The Args section is clear though slightly structurally separated from the main sentence. No redundant or wasteful text.

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?

Adequate for a single-parameter query tool where an output schema exists (per context signals). The description appropriately lists the specific statistics returned. However, it lacks completeness regarding error cases, valid height ranges, or behavioral constraints.

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?

The schema has 0% description coverage (only title and type). The description compensates by explicitly documenting the 'height' parameter as 'Block height', adding necessary semantic meaning that the schema lacks.

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 specific verb (Get) and resource (block statistics) with concrete metrics listed (median fee, total output, subsidy, weight, tx count). The term 'raw' and specific metric list help distinguish it from sibling 'analyze_block' which likely provides interpreted analysis rather than raw data points.

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

Usage Guidelines2/5

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

Provides no guidance on when to use this versus siblings like 'analyze_block', 'compare_blocks', or 'get_block_count'. No mention of prerequisites or conditions where this tool is preferred over alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Bortlesboat/bitcoin-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server