Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-blocks

Retrieve recent Bitcoin blockchain data to monitor network activity and analyze transaction patterns using real-time mempool information.

Instructions

Returns the latest blocks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the MCP tool 'get-blocks' with empty input schema. The inline handler fetches latest blocks using BlocksService.getBlocks() and returns the formatted text as MCP content.
    private registerGetBlocksHandler(): void {
      this.server.tool(
        "get-blocks",
        "Returns the latest blocks",
        {},
        async () => {
          const text = await this.blocksService.getBlocks();
          return { content: [{ type: "text", text }] };
        }
      );
    }
  • BlocksService.getBlocks(): Delegates to BlocksRequestService.getBlocks() and formats the response using formatResponse for JSON string output.
    async getBlocks(): Promise<string> {
      const data = await this.requestService.getBlocks();
      return formatResponse<IBlocksResponse[]>("Blocks", data);
    }
  • Core implementation: Makes an API request to the 'blocks' endpoint using IApiClient.makeRequest to fetch the latest blocks data.
    async getBlocks(): Promise<IBlocksResponse[] | null> {
      return this.client.makeRequest<IBlocksResponse[]>(`blocks`);
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states a read operation ('returns') but doesn't disclose behavioral traits like rate limits, data freshness, pagination, or error handling. This is a significant gap 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 with no wasted words. It's front-loaded with the core action, making it easy to parse quickly.

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 (no parameters, but many sibling tools) and lack of annotations/output schema, the description is incomplete. It doesn't explain what 'latest blocks' means (e.g., number, format, or source), leaving gaps for the agent to understand the tool fully.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add param info, which is appropriate here, but it could hint at implicit parameters (e.g., count or offset), so it's not a perfect 5.

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 the latest blocks' clearly states the verb ('returns') and resource ('latest blocks'), providing a basic purpose. However, it's vague about scope (e.g., how many blocks, from what source) and doesn't distinguish it from siblings like 'get-block' or 'get-block-txs', which reduces specificity.

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 many sibling tools (e.g., 'get-block', 'get-block-txs'), the description lacks context on use cases, prerequisites, or exclusions, leaving the agent to infer usage from the name alone.

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