Skip to main content
Glama
IBKR MCP Server

IBKR MCP Server

get_contract_by_conid

Fetches contract details using a contract ID to verify instrument specifications before market data, options or futures analysis, or order execution.

Instructions

Get contract details by contract ID.

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": {
      "con_id": "<con_id>"
    },
    "name": "get_contract_by_conid"
  }
}

Input Schema

NameRequiredDescriptionDefault
con_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden. "Get" weakly implies a read, but the description says nothing about behavior when con_id is unknown or invalid, whether stale or delayed data may be returned, or any rate/permission constraints — all relevant for a market-data lookup.

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?

A single short sentence with the key phrase front-loaded and zero wasted wording. It is efficient, though its brevity reflects under-specification rather than disciplined editing.

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

Completeness2/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 not be explained, and with one required parameter the surface is small. Still missing is the practically important context for a lookup keyed on an opaque integer ID: how an agent obtains a valid con_id and what happens if it passes one that does not exist, which this description does not address.

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 0% and the single parameter has only a type, but the description at least binds it semantically by stating the lookup is "by contract ID", clarifying that con_id is an identifier rather than a symbol or filter. It adds no format, range, or sourcing detail (e.g., where to obtain a valid con_id) beyond that minimal mapping.

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

Purpose3/5

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

"Get contract details by contract ID" names a specific verb and resource, so the operation itself is identifiable. However, "contract details" is unspecific about what a contract or its details are in this domain, and nothing distinguishes it from sibling lookup tools such as get_futures_chain or get_option_chain that could plausibly return contract information too.

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?

There is no when-to-use guidance and no named alternative. The description gives no hint about when an agent should look up a contract by con_id versus pulling a chain or a symbol-based quote, leaving the choice entirely to inference.

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