getMultisigTransaction
Retrieve detailed information about a specific multisig transaction using its unique transaction hash with the Safe MCP Server.
Instructions
Get details of a specific multisig transaction
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| safeTxHash | Yes | Safe transaction hash |
Implementation Reference
- src/index.ts:184-192 (handler)Handler logic for the getMultisigTransaction tool. Extracts safeTxHash from arguments, fetches transaction details from the Safe API endpoint `/multisig-transactions/${safeTxHash}/`, and returns the JSON-formatted response.case "getMultisigTransaction": { const { safeTxHash } = args as any; const data = await this.fetchSafeApi( `/multisig-transactions/${safeTxHash}/` ); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }], }; }
- src/index.ts:129-142 (registration)Tool registration in the ListToolsRequestSchema handler, defining the name, description, and input schema for getMultisigTransaction.{ name: "getMultisigTransaction", description: "Get details of a specific multisig transaction", inputSchema: { type: "object", properties: { safeTxHash: { type: "string", description: "Safe transaction hash", }, }, required: ["safeTxHash"], }, },
- src/index.ts:132-141 (schema)Input schema definition for the getMultisigTransaction tool, specifying the required safeTxHash parameter.inputSchema: { type: "object", properties: { safeTxHash: { type: "string", description: "Safe transaction hash", }, }, required: ["safeTxHash"], },
- src/index.ts:82-101 (helper)Helper method used by the handler to make authenticated API calls to the Safe API, handling URL construction, query params, error handling, and JSON parsing.private async fetchSafeApi( endpoint: string, params?: Record<string, string> ): Promise<any> { const url = new URL(`${SAFE_API_URL}${endpoint}`); if (params) { Object.entries(params).forEach(([key, value]) => { url.searchParams.append(key, value); }); } const response = await fetch(url.toString()); if (!response.ok) { throw new McpError( ErrorCode.InternalError, `Safe API error: ${response.statusText}` ); } return response.json(); }