Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_cosmos_account

Retrieve Cosmos blockchain account details including sequence numbers and account information for transaction processing and wallet management.

Instructions

Get Cosmos account information (sequence, account number)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesCosmos address
blockchainYesBlockchain name
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Tool schema definition including name, description, and input validation schema.
    { name: 'get_cosmos_account', description: 'Get Cosmos account information (sequence, account number)', inputSchema: { type: 'object', properties: { blockchain: { type: 'string', description: 'Blockchain name', }, address: { type: 'string', description: 'Cosmos address', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['blockchain', 'address'], }, },
  • Executes the tool by calling cosmosService.getAccount and formatting the response.
    case 'get_cosmos_account': { const blockchain = args?.blockchain as string; const address = args?.address as string; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await cosmosService.getAccount(blockchain, address, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • Core implementation: constructs REST API URL and fetches account data from Cosmos node.
    async getAccount( blockchain: string, address: string, network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<EndpointResponse> { try { const baseUrl = this.getRestUrl(blockchain, network); const url = `${baseUrl}/cosmos/auth/v1beta1/accounts/${address}`; return this.fetchRest(url); } catch (error) { return { success: false, error: error instanceof Error ? error.message : 'Failed to get Cosmos account', }; } }
  • src/index.ts:98-101 (registration)
    Registers cosmos tools (including schema) by calling registerCosmosHandlers and including in the tools list for MCP server.
    ...registerCosmosHandlers(server, cosmosService), ...registerSuiHandlers(server, suiService), ...registerDocsHandlers(server, docsManager), ];
  • src/index.ts:124-126 (registration)
    Dispatches tool calls to handleCosmosTool based on tool name.
    (await handleCosmosTool(name, args, cosmosService)) || (await handleSuiTool(name, args, suiService)) || (await handleDocsTool(name, args, 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