Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_cosmos_delegations

Retrieve all staking delegations for a Cosmos blockchain address to monitor validator positions and delegation amounts across networks.

Instructions

Get all staking delegations for a Cosmos address

Input Schema

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

Implementation Reference

  • Core handler implementation: fetches staking delegations for a delegator address using Cosmos SDK REST API endpoint /cosmos/staking/v1beta1/delegations/{address}
    async getDelegations( blockchain: string, delegatorAddress: string, network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<EndpointResponse> { try { const baseUrl = this.getRestUrl(blockchain, network); const url = `${baseUrl}/cosmos/staking/v1beta1/delegations/${delegatorAddress}`; return this.fetchRest(url); } catch (error) { return { success: false, error: error instanceof Error ? error.message : 'Failed to get Cosmos delegations', }; } }
  • Tool dispatch handler: extracts parameters from tool args and calls CosmosService.getDelegations, formats response for MCP
    case 'get_cosmos_delegations': { const blockchain = args?.blockchain as string; const delegatorAddress = args?.delegatorAddress as string; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await cosmosService.getDelegations(blockchain, delegatorAddress, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • Tool schema definition: specifies name, description, input parameters (blockchain, delegatorAddress, optional network), used for registration and validation
    { name: 'get_cosmos_delegations', description: 'Get all staking delegations for a Cosmos address', inputSchema: { type: 'object', properties: { blockchain: { type: 'string', description: 'Blockchain name', }, delegatorAddress: { type: 'string', description: 'Delegator address', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['blockchain', 'delegatorAddress'], }, },

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