Skip to main content
Glama
laukikk

Alpaca Trading MCP Server

by laukikk

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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" )

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/laukikk/alpaca-mcp'

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