get_vote_accounts
Retrieve Solana voting account details and associated stake info directly from the blockchain using this tool, simplifying access for analysis and monitoring.
Instructions
Returns the account info and associated stake for all the voting accounts in the current bank.
Returns: str: Vote accounts information in the format "Vote accounts: {accounts}"
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.py:366-375 (handler)The handler function for the 'get_vote_accounts' tool, decorated with @mcp.tool() for registration. It queries the Solana RPC for vote accounts and returns formatted information.@mcp.tool() async def get_vote_accounts() -> str: """Returns the account info and associated stake for all the voting accounts in the current bank. Returns: str: Vote accounts information in the format "Vote accounts: {accounts}" """ async with AsyncClient(rpc_url) as client: accounts = await client.get_vote_accounts() return f"Vote accounts: {accounts}"
- src/server.py:366-366 (registration)Registration of the 'get_vote_accounts' tool using the @mcp.tool() decorator.@mcp.tool()