Skip to main content
Glama
IBKR MCP Server

IBKR MCP Server

execute_rebalancing

Executes a rebalancing plan as a complete all-or-nothing trade batch, requiring confirmation by default so no partial orders are transmitted.

Instructions

Execute rebalancing trades from a rebalancing plan.

Approval-required by default; re-call with confirm=True to transmit the full batch of rebalancing orders, or set IBKR_MCP_AUTONOMOUS_EXECUTION=true to skip approval. The batch is always all-preview or all-execute -- never a partial mix.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "rebalancing_plan": "<rebalancing_plan>"
    },
    "name": "execute_rebalancing"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNo
order_typeNoMKT
rebalancing_planYes
execute_sells_firstNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It does well on the approval gate and the all-or-nothing batch semantics ('never a partial mix'), but says nothing about what happens on a partial rejection mid-batch, whether orders can be canceled afterward, or what permissions/account state the transmission requires. For an execution tool that moves real money, that is a significant omission.

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?

Three short sentences, front-loaded with the action and the most consequential constraint (approval required by default). No filler, and the all-or-nothing rule is placed where an agent will read it before deciding to re-call.

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

Completeness3/5

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

An output schema exists so return values need no explanation, and the approval protocol is well covered. However, for a destructive execution tool with a nested plan object and zero schema coverage, the definition leaves too much about the payload and failure behavior unspecified to be considered complete.

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

Parameters2/5

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

Schema description coverage is 0% across 4 parameters, so the description must compensate. It explains confirm and the batch nature, but leaves rebalancing_plan (a nested object), order_type (default MKT, valid values unknown), and execute_sells_first (default true, implications unstated) entirely undefined.

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

Purpose4/5

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

States a specific verb ('Execute') and resource ('rebalancing trades from a rebalancing plan'), which cleanly separates it from the planning/calculation siblings like calculate_rebalancing_orders. It does not name an alternative explicitly, but the 'from a rebalancing plan' phrasing implies the plan-producing step is upstream.

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?

Gives clear operational guidance for the approval flow: the first call previews, and a re-call with confirm=True transmits, with an env-var escape hatch documented. It stops short of stating exclusions, e.g. that you must run calculate_rebalancing_orders first or that this should not be used for single-order placement (place_order siblings).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.