Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_cosmos_proposal

Retrieve governance proposal details for Cosmos-based blockchains to analyze voting status, parameters, and decision outcomes.

Instructions

Get specific governance proposal details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockchainYesBlockchain name
proposalIdYesProposal ID
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Tool schema and definition for get_cosmos_proposal, defining input parameters and description.
    { name: 'get_cosmos_proposal', description: 'Get specific governance proposal details', inputSchema: { type: 'object', properties: { blockchain: { type: 'string', description: 'Blockchain name', }, proposalId: { type: 'number', description: 'Proposal ID', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['blockchain', 'proposalId'], }, },
  • Handler execution logic within handleCosmosTool switch statement for get_cosmos_proposal.
    case 'get_cosmos_proposal': { const blockchain = args?.blockchain as string; const proposalId = args?.proposalId as number; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await cosmosService.getProposal(blockchain, proposalId, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • Core helper function in CosmosService that performs the HTTP GET request to retrieve the specific proposal details from the Cosmos Gov REST API.
    async getProposal( blockchain: string, proposalId: number, network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<EndpointResponse> { try { const baseUrl = this.getRestUrl(blockchain, network); const url = `${baseUrl}/cosmos/gov/v1beta1/proposals/${proposalId}`; return this.fetchRest(url); } catch (error) { return { success: false, error: error instanceof Error ? error.message : 'Failed to get Cosmos proposal', }; } }
  • src/index.ts:88-101 (registration)
    Registration of all tools including cosmos tools (via registerCosmosHandlers) into the MCP server's tools list, provided via ListToolsRequestHandler.
    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