Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_cosmos_validators

Retrieve validator lists for Cosmos blockchains with status filtering to monitor network participation and security.

Instructions

Get list of validators on a Cosmos chain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockchainYesBlockchain name
statusNoValidator status filter (defaults to bonded)
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • MCP tool handler logic that parses input arguments and delegates to CosmosService.getValidators for execution
    case 'get_cosmos_validators': {
      const blockchain = args?.blockchain as string;
      const status = (args?.status as 'bonded' | 'unbonded' | 'unbonding' | 'all') || 'bonded';
      const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet';
    
      const result = await cosmosService.getValidators(blockchain, status, network);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
        isError: !result.success,
      };
    }
  • Core implementation that constructs the Cosmos Staking REST API endpoint for validators and performs the HTTP fetch
    async getValidators(
      blockchain: string,
      status: 'bonded' | 'unbonded' | 'unbonding' | 'all' = 'bonded',
      network: 'mainnet' | 'testnet' = 'mainnet'
    ): Promise<EndpointResponse> {
      try {
        const baseUrl = this.getRestUrl(blockchain, network);
        const statusFilter = status === 'all' ? '' : `?status=${status.toUpperCase()}`;
        const url = `${baseUrl}/cosmos/staking/v1beta1/validators${statusFilter}`;
    
        return this.fetchRest(url);
      } catch (error) {
        return {
          success: false,
          error: error instanceof Error ? error.message : 'Failed to get Cosmos validators',
        };
      }
    }
  • Tool schema definition including input parameters, types, and descriptions for validation and documentation
    {
      name: 'get_cosmos_validators',
      description: 'Get list of validators on a Cosmos chain',
      inputSchema: {
        type: 'object',
        properties: {
          blockchain: {
            type: 'string',
            description: 'Blockchain name',
          },
          status: {
            type: 'string',
            enum: ['bonded', 'unbonded', 'unbonding', 'all'],
            description: 'Validator status filter (defaults to bonded)',
          },
          network: {
            type: 'string',
            enum: ['mainnet', 'testnet'],
            description: 'Network type (defaults to mainnet)',
          },
        },
        required: ['blockchain'],
      },
    },
  • src/index.ts:98-98 (registration)
    Registers all Cosmos tools, including get_cosmos_validators, with the MCP server instance
    ...registerCosmosHandlers(server, cosmosService),
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It doesn't disclose whether this is a read-only operation, what permissions are needed, rate limits, pagination behavior, or response format. 'Get list' implies reading, but critical operational details are missing.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized for a straightforward query tool and front-loads the core functionality.

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 query tool with no annotations and no output schema, the description is minimally adequate but leaves gaps. It identifies the resource but doesn't explain what information validators include, how results are structured, or behavioral constraints. The high schema coverage helps, but more context would improve completeness.

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 fully documented in the schema. The description adds no additional parameter context beyond implying a Cosmos chain context. This meets the baseline for high schema coverage but doesn't enhance understanding.

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 action ('Get list') and resource ('validators on a Cosmos chain'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_cosmos_validator' (singular) or explain scope differences, preventing a perfect score.

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?

No guidance is provided about when to use this tool versus alternatives like 'get_cosmos_validator' (singular validator) or other Cosmos query tools. The description lacks context about use cases, prerequisites, or exclusions.

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