Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-tx-info

Retrieve transaction details from the Bitcoin blockchain by providing a transaction ID, enabling users to access specific transaction information through the Mempool MCP Server.

Instructions

Returns details about a transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
txidYesThe txid to get info for

Implementation Reference

  • Registers the MCP tool 'get-tx-info' with input schema for txid (64-char string), description, and handler that fetches from TxService and returns text content.
    private registerGetTxHandler(): void {
      this.server.tool(
        "get-tx-info",
        "Returns details about a transaction",
        {
          txid: z.string().length(64).describe("The txid to get info for"),
        },
        async ({ txid }) => {
          const text = await this.txService.getTxInfo({ txid });
          return { content: [{ type: "text", text }] };
        }
      );
    }
  • Application service layer: Retrieves transaction info via request service and formats it using formatResponse.
    async getTxInfo({ txid }: { txid: string }): Promise<string> {
      const data = await this.requestService.getTxInfo({ txid });
      return formatResponse<ITxResponse>("Transaction Info", data);
    }
  • Infrastructure layer handler: Performs the actual API request to fetch transaction info from `tx/${txid}` endpoint.
    async getTxInfo({ txid }: { txid: string }): Promise<ITxResponse | null> {
      return this.client.makeRequest<ITxResponse>(`tx/${txid}`);
    }
  • src/main.ts:127-127 (registration)
    Instantiates TxToolsController in main application entrypoint, which triggers the registration of all its tools including 'get-tx-info'.
    new TxToolsController(server, txService);
  • Input schema definition for the 'get-tx-info' tool using Zod: txid as 64-character string.
    {
      txid: z.string().length(64).describe("The txid to get info for"),
    },
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 this is a read operation ('returns'), which implies it's non-destructive, but doesn't disclose any behavioral traits like rate limits, authentication needs, error conditions, or what 'details' specifically includes. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 function without any unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

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 transaction data and the lack of annotations and output schema, the description is insufficient. It doesn't explain what 'details' includes, how the data is structured, or any limitations. For a tool with no structured output definition, more context is needed to understand the return value fully.

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 single parameter 'txid' fully documented in the schema. The description adds no additional meaning about the parameter beyond what the schema provides, such as format examples or constraints. Since the schema handles the documentation well, the baseline score of 3 is appropriate.

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 transaction'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'get-tx-status', 'get-tx-raw', or 'get-tx-merkleblock-proof', which also return transaction-related information but with different scopes or formats.

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. With multiple sibling tools focused on transactions (e.g., 'get-tx-status', 'get-tx-raw'), there's no indication of what makes this tool distinct or when it should be preferred over others.

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