Skip to main content
Glama
nadavgb-atom

ib-async-mcp

by nadavgb-atom

get_contract_details

Retrieve detailed contract specifications for trading instruments, including symbol, exchange, and currency information, to support market analysis and trade execution.

Instructions

Get detailed contract information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contract_typeYes
symbolYes
exchangeNoSMART
currencyNoUSD

Implementation Reference

  • The handler logic for 'get_contract_details' that creates a contract object and calls `ib.reqContractDetailsAsync`.
    if name == "get_contract_details":
        contract = create_contract(
            args["contract_type"],
            symbol=args["symbol"],
            exchange=args.get("exchange", "SMART"),
            currency=args.get("currency", "USD"),
        )
        details = await ib.reqContractDetailsAsync(contract)
        return [serialize_object(d) for d in details]
  • The tool definition and schema for 'get_contract_details'.
    Tool(
        name="get_contract_details",
        description="Get detailed contract information.",
        inputSchema={
            "type": "object",
            "properties": {
                "contract_type": {"type": "string"},
                "symbol": {"type": "string"},
                "exchange": {"type": "string", "default": "SMART"},
                "currency": {"type": "string", "default": "USD"},
            },
            "required": ["contract_type", "symbol"],
        },
    ),
Behavior1/5

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

No annotations are provided, placing full disclosure burden on the description. The text adds no behavioral context regarding read-only safety, error handling (what if symbol not found?), return format structure, or rate limiting. It does not confirm the implied read-only nature of the operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While brief (4 words), the single sentence fails to earn its place by being specific. It wastes the agent's attention with vague language ('detailed information') that could have specified the domain (financial instruments) or key parameter requirements.

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?

Given 4 parameters, complex financial domain, no output schema, and zero annotations, the description is severely incomplete. It omits return value structure, parameter interdependencies, and domain context necessary for safe invocation in a trading system.

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

Parameters1/5

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

With 0% schema description coverage, the description completely fails to compensate. Critical parameters like `contract_type` (expected values: 'STK', 'OPT', 'FUT'?) and `symbol` (ticker format requirements) are undocumented. The description mentions no parameters, syntax, or formats, leaving agents blind to required inputs.

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

Purpose2/5

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

The description states the basic action (get) and resource (contract information) but is vague and borderline tautological, merely restating the tool name with the adjective 'detailed'. It fails to distinguish this from critical siblings like `qualify_contracts` (validation), `create_contract` (creation), or `get_option_chain` (specific contract types), leaving agents uncertain which contract retrieval method to use.

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

Usage Guidelines1/5

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

Provides no guidance on when to use this tool versus alternatives. Given siblings like `qualify_contracts` and `get_option_chain`, the description should explicitly state whether this retrieves generic contract metadata, validates instrument definitions, or serves as a prerequisite for placing orders.

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/nadavgb-atom/ib-async-mcp'

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