Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-block

Retrieve detailed Bitcoin block information by providing the block hash, enabling access to blockchain data for analysis and verification purposes.

Instructions

Returns details about a block from hash

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYesThe hash info to get block

Implementation Reference

  • Registers the 'get-block' MCP tool, defining its schema (hash: string length 64), description, and handler function that delegates to BlockService.getBlock and returns formatted text content.
    private registerGetRecommendedFeesHandler(): void {
      this.server.tool(
        "get-block",
        "Returns details about a block from hash",
        {
          hash: z.string().length(64).describe("The hash info to get block"),
        },
        async ({ hash }: IHashParameter) => {
          const text = await this.service.getBlock({ hash });
    
          return {
            content: [
              {
                type: "text",
                text: text,
              },
            ],
          };
        }
      );
    }
  • Handler in BlockService that fetches block data from BlockRequestService and formats the response using formatResponse.
    async getBlock({ hash }: IHashParameter): Promise<string> {
      const data = await this.requestService.getBlock({ hash });
      return formatResponse<IBlockResponse>("Details about a block.", data);
    }
  • Core handler in BlockRequestService that performs the API request to retrieve block details using the hash.
    async getBlock({ hash }: IHashParameter): Promise<IBlockResponse | null> {
      return this.client.makeRequest<IBlockResponse>(`block/${hash}`);
    }
  • TypeScript interface defining the input parameter structure for the get-block tool (hash: string). Note: Zod schema in controller adds length(64) validation.
    export interface IHashParameter {
      hash: string;
    }
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 of behavioral disclosure. It states the tool returns details but doesn't specify what those details include (e.g., block height, timestamp, transactions), whether it's a read-only operation, potential errors (e.g., invalid hash), or performance aspects like rate limits. This leaves significant gaps for a tool with no annotation coverage.

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 that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action ('Returns details'), making it easy to parse. Every part of the sentence earns its place by specifying the resource and input source.

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 tool's complexity (a read operation with one parameter), no annotations, and no output schema, the description is incomplete. It doesn't explain what 'details' are returned, error conditions, or behavioral traits, leaving the agent with insufficient context to use the tool effectively beyond basic invocation.

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 schema description coverage is 100%, with the parameter 'hash' fully documented in the input schema (type, length constraints, and description). The description adds no additional meaning beyond the schema, such as hash format examples or context. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't need to given the schema's completeness.

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 clearly states the verb ('Returns') and resource ('details about a block'), specifying it retrieves information from a hash. It distinguishes from siblings like 'get-block-header' or 'get-block-raw' by focusing on general details rather than specific aspects. However, it doesn't explicitly differentiate from 'get-block-txs' or 'get-block-status', making it slightly less specific than a perfect 5.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over siblings like 'get-block-header' (for header-only info) or 'get-block-txs' (for transaction details), nor does it specify prerequisites or exclusions. Usage is implied by the name and description alone, lacking explicit context.

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