Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_cosmos_params

Retrieve Cosmos blockchain module parameters for staking, slashing, distribution, governance, and minting functions across mainnet and testnet networks.

Instructions

Get chain parameters for a Cosmos module

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockchainYesBlockchain name
moduleYesModule to query parameters for
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Executes the get_cosmos_params tool by parsing arguments and delegating to CosmosService.getParams
    case 'get_cosmos_params': { const blockchain = args?.blockchain as string; const module = args?.module as 'staking' | 'slashing' | 'distribution' | 'gov' | 'mint'; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await cosmosService.getParams(blockchain, module, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • Input schema and metadata definition for the get_cosmos_params tool
    { name: 'get_cosmos_params', description: 'Get chain parameters for a Cosmos module', inputSchema: { type: 'object', properties: { blockchain: { type: 'string', description: 'Blockchain name', }, module: { type: 'string', enum: ['staking', 'slashing', 'distribution', 'gov', 'mint'], description: 'Module to query parameters for', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['blockchain', 'module'], }, },
  • Core helper method that constructs the REST API URL and fetches module parameters from the Cosmos chain
    async getParams( blockchain: string, module: 'staking' | 'slashing' | 'distribution' | 'gov' | 'mint', network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<EndpointResponse> { try { const baseUrl = this.getRestUrl(blockchain, network); const url = `${baseUrl}/cosmos/${module}/v1beta1/params`; return this.fetchRest(url); } catch (error) { return { success: false, error: error instanceof Error ? error.message : 'Failed to get Cosmos params', }; } }
  • src/index.ts:88-101 (registration)
    The cosmos tools, including get_cosmos_params, are registered by including registerCosmosHandlers in the global tools list for MCP tool discovery
    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), ];

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