Skip to main content
Glama
zionto

ibkr-mcp

by zionto

flex_parse_positions

Extract open positions from a Flex XML report, optionally filtering by symbol or asset category, and get a JSON with count and positions.

Instructions

Extract open position 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).

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolNo
xml_contentYes
asset_categoryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosing behavior. It states the return format ('Returns JSON: {"count": N, "positions": [...]}') and mentions that symbol filtering is case-insensitive, which are useful behavioral details. However, it does not address edge cases like invalid XML or empty results, and it does not explicitly confirm read-only behavior, though 'extract' implies it.

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, starting with a one-line summary, followed by a bulleted parameter list, and ending with a return format. There is no filler, and all sentences are information-dense.

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?

For a relatively simple parsing tool with three parameters and a straightforward return format, the description covers the essential aspects: purpose, parameters, and return structure. It does not elaborate on invalid input handling or the exact fields within each position object, but given the presence of an output schema (per context signals), this is acceptable.

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 input schema has 0% description coverage, so the description is the only source of parameter meaning. It explains xml_content as 'Raw Flex XML string,' symbol as 'Filter by ticker symbol (case-insensitive, optional),' and asset_category with examples ('STK, OPT, FUT'). This adds significant semantic value beyond the bare schema types and titles.

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 opens with 'Extract open position records from a Flex XML report,' which clearly states the action (extract), the resource (open position records), and the input source (Flex XML report). This distinguishes it from sibling tools like flex_parse_trades and flex_parse_cash_txns, which focus on other data types.

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

Usage Guidelines4/5

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

The description implies usage by stating it extracts open positions, but it does not explicitly contrast with alternatives or mention when not to use it. The filter parameters (symbol, asset_category) provide additional context for refining usage, but there is no direct guidance on choosing this over flex_parse_trades or flex_parse_equity. Clear context is present, but exclusions/alternatives are not stated.

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