get_transaction
Retrieve detailed transaction information from the Solana blockchain using a transaction signature to verify and analyze on-chain activity.
Instructions
Get transaction details by signature
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| signature | Yes | Transaction signature |
Implementation Reference
- src/index.ts:775-796 (handler)The handler function that executes the get_transaction tool logic by fetching transaction details from the Solana RPC using connection.getTransaction.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 }; }
- src/index.ts:226-239 (schema)The tool schema definition including name, description, and inputSchema for validating the 'signature' parameter.{ 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)The switch case registration that dispatches calls to the get_transaction handler function.case "get_transaction": result = await handleGetTransaction(args); break;