Skip to main content
Glama
zionto

ibkr-mcp

by zionto

flex_parse_trades

Extract trade records from Interactive Brokers Flex XML reports. Filter by symbol, asset category, or date range to get structured JSON trade data with count.

Instructions

Extract trade records from a Flex XML report.

Args: xml_content: Raw Flex XML string. symbol: Filter by ticker symbol (case-insensitive, optional). asset_category: Filter by asset category e.g. STK, OPT, FUT (optional). from_date: Earliest trade date to include, YYYY-MM-DD (optional). to_date: Latest trade date to include, YYYY-MM-DD (optional).

Returns JSON: {"count": N, "trades": [...]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolNo
to_dateNo
from_dateNo
xml_contentYes
asset_categoryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/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. It discloses the return format (JSON with count and trades) and mentions filtering options, but does not discuss error handling, malformed XML behavior, or performance characteristics.

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 concise and well-structured with an Args section and Returns line. Every sentence provides value, and there is no fluff.

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

Completeness4/5

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

The description covers purpose, parameters, and return format, which is adequate for a straightforward parsing tool. However, it lacks error-handling details and explicit usage context, slightly reducing completeness.

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

Parameters5/5

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

The schema has no descriptions (0% coverage), but the tool description provides detailed parameter explanations: symbol filtering is case-insensitive, asset_category includes examples, and date format is YYYY-MM-DD. This adds significant meaning beyond the schema.

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

Purpose5/5

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

The description 'Extract trade records from a Flex XML report' uses a specific verb and resource, clearly stating the tool's function. It distinguishes from sibling tools like flex_parse_positions by focusing on 'trades'.

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

Usage Guidelines3/5

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

The purpose implies usage for parsing trade records, but there is no explicit guidance on when to use this tool versus alternatives or mention of exclusions. The description lacks contrast with sibling parsing 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/zionto/ibkr-mcp'

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