Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-tx-outspend

Retrieve outspend details for a specific Bitcoin transaction output by providing the transaction ID (txid) and output index (vout), enabling precise tracking of spent UTXOs.

Instructions

Returns outspend info for a transaction output

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
txidYesThe txid to get outspend for
voutYesThe vout index to get outspend for

Implementation Reference

  • Full registration of the 'get-tx-outspend' tool, including description, Zod input schema (txid and vout), and handler function that calls TxService.getTxOutspend and returns formatted text content.
    private registerGetTxOutspendHandler(): void { this.server.tool( "get-tx-outspend", "Returns outspend info for a transaction output", { txid: z.string().length(64).describe("The txid to get outspend for"), vout: z.number().int().describe("The vout index to get outspend for"), }, async ({ txid, vout }) => { const text = await this.txService.getTxOutspend({ txid, vout }); return { content: [{ type: "text", text }] }; } ); }
  • TxService.getTxOutspend: Delegates to TxRequestService and formats the outspend response using formatResponse.
    async getTxOutspend({ txid, vout, }: { txid: string; vout: number; }): Promise<string> { const data = await this.requestService.getTxOutspend({ txid, vout }); return formatResponse<any>("Transaction Outspend", data); }
  • Core implementation logic: Makes API request to `/tx/{txid}/outspend/{vout}` via IApiClient to fetch the outspend data.
    async getTxOutspend({ txid, vout }: { txid: string; vout: number }): Promise<any | null> { return this.client.makeRequest<any>(`tx/${txid}/outspend/${vout}`); }

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