Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_cosmos_transaction

Retrieve Cosmos blockchain transaction details by hash to inspect transfers, fees, and status across mainnet or testnet networks.

Instructions

Get Cosmos transaction by hash

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockchainYesBlockchain name
txHashYesTransaction hash
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • MCP tool handler case: extracts parameters (blockchain, txHash, network) from args and calls cosmosService.getTransaction, formats result as MCP response.
    case 'get_cosmos_transaction': {
      const blockchain = args?.blockchain as string;
      const txHash = args?.txHash as string;
      const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet';
    
      const result = await cosmosService.getTransaction(blockchain, txHash, network);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
        isError: !result.success,
      };
    }
  • Tool schema definition including name, description, and inputSchema for validation.
      name: 'get_cosmos_transaction',
      description: 'Get Cosmos transaction by hash',
      inputSchema: {
        type: 'object',
        properties: {
          blockchain: {
            type: 'string',
            description: 'Blockchain name',
          },
          txHash: {
            type: 'string',
            description: 'Transaction hash',
          },
          network: {
            type: 'string',
            enum: ['mainnet', 'testnet'],
            description: 'Network type (defaults to mainnet)',
          },
        },
        required: ['blockchain', 'txHash'],
      },
    },
  • Core implementation: constructs Cosmos REST API URL for transaction by hash and fetches via internal fetchRest method.
    async getTransaction(
      blockchain: string,
      txHash: string,
      network: 'mainnet' | 'testnet' = 'mainnet'
    ): Promise<EndpointResponse> {
      try {
        const baseUrl = this.getRestUrl(blockchain, network);
        const url = `${baseUrl}/cosmos/tx/v1beta1/txs/${txHash}`;
    
        return this.fetchRest(url);
      } catch (error) {
        return {
          success: false,
          error: error instanceof Error ? error.message : 'Failed to get Cosmos transaction',
        };
      }
    }
  • src/index.ts:88-101 (registration)
    Registers all tool schemas by collecting from registerCosmosHandlers (line 98) into tools array used for ListTools response.
    const tools: Tool[] = [
      ...registerBlockchainHandlers(server, blockchainService),
      ...registerDomainHandlers(server, domainResolver),
      ...registerTransactionHandlers(server, advancedBlockchain),
      ...registerTokenHandlers(server, advancedBlockchain),
      ...registerMultichainHandlers(server, advancedBlockchain),
      ...registerContractHandlers(server, advancedBlockchain),
      ...registerUtilityHandlers(server, advancedBlockchain),
      ...registerEndpointHandlers(server, endpointManager),
      ...registerSolanaHandlers(server, solanaService),
      ...registerCosmosHandlers(server, cosmosService),
      ...registerSuiHandlers(server, suiService),
      ...registerDocsHandlers(server, docsManager),
    ];
  • src/index.ts:114-126 (registration)
    Registers tool execution handler by dispatching CallToolRequest to handleCosmosTool (line 124).
    let result =
      (await handleBlockchainTool(name, args, blockchainService)) ||
      (await handleDomainTool(name, args, domainResolver)) ||
      (await handleTransactionTool(name, args, advancedBlockchain)) ||
      (await handleTokenTool(name, args, advancedBlockchain)) ||
      (await handleMultichainTool(name, args, advancedBlockchain)) ||
      (await handleContractTool(name, args, advancedBlockchain)) ||
      (await handleUtilityTool(name, args, advancedBlockchain)) ||
      (await handleEndpointTool(name, args, endpointManager)) ||
      (await handleSolanaTool(name, args, solanaService)) ||
      (await handleCosmosTool(name, args, cosmosService)) ||
      (await handleSuiTool(name, args, suiService)) ||
      (await handleDocsTool(name, args, docsManager));
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 a read operation ('Get') but doesn't cover aspects like rate limits, authentication needs, error handling, or what the return format looks like (e.g., transaction details). 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 a single, efficient sentence with no wasted words, front-loading the core action ('Get Cosmos transaction by hash'). It's appropriately sized for the tool's straightforward purpose, making it easy to parse quickly.

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?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., transaction status, details) or behavioral traits like performance or errors. For a tool with no structured safety or output info, this leaves critical gaps in understanding its full context.

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?

The input schema has 100% description coverage, clearly documenting all three parameters (blockchain, txHash, network). The description doesn't add any extra meaning beyond this, such as explaining parameter interactions or constraints, so it meets the baseline for high schema coverage without compensating further.

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 verb ('Get') and resource ('Cosmos transaction by hash'), making the purpose specific and understandable. However, it doesn't differentiate from sibling tools like 'get_transaction' or 'get_solana_transaction', which have similar patterns but target different blockchains, leaving some ambiguity in sibling 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 sibling tools like 'search_cosmos_transactions' for broader queries or 'get_transaction' for other blockchains, nor does it specify prerequisites or exclusions, leaving usage context unclear.

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