Skip to main content
Glama
simoneb

ibkr-risk-mcp

by simoneb

get_margin_summary

Read-onlyIdempotent

Get margin and liquidity split by securities and commodities segments, revealing futures margin shortfalls that can trigger forced liquidation.

Instructions

Margin and liquidity, split by segment.

Returns NetLiquidation, EquityWithLoanValue, FullInitMarginReq, FullMaintMarginReq, AvailableFunds, ExcessLiquidity, TotalCashValue, BuyingPower and Leverage — each as the account total and, where IB reports it, separately for the securities (-S) and commodities (-C) segments.

The segments are the point. Futures margin must be met in the commodities segment; IB covers a shortfall there by sweeping cash out of the securities segment. An account whose total excess liquidity looks healthy can still be one bad day away from a forced liquidation if the shortfall lands in commodities while securities is also falling. Report the segment figures, not only the totals, whenever futures are involved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safe-read nature is covered. The description adds valuable behavioral context beyond annotations: IB may sweep cash from securities to commodities, and a healthy total excess liquidity can still mask a segment-level shortfall. This teaches the agent how to interpret the returned numbers rather than just their type.

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 somewhat long but each sentence earns its place: a crisp opening, a field list, and a bolded explanation of why segments matter. The formatting is clean with a lead sentence, an em-dash separated detail, and a clear call to action.

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?

With zero parameters, an output schema present, and annotations covering safety, the description goes beyond the minimum by explaining the key subtlety of segment-level margin and how to act on it. The tool is fully contextualized for the agent, including a warning scenario and a reporting directive.

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

Parameters4/5

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

The tool has zero parameters, so the input schema carries no burden; the baseline is 4. The description does not need to clarify parameters and instead focuses on explaining the output's segment semantics, which is appropriate.

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 'Margin and liquidity, split by segment,' which clearly names the resource (margin and liquidity) and the specific scope (segment breakdown). It then enumerates the exact fields returned, distinguishing this tool from siblings like stress_portfolio or get_position_greeks.

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

Usage Guidelines5/5

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

The description explicitly tells the agent when to emphasize segment figures: 'Report the segment figures, not only the totals, whenever futures are involved.' It also explains why segments matter by describing the commodities-segment shortfall and forced-liquidation risk, giving the agent actionable context for choosing how to use the results.

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/simoneb/ibkr-risk-mcp'

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