Skip to main content
Glama
aiordanescu

ib-gateway-mcp

by aiordanescu

Account summary

get_account_summary
Read-only

Retrieve key account balances—net liquidation, cash, buying power, and margin—for an Interactive Brokers account. Get headline figures or specific summary tags.

Instructions

Return an account's headline balances: net liquidation, cash, buying power, margin.

Headline fields (in `base_currency`): net_liquidation, total_cash_value, settled_cash,
buying_power, available_funds, excess_liquidity, equity_with_loan_value,
gross_position_value, init/maint margin requirement, sma, cushion (fraction), leverage
and day_trades_remaining (-1 = unlimited). `values` holds every summary row,
including per-currency ledger rows (CashBalance, UnrealizedPnL... with currency BASE
for converted totals). IBKR refreshes the summary about every 3 minutes, and right
after trades. No market-data subscription needed.
Errors: invalid_request lists the valid tags when a tag is unknown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoOnly return these tags in `values`, e.g. ['NetLiquidation', 'BuyingPower']. Omit for every row. The headline fields are always filled.
accountNoIBKR account id, e.g. DU1234567. Omit to use the default account; list_accounts shows which accounts are allowed.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
smaNoSpecial memorandum account (Reg T).
as_ofYesWhen this server read the values (UTC).
valuesNoEvery summary row (or the ones matching tags), including per-currency rows.
accountYes
cushionNoExcess liquidity / net liquidation, as a fraction (0.25 = 25%).
leverageNoGross position value / net liquidation.
buying_powerNoWhat can be bought on margin now.
settled_cashNoSettled cash (cash accounts).
base_currencyNoCurrency the headline amounts are in.
available_fundsNoEquity with loan value minus initial margin.
init_margin_reqNoInitial margin requirement.
net_liquidationNoTotal account value (equity).
excess_liquidityNoEquity with loan value minus maintenance margin; <0 risks liquidation.
maint_margin_reqNoMaintenance margin requirement.
total_cash_valueNoCash, including unsettled.
day_trades_remainingNoDay trades left under the pattern-day-trader rule; -1 means unlimited.
gross_position_valueNoAbsolute market value of all positions.
equity_with_loan_valueNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior5/5

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

Annotations already mark readOnlyHint=true and openWorldHint=true. The description goes well beyond by specifying refresh cadence (~3 minutes and after trades), that no market-data subscription is required, that `values` contains every summary row including per-currency ledger rows, and the invalid_request error behavior listing valid tags. This is rich behavioral disclosure.

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 dense but purposeful: purpose and field list come first, followed by structure, refresh, subscription, and error details. While somewhat long, each sentence contributes useful information. The structure could be slightly tightened with headings, but it's well organized.

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

Completeness5/5

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

For a read-only tool with no required parameters and an existing output schema, the description covers purpose, exact fields, return structure, refresh behavior, subscription requirements, and error handling. An agent has everything needed to invoke it correctly.

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 100%, so the schema already documents both `tags` and `account` with descriptive text. The description does not add parameter-level meaning beyond schema; its mention of 'headline fields are always filled' relates to behavior, not parameter semantics. Baseline 3 applies.

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?

The description clearly states the verb and resource: 'Return an account's headline balances' and enumerates the specific fields returned. It doesn't explicitly contrast with sibling tools like get_account_values or get_portfolio, but the scope is precise enough to understand what this tool does.

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?

No explicit guidance on when to use this tool versus alternatives. The only contextual note is 'No market-data subscription needed,' which is a benefit, not a selection criterion. The description never says 'use this for headline balances' or names a sibling to avoid.

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