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
| Name | Required | Description | Default |
|---|---|---|---|
| txid | Yes | The txid to get outspends for |
Implementation Reference
- src/interface/controllers/TxToolsController.ts:91-102 (registration)Registers the 'get-tx-outspends' MCP tool, including input schema validation with Zod and the handler function that delegates to TxService.getTxOutspendsprivate 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); }