Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-mempool-txids

Retrieve transaction IDs from the Bitcoin mempool to monitor pending transactions and analyze network activity in real-time.

Instructions

Returns mempool txids

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the 'get-mempool-txids' MCP tool, which invokes MempoolService.getMempoolTxids() and returns the result as text content.
    private registerGetMempoolTxidsHandler(): void {
      this.server.tool(
        "get-mempool-txids",
        "Returns mempool txids",
        async () => {
          const text = await this.mempoolService.getMempoolTxids();
          return { content: [{ type: "text", text }] };
        }
      );
    }
  • Executes the core tool logic by making an API request to the '/mempool/txids' endpoint via IApiClient.
    async getMempoolTxids(): Promise<IMempoolTxidResponse[] | null> {
      return this.client.makeRequest<IMempoolTxidResponse[]>(`mempool/txids`);
    }
  • Wrapper that fetches mempool txids from the request service and formats them into a string response using formatResponse.
    async getMempoolTxids(): Promise<string> {
      const data = await this.requestService.getMempoolTxids();
      return formatResponse<IMempoolTxidResponse[]>("Mempool Txids", data);
    }
  • Defines TypeScript interfaces and types for mempool API responses, including IMempoolTxidResponse as string for txids.
    export interface IMempoolInfoResponse {
      count: number;
      vsize: number;
      total_fee: number;
    }
    
    export type IMempoolTxidResponse = string;
    
    export interface IMempoolRecentResponse {
      txid: string;
      fee: number;
      vsize: number;
      value: number;
      time: number;
    } 
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 lacks details on behavioral traits like rate limits, data format, or whether it returns all or filtered txids. This is inadequate for a tool with zero 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 is appropriately sized and front-loaded, making it highly concise and well-structured.

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 (simple read operation) but lack of annotations and output schema, the description is incomplete. It fails to explain return values, data scope, or behavioral context, making it insufficient for effective tool use.

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 tool has 0 parameters with 100% schema description coverage, so no parameter information is needed. The description does not add param semantics, but this is acceptable given the baseline, as it doesn't need to compensate for any gaps.

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 mempool txids' clearly states the action (returns) and resource (mempool txids), establishing a basic purpose. However, it lacks specificity about what 'mempool txids' entails (e.g., all transaction IDs in the mempool) and does not differentiate from siblings like 'get-mempool-info' or 'get-mempool-recent', making it vague in context.

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 such as 'get-mempool-info' and 'get-mempool-recent', the description offers no context, prerequisites, or exclusions, leaving usage unclear.

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