Skip to main content
Glama

get-transaction

Retrieve blockchain transaction details using transaction hashes or chain identifiers to verify and analyze on-chain activity through secure wallet integration.

Instructions

Get the transactions given hashes or chain identifiers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYes
chainIdNo

Implementation Reference

  • Handler function that retrieves the transaction using wagmi's getTransaction based on hash and optional chainId, then returns it as JSON stringified text content.
    execute: async (args) => {
      const hash = args.hash as Address
      const chainId = args.chainId as typeof wagmiConfig['chains'][number]['id']
      const result = await getTransaction(wagmiConfig, {
        hash,
        chainId,
      })
      return {
        content: [
          {
            type: "text",
            text: JSONStringify(result),
          },
        ],
      }
    },
  • Zod schema defining the input parameters: hash (string) and optional chainId (number).
    parameters: z.object({
      hash: z.string(),
      chainId: z.coerce.number().optional(),
    }),
  • Registers the get-transaction tool on the FastMCP server instance.
    registerGetTransactionTools(server);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It only states what the tool does ('Get the transactions'), without mentioning whether it's a read-only operation, what permissions are needed, how it handles multiple inputs, or what happens with invalid parameters. This leaves significant behavioral gaps for a tool that likely queries blockchain data.

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

Conciseness4/5

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

The description is a single, efficient sentence that gets straight to the point without unnecessary words. While it could be more informative, it's appropriately sized for what it communicates and doesn't waste space with redundant phrasing.

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

Completeness2/5

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

For a blockchain transaction query tool with 2 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain return values, error conditions, or the relationship between hash and chainId parameters. Given the complexity of blockchain operations and lack of structured documentation, this leaves too many gaps for reliable tool invocation.

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

Parameters2/5

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

With 0% schema description coverage for 2 parameters, the description must compensate but only vaguely mentions 'hashes or chain identifiers'. It doesn't explain what format the hash should be (e.g., transaction hash, hex string), what the chainId represents, whether both parameters are required together, or provide examples. This adds minimal value beyond the bare schema.

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

Purpose3/5

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

The description states the tool's purpose as 'Get the transactions given hashes or chain identifiers', which is a clear verb+resource combination. However, it doesn't differentiate from sibling tools like 'get-transaction-receipt' or 'get-block', making it somewhat vague about its specific scope within the blockchain context.

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, exclusions, or compare it to similar tools like 'get-transaction-receipt' or 'get-block', leaving the agent with no usage context beyond the basic purpose.

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/Xiawpohr/mcpilot'

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