Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-tx-outspends

Retrieve detailed outspends information for all outputs of a specified Bitcoin transaction, enabling analysis of transaction dependencies and spending status using the Mempool MCP Server.

Instructions

Returns outspends info for all outputs of a transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
txidYesThe txid to get outspends for

Implementation Reference

  • Registers the 'get-tx-outspends' MCP tool, including input schema validation with Zod and the handler function that delegates to TxService.getTxOutspends
    private registerGetTxOutspendsHandler(): void { this.server.tool( "get-tx-outspends", "Returns outspends info for all outputs of a transaction", { txid: z.string().length(64).describe("The txid to get outspends for"), }, async ({ txid }) => { const text = await this.txService.getTxOutspends({ txid }); return { content: [{ type: "text", text }] }; } );
  • Core handler implementation for getTxOutspends: performs API request to retrieve outspends data for the transaction outputs.
    async getTxOutspends({ txid }: { txid: string }): Promise<any[] | null> { return this.client.makeRequest<any[]>(`tx/${txid}/outspends`); }
  • Helper service method that calls TxRequestService and formats the response for the tool.
    async getTxOutspends({ txid }: { txid: string }): Promise<string> { const data = await this.requestService.getTxOutspends({ txid }); return formatResponse<any[]>("Transaction Outspends", data); }

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