Skip to main content
Glama
aiordanescu

ib-gateway-mcp

by aiordanescu

WSH corporate events

get_wsh_events
Read-only

Retrieve corporate events from Wall Street Horizon—earnings, dividends, splits, meetings—for contracts, portfolios, or watchlists, filtered by date range and event type.

Instructions

List Wall Street Horizon corporate events: earnings dates, dividends, splits, meetings.

Also shareholder and board meetings, conferences and more (get_wsh_metadata lists
the event types). Give a contract, event_types, a raw filter_json, or
fill_portfolio/fill_watchlist; narrow by start_date/end_date. Returns at most `limit`
events (default 50, max 100); each event is the JSON object WSH sends (event type
tag, dates, company, details), and `request` shows what was asked of IBKR.
truncated=true means more events may exist: narrow the dates to page through them.
The WSH metadata is requested automatically first, as IBKR requires. Needs a Wall
Street Horizon corporate event data subscription (paid) on the IBKR login; without
it IBKR answers with an ib_api_error.

Errors: not_found (no events match: widen the dates or check event_types),
invalid_request (unknown event type, bad filter_json, dates in the wrong order,
nothing to ask for), account_not_allowed (fill_portfolio on a login with accounts
outside the allowlist).

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.
contractNoThe company (usually a stock). Alone it returns all its event types; add event_types to narrow them.
end_dateNoLast day to include (YYYY-MM-DD).
start_dateNoFirst day to include (YYYY-MM-DD).
event_typesNoWSH event type tags from get_wsh_metadata, e.g. wshe_ed (earnings date), wshe_bod (board meeting).
filter_jsonNoA raw WSH filter: a JSON object (or its text), e.g. {"watchlist": ["8314"], "wshe_ed": "true"}. Overrides contract and event_types; dates, fill flags and limit still apply.
fill_portfolioNoAlso include the instruments held in the login's portfolio (WSH fillPortfolio). Refused when the login has accounts outside this server's allowlist.
fill_watchlistNoAlso include the login's watchlist instruments (WSH fillWatchlist).
fill_competitorsNoAlso include the competitors of the selected companies (WSH fillCompetitors); not enough on its own.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesNoRemarks about how the arguments were used.
totalYesHow many events IBKR returned, before the limit.
eventsYesOne object per event, as WSH describes it (event type tag, dates, company and event-specific data). Missing numbers are null.
requestYesWhat was asked of IBKR.
contractNoThe instrument asked about, if any.
truncatedNoTrue when the result was cut to the limit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already carry readOnlyHint=true and openWorldHint=true, and the description adds substantial behavior beyond them: the exact return shape (raw WSH JSON plus a request echo), truncated pagination semantics with remediation advice, the automatic metadata fetch IBKR requires, the paid-subscription failure mode (ib_api_error), and a full error-code map with causes and fixes. No contradiction with the read-only annotation.

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 long but dense — roughly 180 words covering scope options, return format, pagination, prerequisites, and errors for a 9-parameter tool with documented failure modes. It is front-loaded with purpose and follows a logical progression from purpose to inputs to behavior to errors; every sentence earns its place even though it is not as terse as the highest-scoring examples.

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 the tool's complexity — 9 parameters, pagination, subscription requirements, and multiple error cases — the description leaves nothing an agent needs for correct invocation: what to pass, how paging works, what the response contains, what subscription is required, and how to interpret failures. The output schema covers return-value structure, so the brief mention of the JSON shape is sufficient.

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 real value: concrete default (50) and maximum (100) for limit, which the schema only vaguely calls 'the tool's default' and 'capped'. It also ties error conditions to specific parameters (dates in the wrong order, unknown event type, bad filter_json), helping the agent diagnose invocation mistakes.

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 a specific verb and resource — 'List Wall Street Horizon corporate events' — followed by concrete examples (earnings dates, dividends, splits, meetings). It explicitly differentiates from the nearest sibling by pointing to get_wsh_metadata for the event-type list, so an agent can tell the two tools apart without opening schemas.

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 states the invocation modes ('Give a contract, event_types, a raw filter_json, or fill_portfolio/fill_watchlist'), the narrowing parameters, and the subscription prerequisite. It gets close to explicit when/when-not guidance via the error section ('not_found... widen the dates or check event_types'), but it never names a same-purpose alternative to prefer, which is the only step short of a 5.

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