Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_solana_transaction

Retrieve Solana transaction details using a signature to inspect blockchain activity, verify transfers, or analyze network interactions.

Instructions

Get Solana transaction details by signature

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
signatureYesTransaction signature
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • MCP tool handler logic in handleSolanaTool switch statement: extracts signature and network, delegates to SolanaService.getTransaction, returns JSON-formatted response or error.
    case 'get_solana_transaction': {
      const signature = args?.signature as string;
      const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet';
    
      const result = await solanaService.getTransaction(signature, network);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
        isError: !result.success,
      };
    }
  • SolanaService.getTransaction method: retrieves Solana RPC service and calls 'getTransaction' RPC method with jsonParsed encoding and version 0 support.
    async getTransaction(
      signature: string,
      network: 'mainnet' | 'testnet' = 'mainnet'
    ): Promise<EndpointResponse> {
      const service = this.blockchainService.getServiceByBlockchain('solana', network);
    
      if (!service) {
        return {
          success: false,
          error: `Solana service not found for ${network}`,
        };
      }
    
      return this.blockchainService.callRPCMethod(
        service.id,
        'getTransaction',
        [
          signature,
          {
            encoding: 'jsonParsed',
            maxSupportedTransactionVersion: 0,
          },
        ]
      );
    }
  • Input schema definition for the tool, specifying required 'signature' parameter and optional 'network'.
    {
      name: 'get_solana_transaction',
      description: 'Get Solana transaction details by signature',
      inputSchema: {
        type: 'object',
        properties: {
          signature: {
            type: 'string',
            description: 'Transaction signature',
          },
          network: {
            type: 'string',
            enum: ['mainnet', 'testnet'],
            description: 'Network type (defaults to mainnet)',
          },
        },
        required: ['signature'],
      },
    },
  • registerSolanaHandlers function that defines and returns the Tool[] array including get_solana_transaction for registration with MCP server.
    export function registerSolanaHandlers(
      server: Server,
      solanaService: SolanaService
    ): Tool[] {
      const tools: Tool[] = [
        {
          name: 'get_solana_token_balance',
          description: 'Get SPL token balance(s) for a Solana wallet',
          inputSchema: {
            type: 'object',
            properties: {
              walletAddress: {
                type: 'string',
                description: 'Solana wallet address',
              },
              mintAddress: {
                type: 'string',
                description: 'Optional: SPL token mint address (if not provided, returns all token balances)',
              },
              network: {
                type: 'string',
                enum: ['mainnet', 'testnet'],
                description: 'Network type (defaults to mainnet)',
              },
            },
            required: ['walletAddress'],
          },
        },
        {
          name: 'get_solana_token_metadata',
          description: 'Get SPL token metadata (decimals, supply, authorities)',
          inputSchema: {
            type: 'object',
            properties: {
              mintAddress: {
                type: 'string',
                description: 'SPL token mint address',
              },
              network: {
                type: 'string',
                enum: ['mainnet', 'testnet'],
                description: 'Network type (defaults to mainnet)',
              },
            },
            required: ['mintAddress'],
          },
        },
        {
          name: 'get_solana_balance',
          description: 'Get SOL balance for a Solana address',
          inputSchema: {
            type: 'object',
            properties: {
              address: {
                type: 'string',
                description: 'Solana address',
              },
              network: {
                type: 'string',
                enum: ['mainnet', 'testnet'],
                description: 'Network type (defaults to mainnet)',
              },
            },
            required: ['address'],
          },
        },
        {
          name: 'get_solana_account_info',
          description: 'Get Solana account information',
          inputSchema: {
            type: 'object',
            properties: {
              address: {
                type: 'string',
                description: 'Solana address',
              },
              network: {
                type: 'string',
                enum: ['mainnet', 'testnet'],
                description: 'Network type (defaults to mainnet)',
              },
            },
            required: ['address'],
          },
        },
        {
          name: 'get_solana_block',
          description: 'Get Solana block information with optional transactions',
          inputSchema: {
            type: 'object',
            properties: {
              slot: {
                type: 'number',
                description: 'Block slot number',
              },
              includeTransactions: {
                type: 'boolean',
                description: 'Include full transaction details (default: false)',
              },
              network: {
                type: 'string',
                enum: ['mainnet', 'testnet'],
                description: 'Network type (defaults to mainnet)',
              },
            },
            required: ['slot'],
          },
        },
        {
          name: 'get_solana_transaction',
          description: 'Get Solana transaction details by signature',
          inputSchema: {
            type: 'object',
            properties: {
              signature: {
                type: 'string',
                description: 'Transaction signature',
              },
              network: {
                type: 'string',
                enum: ['mainnet', 'testnet'],
                description: 'Network type (defaults to mainnet)',
              },
            },
            required: ['signature'],
          },
        },
        {
          name: 'get_solana_prioritization_fees',
          description: 'Get recent prioritization fees for Solana transactions',
          inputSchema: {
            type: 'object',
            properties: {
              addresses: {
                type: 'array',
                items: { type: 'string' },
                description: 'Optional: Account addresses to get fees for',
              },
              network: {
                type: 'string',
                enum: ['mainnet', 'testnet'],
                description: 'Network type (defaults to mainnet)',
              },
            },
          },
        },
        {
          name: 'get_solana_block_height',
          description: 'Get the latest Solana block height',
          inputSchema: {
            type: 'object',
            properties: {
              network: {
                type: 'string',
                enum: ['mainnet', 'testnet'],
                description: 'Network type (defaults to mainnet)',
              },
            },
          },
        },
        {
          name: 'get_solana_fee_for_message',
          description: 'Estimate fee for a serialized Solana message (base64)',
          inputSchema: {
            type: 'object',
            properties: {
              message: {
                type: 'string',
                description: 'Serialized message in base64',
              },
              network: {
                type: 'string',
                enum: ['mainnet', 'testnet'],
                description: 'Network type (defaults to mainnet)',
              },
            },
            required: ['message'],
          },
        },
        {
          name: 'get_solana_program_accounts',
          description: 'Get accounts owned by a Solana program with optional filters',
          inputSchema: {
            type: 'object',
            properties: {
              programId: {
                type: 'string',
                description: 'Program ID (public key)',
              },
              filters: {
                type: 'array',
                description: 'Optional RPC filters (memcmp, dataSize, etc.)',
                items: { type: 'object' },
              },
              network: {
                type: 'string',
                enum: ['mainnet', 'testnet'],
                description: 'Network type (defaults to mainnet)',
              },
            },
            required: ['programId'],
          },
        },
        {
          name: 'get_solana_signatures',
          description: 'Get transaction signatures for a Solana address (transaction history)',
          inputSchema: {
            type: 'object',
            properties: {
              address: {
                type: 'string',
                description: 'Solana address',
              },
              limit: {
                type: 'number',
                description: 'Maximum number of signatures to return (default: 10)',
              },
              network: {
                type: 'string',
                enum: ['mainnet', 'testnet'],
                description: 'Network type (defaults to mainnet)',
              },
            },
            required: ['address'],
          },
        },
      ];
    
      return tools;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'gets' details, implying a read-only operation, but doesn't clarify what 'details' include (e.g., status, timestamp, involved accounts), whether it requires API keys or rate limits, or how errors are handled (e.g., invalid signature). For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It front-loads the core purpose ('Get Solana transaction details') and specifies the key input ('by signature'), making it immediately actionable. Every part of the description earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (fetching transaction data), lack of annotations, and no output schema, the description is minimally adequate. It covers the purpose and key parameter but lacks details on behavior, error handling, or return values. For a read operation with 100% schema coverage, it meets basic needs but could be more informative to fully guide an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear documentation for both parameters ('signature' and 'network' with enum values). The description mentions 'by signature,' aligning with the required parameter, but adds no additional semantic context beyond what the schema provides (e.g., signature format, network implications). Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('Solana transaction details by signature'), making the purpose immediately understandable. It distinguishes from siblings like 'get_solana_account_info' or 'get_solana_block' by focusing specifically on transaction details. However, it doesn't explicitly differentiate from 'get_transaction' (which appears to be generic) or 'get_solana_signatures' (which likely lists signatures rather than details).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid signature), compare to siblings like 'get_transaction' (which might handle multiple blockchains), or indicate scenarios where other tools like 'get_solana_block' (for block-level data) might be more appropriate. Usage is implied only by the tool name and description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/buildwithgrove/mcp-pocket'

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