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"
        )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns account summary with balance and status, but doesn't cover critical aspects like whether this is a read-only operation, authentication requirements, rate limits, or error handling. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and well-structured: it states the purpose in one clear sentence and the return value in another. Every sentence earns its place, with no redundant or unnecessary information, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but has clear gaps. It explains what the tool does and what it returns, but lacks behavioral context (e.g., safety, auth) and usage guidelines. For a basic read operation, this is minimally viable but could be more informative.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the schema description coverage is 100%, so there's no need for parameter details in the description. The baseline for this scenario is 4, as the description appropriately doesn't waste space on non-existent parameters and focuses on the tool's purpose and return value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get current account information.' It specifies the verb ('Get') and resource ('current account information'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_portfolio_summary', which might provide overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, context for usage, or comparisons with sibling tools such as 'get_portfolio_summary'. Without this, an agent might struggle to choose between similar tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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