Skip to main content
Glama
aiordanescu

ib-gateway-mcp

by aiordanescu

Read subscription

get_subscription_data
Read-only

Fetch the latest data from an active subscription—quotes, order book, ticks, bars, scanner rows, or news—with optional limit and since-time filtering for incremental reads.

Instructions

Read the latest state of any subscription: quote, order book, ticks, bars, rows, news...

`data` depends on `kind`: quotes → `quote` (+ `extras`); depth → `bids`/`asks`;
tick_by_tick → `ticks`; realtime_bars and bars → `bars`; scanner → `rows`; news →
`headlines`; news_bulletins → `bulletins`; display_group → `current` and `updates`.
Time series (ticks, bars, headlines, bulletins, display group updates) come oldest
first, cut to the newest `limit` (default 100, max 5000) after `since`;
`data.truncated` is true when older ones were left out.
Stream snapshots also carry `active`, `error` and `notices` (IBKR messages such as
delayed data or a lost subscription). `stale` true means the gateway connection
dropped and values may be old. Each read keeps the subscription alive; one not read
for its idle time is cancelled and this tool then reports subscription_not_found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of items to return. Omit for the tool's default; larger values are capped. The result's truncated flag says whether more were available.
sinceNoOnly items (ticks, bars, headlines, bulletins, display group updates) after this time (ISO 8601, UTC if no zone). Pass the time of the last item you read to get only new ones.
subscription_idYesThe id a subscribe_* tool returned (see list_subscriptions).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe snapshot; its fields depend on kind.
kindYes
staleNoTrue when the values may be old; see get_health.
created_atYes
last_read_atNoThe previous read, before this one (UTC).
subscription_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint and openWorldHint annotations, the description discloses substantial behavior: data shape depends on subscription kind, time series are ordered oldest-first and truncated by limit/since, stale indicates a dropped gateway connection, notices carry IBKR messages, and idle subscriptions get cancelled and surface as subscription_not_found. This goes well beyond what annotations or schema provide.

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 dense but well organized: purpose first, then kind-dependent payload shapes, then time-series and truncation semantics, then lifecycle/staleness. Every sentence carries useful information and there is no filler or repetition.

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?

Given that an output schema exists, the description does not need to enumerate return fields; instead it covers the cross-cutting behaviors an agent must know: truncation, stale connections, IBKR notices, and subscription expiry. This is complete for a tool of this complexity.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds meaningful parameter behavior: default limit of 100, max of 5000, ordering semantics, the meaning of truncated, and how `since` interacts with time-series data. This supplements the schema without redundantly restating it.

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 uses a specific verb ('Read') and resource ('the latest state of any subscription') and enumerates the data types it covers, which clearly distinguishes it from sibling historical/quote tools. It is immediately obvious what this tool does and which tool family it belongs to.

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 clearly frames this as reading the current state of an active subscription, with the keep-alive behavior making the use case concrete. It does not explicitly name alternative tools or exclusion cases, but the context is strong enough that an agent can infer when it applies.

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