Skip to main content
Glama
nadavgb-atom

ib-async-mcp

by nadavgb-atom

get_open_trades

Retrieve all currently active trades from Interactive Brokers accounts to monitor positions and track ongoing market activity.

Instructions

Get all open trades.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation of the get_open_trades tool handler, which retrieves open trades using `ib.openTrades()` and serializes them for the response.
    if name == "get_open_trades":
        trades = ib.openTrades()
        return [{
            "order_id": t.order.orderId,
            "symbol": t.contract.symbol,
            "action": t.order.action,
            "quantity": t.order.totalQuantity,
            "order_type": t.order.orderType,
            "status": t.orderStatus.status,
            "filled": t.orderStatus.filled,
            "remaining": t.orderStatus.remaining,
        } for t in trades]
  • The tool 'get_open_trades' is registered in the list of available tools.
    Tool(
        name="get_open_trades",
        description="Get all open trades.",
        inputSchema={"type": "object", "properties": {}},
    ),
Behavior2/5

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

No annotations provided, and the description adds minimal behavioral context beyond the name. Does not clarify what constitutes an 'open' trade, whether data is real-time or cached, or return format.

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

Conciseness4/5

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

Extremely brief at four words with no waste, though arguably too terse given the domain complexity. Structure is front-loaded but lacks the substance needed for a financial API tool.

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 complex trading domain with numerous sibling tools that have overlapping concerns, the description is insufficient. It should explain the relationship between trades, orders, and positions, and ideally mention return structure.

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?

Zero parameters present, which sets a baseline of 4 per scoring rules. The description adds no parameter information, but none is needed.

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

Purpose3/5

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

States the verb (Get) and resource (open trades) clearly, but fails to distinguish from siblings like 'get_open_orders' or 'get_positions' in a trading domain where these are distinct concepts (trades=executed, orders=pending, positions=holdings).

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?

Provides no guidance on when to use this tool versus 'get_open_orders', 'get_positions', or 'get_portfolio'. In trading APIs, these distinctions are critical for correct agent behavior.

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