Skip to main content
Glama

helius_get_transaction

Retrieve Solana blockchain transaction details using a signature to verify and analyze on-chain activity.

Instructions

Get a transaction by its signature

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
signatureYes
commitmentNo

Implementation Reference

  • The handler function that implements the logic for fetching a Solana transaction by signature using the Helius RPC connection.
    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)}`);
      }
    }
  • The input schema defining parameters for the helius_get_transaction tool: signature (required) and optional commitment level.
    {
      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,
  • src/tools.ts:12-12 (registration)
    Import of the getTransactionHandler from the helius handlers module.
    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