Skip to main content
Glama

get_transaction

Retrieve detailed information about specific transactions on the Algorand blockchain by providing the transaction ID.

Instructions

Get transaction details by transaction ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
txIdYesTransaction ID

Implementation Reference

  • Main handler for the 'get_transaction' tool: parses arguments using Zod schema, fetches transaction via algorandService, returns formatted JSON response or error.
    case 'get_transaction': { const parsed = GetTransactionArgsSchema.parse(args); try { const txInfo = await algorandService.getTransaction(parsed.txId); return { content: [ { type: 'text', text: `Transaction Information:\n${JSON.stringify(txInfo, null, 2)}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error getting transaction: ${error}`, }, ], isError: true, }; } }
  • Zod schema defining input validation for get_transaction tool arguments (txId: string).
    const GetTransactionArgsSchema = z.object({ txId: z.string(), });
  • src/index.ts:309-322 (registration)
    MCP tool registration entry defining name, description, and input schema for 'get_transaction'.
    { name: 'get_transaction', description: 'Get transaction details by transaction ID', inputSchema: { type: 'object', properties: { txId: { type: 'string', description: 'Transaction ID', }, }, required: ['txId'], }, },
  • Supporting method in AlgorandService that retrieves transaction information using algodClient.pendingTransactionInformation.
    async getTransaction(txId: string) { try { const txInfo = await this.algodClient.pendingTransactionInformation(txId).do(); return txInfo; } catch (error) { throw new Error(`Failed to get transaction: ${error}`); } }

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/Jake-loranger/algorand-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server