get_account_info_tool
Retrieve current account details including balance and status for trading portfolio management through the Alpaca Trading MCP Server.
Instructions
Get current account information.
Returns: Account summary with balance and status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.py:249-267 (handler)The handler function for the get_account_info_tool, decorated with @mcp.tool(). It fetches the account information using calls.get_account(trading_client) and formats it into a readable string summary including status, cash, portfolio value, buying power, equity, daytrade count, and pattern day trader status.@mcp.tool() def get_account_info_tool() -> str: """ Get current account information. Returns: Account summary with balance and status """ account = calls.get_account(trading_client) return ( f"Account Summary:\n" f"Status: {account.status}\n" f"Cash: ${account.cash:.2f}\n" f"Portfolio Value: ${account.portfolio_value:.2f}\n" f"Buying Power: ${account.buying_power:.2f}\n" f"Equity: ${account.equity:.2f}\n" f"Daytrade Count: {account.daytrade_count}\n" f"Pattern Day Trader: {account.pattern_day_trader}\n" )