Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_cosmos_proposals

Retrieve governance proposals from Cosmos blockchains to track voting status, monitor active discussions, and analyze community decisions across networks.

Instructions

Get governance proposals on a Cosmos chain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockchainYesBlockchain name
networkNoNetwork type (defaults to mainnet)
statusNoOptional: Filter by proposal status

Implementation Reference

  • Core handler implementation that constructs the REST API URL for Cosmos governance proposals and fetches the data.
    async getProposals( blockchain: string, status?: 'deposit_period' | 'voting_period' | 'passed' | 'rejected' | 'failed', network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<EndpointResponse> { try { const baseUrl = this.getRestUrl(blockchain, network); const statusFilter = status ? `?proposal_status=${status}` : ''; const url = `${baseUrl}/cosmos/gov/v1beta1/proposals${statusFilter}`; return this.fetchRest(url); } catch (error) { return { success: false, error: error instanceof Error ? error.message : 'Failed to get Cosmos proposals', }; } }
  • MCP tool dispatcher handler that parses input arguments and calls the CosmosService.getProposals method.
    case 'get_cosmos_proposals': { const blockchain = args?.blockchain as string; const status = args?.status as | 'deposit_period' | 'voting_period' | 'passed' | 'rejected' | 'failed' | undefined; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await cosmosService.getProposals(blockchain, status, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • Tool registration in the registerCosmosHandlers function, defining name, description, and input schema.
    { name: 'get_cosmos_proposals', description: 'Get governance proposals on a Cosmos chain', inputSchema: { type: 'object', properties: { blockchain: { type: 'string', description: 'Blockchain name', }, status: { type: 'string', enum: ['deposit_period', 'voting_period', 'passed', 'rejected', 'failed'], description: 'Optional: Filter by proposal status', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['blockchain'], }, },
  • src/index.ts:97-101 (registration)
    Registration of cosmos tools to the MCP server by including in the tools list used for ListToolsRequestHandler.
    ...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