Skip to main content
Glama

get_stake_balances

Retrieve staked SOL (jupSOL) balances using the MCP server for blockchain integration, simplifying crypto asset tracking and management.

Instructions

Get the balance of staked SOL (jupSOL). Returns a StakeBalanceResponse.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler function for 'get_stake_balances'. Registers the tool via @mcp.tool() decorator and delegates to armor_client.get_stake_balances(), handling errors.
    @mcp.tool() async def get_stake_balances() -> StakeBalanceResponse: """ Get the balance of staked SOL (jupSOL). Returns a StakeBalanceResponse. """ if not armor_client: return [{"error": "Not logged in"}] try: result: StakeBalanceResponse = await armor_client.get_stake_balances() return result except Exception as e: return [{"error": str(e)}]
  • Core implementation in ArmorWalletAPIClient that performs the HTTP GET request to retrieve stake balances from the API endpoint.
    async def get_stake_balances(self) -> StakeBalanceResponse: """Get the stake balances.""" return await self._api_call("GET", "frontend/wallets/stake/balance/")
  • Pydantic model defining the output schema for stake balances: total_stake_amount and total_stake_amount_in_usd.
    class StakeBalanceResponse(BaseModel): total_stake_amount: float = Field(description="Total stake balance in jupSol") total_stake_amount_in_usd: float = Field(description="Total stake balance in USD")
  • The @mcp.tool() decorator registers this function as the MCP tool named 'get_stake_balances'.
    @mcp.tool() async def get_stake_balances() -> StakeBalanceResponse: """ Get the balance of staked SOL (jupSOL). Returns a StakeBalanceResponse. """ if not armor_client: return [{"error": "Not logged in"}] try: result: StakeBalanceResponse = await armor_client.get_stake_balances() return result except Exception as e: return [{"error": str(e)}]

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/armorwallet/armor-crypto-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server