Skip to main content
Glama
pedrobraiti

mcp-ibkr-agent

by pedrobraiti

wait_for_fill

Poll an order until filled or cancelled, closing the confirm-the-fill loop and returning status or timeout.

Instructions

Poll an order until it reaches a terminal state (filled/cancelled/rejected/inactive), or the timeout elapses.

Closes the confirm-the-fill loop so the agent doesn't have to orchestrate the retry itself. Returns the latest status with timed_out true if it was still working when time ran out. timeout_seconds is capped at 120. Note: an inactive result usually means the order was rejected/killed, but IBKR also uses it for an order parked until the market opens — so confirm intent before assuming it's dead.

Same unit contract as order_status: filled_quantity in SHARES, filled_cash in US$, and quantity_is_estimate true when the share count was derived from a partial cash fill.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYes
timeout_secondsNo
Behavior4/5

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

With no annotations, the description fully describes behavior: polling, terminal states, timeout cap, timed_out flag, inactive nuance, and unit conventions. It does not mention rate limits or side effects, but is still transparent.

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?

The description is two paragraphs, front-loaded with purpose and key states, followed by details. Efficient without redundancy, though slightly verbose in the second paragraph.

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?

Given no output schema, no annotations, and moderate complexity, the description covers terminal states, timeout behavior, inactive interpretation, and units. It does not address error handling or authentication, but is sufficient for a polling tool.

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?

Schema coverage is 0%, but the description explains timeout_seconds cap at 120 and return fields (timed_out, filled_quantity, etc.) which aid understanding. However, order_id parameter lacks format hints, and parameter-specific details are minimal.

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 clearly states the tool polls an order until a terminal state or timeout, with specific verbs and resource. It distinguishes from sibling tools like order_status by emphasizing the polling and loop closure.

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 explains the tool is for closing the confirm-the-fill loop, implying use after placing an order, and not for simple status checks. It mentions timeout cap and inactive ambiguity, but lacks explicit when-not-to-use alternatives.

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/pedrobraiti/agentic-trading-mcp'

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