Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_cosmos_balance

Retrieve Cosmos blockchain balance for any address across multiple chains like Osmosis, Juno, or Kava. Specify blockchain, address, and optional denomination to query token holdings.

Instructions

Get balance for a Cosmos SDK address on any Cosmos chain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockchainYesBlockchain name (e.g., "osmosis", "juno", "kava", "akash")
addressYesCosmos address
denomNoOptional: Specific denomination to query (e.g., "uosmo", "ujuno")
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • The handler case for 'get_cosmos_balance' in handleCosmosTool function. Extracts input parameters, calls cosmosService.getBalance, and formats the response.
    case 'get_cosmos_balance': {
      const blockchain = args?.blockchain as string;
      const address = args?.address as string;
      const denom = args?.denom as string | undefined;
      const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet';
    
      const result = await cosmosService.getBalance(blockchain, address, denom, network);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
        isError: !result.success,
      };
    }
  • Tool registration in registerCosmosHandlers function, including name, description, and input schema definition.
    {
      name: 'get_cosmos_balance',
      description: 'Get balance for a Cosmos SDK address on any Cosmos chain',
      inputSchema: {
        type: 'object',
        properties: {
          blockchain: {
            type: 'string',
            description: 'Blockchain name (e.g., "osmosis", "juno", "kava", "akash")',
          },
          address: {
            type: 'string',
            description: 'Cosmos address',
          },
          denom: {
            type: 'string',
            description: 'Optional: Specific denomination to query (e.g., "uosmo", "ujuno")',
          },
          network: {
            type: 'string',
            enum: ['mainnet', 'testnet'],
            description: 'Network type (defaults to mainnet)',
          },
        },
        required: ['blockchain', 'address'],
      },
    },
  • Input schema for the get_cosmos_balance tool, defining parameters like blockchain, address, denom, and network.
    inputSchema: {
      type: 'object',
      properties: {
        blockchain: {
          type: 'string',
          description: 'Blockchain name (e.g., "osmosis", "juno", "kava", "akash")',
        },
        address: {
          type: 'string',
          description: 'Cosmos address',
        },
        denom: {
          type: 'string',
          description: 'Optional: Specific denomination to query (e.g., "uosmo", "ujuno")',
        },
        network: {
          type: 'string',
          enum: ['mainnet', 'testnet'],
          description: 'Network type (defaults to mainnet)',
        },
      },
      required: ['blockchain', 'address'],
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool's function but doesn't disclose behavioral traits like whether it's read-only (implied but not stated), rate limits, authentication needs, error conditions, or what happens with invalid inputs. The description is minimal and lacks operational context.

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 waste. It's front-loaded with the core purpose and appropriately sized for a straightforward query tool.

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?

For a read-only query tool with 100% schema coverage but no annotations or output schema, the description is adequate but minimal. It covers the purpose but lacks context on behavior, error handling, or output format, which could be helpful given the complexity of blockchain queries.

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%, so parameters are well-documented in the schema. The description adds no additional parameter semantics beyond implying 'any Cosmos chain' relates to the blockchain parameter. Baseline 3 is appropriate since the schema does the heavy lifting.

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

Purpose5/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 'balance', specifies the target 'Cosmos SDK address', and indicates scope 'on any Cosmos chain'. It distinguishes from siblings like get_cosmos_all_balances (which returns all balances) and get_cosmos_account (which returns account details).

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

Usage Guidelines3/5

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

The description implies usage for balance queries on Cosmos chains, but doesn't explicitly state when to use this vs. alternatives like get_cosmos_all_balances or get_historical_balance. No exclusion criteria or prerequisites are mentioned, leaving usage context partially implied.

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