get-tx-outspends
Check if a Bitcoin transaction's outputs have been spent by querying outspend information for all outputs using the transaction ID.
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.getTxOutspends() and returns formatted text response.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 }] }; } );
- Helper method in TxService that calls TxRequestService.getTxOutspends and formats the response using formatResponse.async getTxOutspends({ txid }: { txid: string }): Promise<string> { const data = await this.requestService.getTxOutspends({ txid }); return formatResponse<any[]>("Transaction Outspends", data); }
- Core implementation that executes the API request to fetch outspends data for the transaction via the IApiClient.async getTxOutspends({ txid }: { txid: string }): Promise<any[] | null> { return this.client.makeRequest<any[]>(`tx/${txid}/outspends`); }