Skip to main content
Glama
nadavgb-atom

ib-async-mcp

by nadavgb-atom

qualify_contracts

Fill missing contract fields like conId by qualifying Interactive Brokers trading contracts using symbol and contract type.

Instructions

Qualify contracts to fill in missing fields like conId.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contract_typeYes
symbolYes
exchangeNoSMART
currencyNoUSD

Implementation Reference

  • The handler for the qualify_contracts tool, which creates a contract object and then uses ib_async's qualifyContractsAsync method to qualify it.
    if name == "qualify_contracts":
        contract = create_contract(
            args["contract_type"],
            symbol=args["symbol"],
            exchange=args.get("exchange", "SMART"),
            currency=args.get("currency", "USD"),
        )
        qualified = await ib.qualifyContractsAsync(contract)
        return [serialize_object(c) for c in qualified]
  • The registration of the qualify_contracts tool, including its name, description, and input schema.
    Tool(
        name="qualify_contracts",
        description="Qualify contracts to fill in missing fields like conId.",
        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"],
        },
    ),

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.3/5.0
Behavior2/5

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

No annotations are provided, and the description only hints that the tool modifies data ('fill in missing fields'), but it does not disclose whether it is destructive, rate limits, authentication needs, or other behavioral traits. The agent lacks awareness of side effects.

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

Conciseness3/5

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

The description is a single sentence, which is concise, but it lacks structure. It does not front-load the key purpose or parameters. It earns its place but at the expense of completeness.

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

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, no annotations, and 4 parameters at 0% coverage, the description is severely incomplete. It does not explain return values, behavior, prerequisites, or how the tool handles errors. The agent cannot reliably invoke this tool.

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

Parameters2/5

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

Schema description coverage is 0%, so the description should compensate, but it only mentions conId as an example missing field. The four parameters (contract_type, symbol, exchange, currency) are not elaborated upon, leaving the agent unsure about valid values or formats.

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?

The description states 'Qualify contracts to fill in missing fields like conId,' which gives a general idea of completing contract data, but the verb 'qualify' is ambiguous and not a standard action. It distinguishes from siblings like create_contract and get_contract_details but lacks precision.

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?

The description provides no guidance on when to use this tool versus alternatives like create_contract or get_contract_details. There are no exclusions or context for when this tool is appropriate.

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