Skip to main content
Glama
nadavgb-atom

ib-async-mcp

by nadavgb-atom

get_pnl

Retrieve profit and loss data for Interactive Brokers accounts to track trading performance and financial outcomes.

Instructions

Get profit and loss.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoAccount ID (optional)

Implementation Reference

  • The `get_pnl` tool handler function, which calls `ib.pnl` and formats the results.
    if name == "get_pnl":
        pnl_list = ib.pnl(args.get("account", ""))
        return [{
            "account": p.account,
            "daily_pnl": p.dailyPnL,
            "unrealized_pnl": p.unrealizedPnL,
            "realized_pnl": p.realizedPnL,
        } for p in pnl_list]
  • Registration of the `get_pnl` tool in the `list_tools` function.
    Tool(
        name="get_pnl",
        description="Get profit and loss.",
        inputSchema={
            "type": "object",
            "properties": {
                "account": {"type": "string", "description": "Account ID (optional)"},
            },
        },
    ),
Behavior2/5

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

No annotations are provided, placing the full burden on the description, which fails to disclose behavioral traits such as whether the data is real-time or historical, if it includes commissions/fees, caching behavior, or required permissions. The description merely states the action without operational context.

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

Conciseness3/5

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

While appropriately brief at three words, the description wastes its limited length by providing only minimal information. It is front-loaded with the verb but fails to include qualifying clauses that could clarify scope or constraints, resulting in under-specification rather than efficient precision.

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

Completeness2/5

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

Given the financial trading context with numerous related data tools and no output schema, the description is inadequate. It should clarify the temporal scope, PnL calculation methodology, and differentiation from account summary tools, but provides only a bare label.

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

Parameters3/5

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

With schema description coverage at 100%, the baseline score is 3. The description adds no meaningful context about the optional 'account' parameter (e.g., what happens if omitted, format expectations) beyond what the schema already documents.

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

Purpose2/5

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

The description 'Get profit and loss' essentially restates the tool name (get_pnl) by expanding the acronym, functioning as a near-tautology. While it identifies the resource, it fails to specify scope (daily vs. total, realized vs. unrealized) or distinguish from siblings like get_account_summary or get_portfolio.

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?

No guidance is provided on when to use this tool versus alternatives such as get_account_summary, get_portfolio, or get_positions. Given the presence of multiple account data retrieval siblings, the absence of discriminatory guidance is a significant gap.

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/nadavgb-atom/ib-async-mcp'

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