Skip to main content
Glama

get_transaction

Retrieve detailed information about Solana blockchain transactions using their unique signature to verify status, confirmations, and contents.

Instructions

Get transaction details by signature

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
signatureYesTransaction signature

Implementation Reference

  • The handler function that implements the 'get_transaction' tool logic. It ensures a Solana connection, fetches the transaction by signature using connection.getTransaction, and returns key details like slot, blockTime, fee, success status, and any error.
    async function handleGetTransaction(args: any) { const { signature } = args; ensureConnection(); const transaction = await connection.getTransaction(signature, { commitment: "confirmed", maxSupportedTransactionVersion: 0 }); if (!transaction) { throw new Error("Transaction not found"); } return { signature, slot: transaction.slot, blockTime: transaction.blockTime, fee: transaction.meta?.fee, success: transaction.meta?.err ? false : true, error: transaction.meta?.err }; }
  • Input schema definition for the 'get_transaction' tool, specifying a required 'signature' string parameter.
    inputSchema: { type: "object", properties: { signature: { type: "string", description: "Transaction signature" } }, required: ["signature"] }
  • src/index.ts:226-239 (registration)
    Registration of the 'get_transaction' tool in the tools array provided to ListToolsRequestHandler, including name, description, and input schema.
    { name: "get_transaction", description: "Get transaction details by signature", inputSchema: { type: "object", properties: { signature: { type: "string", description: "Transaction signature" } }, required: ["signature"] } },
  • src/index.ts:1312-1314 (registration)
    Registration/dispatch in the CallToolRequestHandler switch statement that maps the tool name to its handler function.
    case "get_transaction": result = await handleGetTransaction(args); break;

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/ExpertVagabond/solana-mcp-server'

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