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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- armor_crypto_mcp/armor_mcp.py:578-592 (handler)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")
- armor_crypto_mcp/armor_mcp.py:578-592 (registration)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)}]