Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_transaction

Retrieve confirmed transaction details on the Solana blockchain by providing a transaction hash. Ideal for verifying transaction status and analyzing blockchain activity.

Instructions

Returns transaction details for a confirmed transaction.

Args: hash (str): Transaction signature as base-58 encoded string

Returns: str: Transaction details in the format "Transaction: {transaction}"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYes

Implementation Reference

  • The main handler function for the get_transaction tool. It is decorated with @mcp.tool() which registers it as an MCP tool. It takes a transaction hash as input, queries the Solana RPC client for the transaction details, and returns a formatted string with the transaction information.
    @mcp.tool()
    async def get_transaction(hash: str) -> str:
        """Returns transaction details for a confirmed transaction.
    
        Args:
            hash (str): Transaction signature as base-58 encoded string
    
        Returns:
            str: Transaction details in the format "Transaction: {transaction}"
        """
        async with AsyncClient(rpc_url) as client:
            transaction = await client.get_transaction(
                Signature.from_string(hash), max_supported_transaction_version=0
            )
            return f"Transaction: {transaction}"
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool returns details for 'confirmed' transactions, which is a useful behavioral constraint. However, it lacks information on error handling (e.g., if the hash is invalid or transaction is unconfirmed), rate limits, authentication needs, or the format of returned details beyond a vague string. This is a significant gap for a tool with no annotation coverage.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by structured 'Args' and 'Returns' sections. Every sentence adds value, with no redundant or vague language. The structure enhances readability for an AI agent.

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 (single parameter, no output schema, no annotations), the description is partially complete. It covers the purpose and parameter semantics well but lacks usage guidelines and sufficient behavioral context (e.g., error cases, output details). For a read operation with no annotations, more guidance on behavior would improve completeness.

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

Parameters4/5

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

The description adds meaningful semantics beyond the input schema. The schema has 0% description coverage, only indicating 'hash' is a required string. The description specifies that 'hash' is a 'Transaction signature as base-58 encoded string', clarifying the parameter's purpose and format. This compensates well for the low schema coverage, though it doesn't detail validation rules or examples.

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 tool's purpose: 'Returns transaction details for a confirmed transaction.' It specifies the verb ('returns') and resource ('transaction details'), distinguishing it from siblings like 'confirm_transaction' or 'get_transaction_count'. However, it doesn't explicitly differentiate from 'get_signatures_for_address' or 'get_signature_statuses', which might also relate to transactions.

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., transaction must be confirmed), exclusions, or comparisons to sibling tools like 'get_signature_statuses' or 'get_transaction_count'. The agent must infer usage from the name and description alone.

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

Related 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/tywenk/mcp-sol'

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