Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-block-txs

Retrieve Bitcoin block transactions by providing a specific block hash to access transaction data from the blockchain.

Instructions

Returns transactions for a block

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYesThe block hash to get txs for

Implementation Reference

  • Core implementation of fetching block transactions via API request to endpoint `block/${hash}/txs` using the API client.
    async getBlockTxs({ hash }: { hash: string }): Promise<IBlockTxsResponse[] | null> {
      return this.client.makeRequest<IBlockTxsResponse[]>(`block/${hash}/txs`);
    }
  • Service layer handler that retrieves block transactions from request service and formats the response using formatResponse.
    async getBlockTxs({ hash }: IHashParameter): Promise<string> {
      const data = await this.requestService.getBlockTxs({ hash });
      return formatResponse<IBlockTxsResponse[]>("Block Txs", data);
    }
  • Registers the "get-block-txs" MCP tool, defines input schema (hash: 64-char string), and provides thin handler that delegates to BlocksService.getBlockTxs and returns MCP-formatted response.
    private registerGetBlockTxsHandler(): void {
      this.server.tool(
        "get-block-txs",
        "Returns transactions for a block",
        {
          hash: z.string().length(64).describe("The block hash to get txs for"),
        },
        async ({ hash }) => {
          const text = await this.blocksService.getBlockTxs({ hash });
          return { content: [{ type: "text", text }] };
        }
      );
  • TypeScript interface defining the expected structure of individual block transaction responses (output schema).
    export interface IBlockTxsResponse {
      txid: string;
      status: {
        confirmed: boolean;
        block_height?: number;
        block_hash?: string;
        block_time?: number;
      };
      vin: any[];
      vout: any[];
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool returns transactions but doesn't disclose behavioral traits such as whether it's a read-only operation, what format the transactions are in (e.g., JSON, raw), if there are rate limits, or any error conditions. This leaves significant gaps in understanding how the tool behaves.

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?

The description is a single, efficient sentence with zero waste. It's front-loaded and gets straight to the point, making it easy to parse quickly without unnecessary details.

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

Completeness2/5

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

Given the complexity of blockchain tools and no output schema, the description is incomplete. It doesn't specify what 'transactions' includes (e.g., full details, IDs, or something else), which is critical for an AI agent to understand the return value. With no annotations and rich sibling tools, more context is needed to be fully helpful.

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?

The input schema has 100% description coverage, with the 'hash' parameter well-documented as 'The block hash to get txs for'. The description doesn't add any meaning beyond this, such as explaining hash format or constraints, but since the schema is comprehensive, a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Returns transactions for a block' clearly states the action (returns) and resource (transactions for a block), but it's vague about what 'transactions' means (e.g., full details, IDs only, or something else). It doesn't distinguish from siblings like 'get-block-txids' or 'get-block-txid-by-index', which suggests similar functionality but with different outputs.

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'get-block-txids' (returns transaction IDs) and 'get-block-txid-by-index' (returns a specific transaction ID), the description doesn't clarify if this tool returns full transaction data, making it unclear which tool to choose for different needs.

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/alexandresanlim/mempool-mcp-server'

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