Skip to main content
Glama

helius_get_transaction

Retrieve transaction details from the Solana blockchain using its signature. Specify commitment level (confirmed, finalized, or processed) to access accurate and up-to-date data via the Helius API.

Instructions

Get a transaction by its signature

Input Schema

NameRequiredDescriptionDefault
commitmentNo
signatureYes

Input Schema (JSON Schema)

{ "properties": { "commitment": { "enum": [ "confirmed", "finalized", "processed" ], "type": "string" }, "signature": { "type": "string" } }, "required": [ "signature" ], "type": "object" }

Implementation Reference

  • The main handler function that fetches a transaction using the Helius SDK by signature and commitment level, returning JSON details or error.
    export const getTransactionHandler = async (input: GetTransactionInput): Promise<ToolResultSchema> => { try { // Use the newer signature with explicit config object const transaction = await (helius as any as Helius).connection.getTransaction( input.signature, { maxSupportedTransactionVersion: 0, commitment: input.commitment as any } ); if (!transaction) { return createErrorResponse(`Transaction not found for signature: ${input.signature}`); } return createSuccessResponse(`Transaction details: ${JSON.stringify(transaction, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting transaction: ${error instanceof Error ? error.message : String(error)}`); } }
  • Input schema definition for the helius_get_transaction tool, specifying signature as required and optional commitment.
    { name: "helius_get_transaction", description: "Get a transaction by its signature", inputSchema: { type: "object", properties: { signature: { type: "string" }, commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: ["signature"] } },
  • src/tools.ts:558-558 (registration)
    Registration of the tool name to its handler function in the handlers dictionary.
    "helius_get_transaction": getTransactionHandler,

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/dcSpark/mcp-server-helius'

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