Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_cosmos_account

Retrieve Cosmos blockchain account details including sequence and account number for transaction processing and wallet management.

Instructions

Get Cosmos account information (sequence, account number)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockchainYesBlockchain name
addressYesCosmos address
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • MCP tool handler implementation for 'get_cosmos_account': extracts parameters, calls cosmosService.getAccount, and returns formatted JSON response.
    case 'get_cosmos_account': {
      const blockchain = args?.blockchain as string;
      const address = args?.address as string;
      const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet';
    
      const result = await cosmosService.getAccount(blockchain, address, network);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
        isError: !result.success,
      };
    }
  • Tool schema definition: name, description, input schema requiring blockchain and address, optional network.
    {
      name: 'get_cosmos_account',
      description: 'Get Cosmos account information (sequence, account number)',
      inputSchema: {
        type: 'object',
        properties: {
          blockchain: {
            type: 'string',
            description: 'Blockchain name',
          },
          address: {
            type: 'string',
            description: 'Cosmos address',
          },
          network: {
            type: 'string',
            enum: ['mainnet', 'testnet'],
            description: 'Network type (defaults to mainnet)',
          },
        },
        required: ['blockchain', 'address'],
      },
    },
  • src/index.ts:87-101 (registration)
    Registration of all tools including cosmos tools via registerCosmosHandlers; tools list used for ListToolsRequestHandler.
    // Register all tools from handlers
    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),
    ];
  • Helper method in CosmosService that constructs REST API URL and fetches account info from /cosmos/auth/v1beta1/accounts/{address}.
    async getAccount(
      blockchain: string,
      address: string,
      network: 'mainnet' | 'testnet' = 'mainnet'
    ): Promise<EndpointResponse> {
      try {
        const baseUrl = this.getRestUrl(blockchain, network);
        const url = `${baseUrl}/cosmos/auth/v1beta1/accounts/${address}`;
    
        return this.fetchRest(url);
      } catch (error) {
        return {
          success: false,
          error: error instanceof Error ? error.message : 'Failed to get Cosmos account',
        };
      }
    }
  • src/index.ts:114-127 (registration)
    Tool execution dispatch in CallToolRequestHandler: routes 'get_cosmos_account' to handleCosmosTool.
    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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves account information but doesn't mention any behavioral traits such as read-only nature, potential rate limits, authentication requirements, error conditions, or what happens if the address is invalid. This leaves significant gaps for an agent to understand how the tool behaves.

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 that front-loads the core purpose without unnecessary words. Every part of the sentence contributes directly to understanding what the tool does, making it appropriately concise and well-structured.

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 for a tool with 3 parameters and no structured behavioral hints. It doesn't cover what the return data looks like, error handling, or usage context relative to siblings. For a read operation in a complex domain with many alternatives, this leaves too many gaps for reliable agent use.

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 schema description coverage is 100%, with all parameters clearly documented in the input schema. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., it doesn't explain what 'sequence' or 'account number' mean in context of the parameters). This meets the baseline of 3 when 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 tool's purpose with a specific verb ('Get') and resource ('Cosmos account information'), and specifies the data returned (sequence, account number). However, it doesn't explicitly differentiate from sibling tools like 'get_cosmos_balance' or 'get_cosmos_delegations', which target different account data aspects.

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. With many sibling tools available for Cosmos data (e.g., get_cosmos_balance, get_cosmos_delegations), there's no indication of what makes this tool distinct or when it's the appropriate choice over others.

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