MCP

Tool spec & JSON Schemas

20 tools advertised over tools/list. Read tools work with a read-only OAuth token; write tools require full scope. Order placement additionally requires confirm: true — the model cannot fabricate that flag past the server check.

Read

Safe on a read-only token. A write call with that token returns 403.

qualify_contract

read-only

Resolve and validate a contract against IBKR, returning its canonical conId, exchange, and full definition. Call this FIRST when a user names an instrument ambiguously to confirm it resolves before quoting. Returns an error if no contract matches.

{
  "type": "object",
  "properties": {
    "symbol": {
      "type": "string",
      "description": "Ticker, e.g. AAPL. Provide this or con_id."
    },
    "con_id": {
      "type": "integer",
      "description": "IBKR contract ID; takes precedence over symbol."
    },
    "sec_type": {
      "type": "string",
      "enum": [
        "STK",
        "OPT",
        "FUT",
        "CASH"
      ],
      "default": "STK"
    },
    "exchange": {
      "type": "string",
      "default": "SMART"
    },
    "primary_exch": {
      "type": "string",
      "description": "Primary listing exchange, e.g. NASDAQ."
    },
    "currency": {
      "type": "string",
      "default": "USD"
    },
    "expiration": {
      "type": "string",
      "description": "YYYYMMDD. Required for OPT/FUT identified by legs."
    },
    "strike": {
      "type": "number",
      "description": "Option strike price."
    },
    "right": {
      "type": "string",
      "enum": [
        "C",
        "P",
        "CALL",
        "PUT"
      ],
      "description": "Option right."
    }
  },
  "required": [
    "symbol"
  ]
}

get_snapshot_quote

read-only

Fetch a one-time market data snapshot (bid, ask, last, high, low, close, sizes, volume) for a single contract. For options/futures include expiration/strike/right or a con_id. May return delayed data depending on account entitlements.

{
  "type": "object",
  "properties": {
    "symbol": {
      "type": "string",
      "description": "Ticker, e.g. AAPL. Provide this or con_id."
    },
    "con_id": {
      "type": "integer",
      "description": "IBKR contract ID; takes precedence over symbol."
    },
    "sec_type": {
      "type": "string",
      "enum": [
        "STK",
        "OPT",
        "FUT",
        "CASH"
      ],
      "default": "STK"
    },
    "exchange": {
      "type": "string",
      "default": "SMART"
    },
    "primary_exch": {
      "type": "string",
      "description": "Primary listing exchange, e.g. NASDAQ."
    },
    "currency": {
      "type": "string",
      "default": "USD"
    },
    "expiration": {
      "type": "string",
      "description": "YYYYMMDD. Required for OPT/FUT identified by legs."
    },
    "strike": {
      "type": "number",
      "description": "Option strike price."
    },
    "right": {
      "type": "string",
      "enum": [
        "C",
        "P",
        "CALL",
        "PUT"
      ],
      "description": "Option right."
    }
  },
  "required": [
    "symbol"
  ]
}

get_snapshot_quotes

read-only

Fetch snapshot quotes for many contracts in one call; results are returned in input order. Prefer this over repeated get_snapshot_quote calls when pricing a list.

{
  "type": "object",
  "properties": {
    "contracts": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Ticker, e.g. AAPL. Provide this or con_id."
          },
          "con_id": {
            "type": "integer",
            "description": "IBKR contract ID; takes precedence over symbol."
          },
          "sec_type": {
            "type": "string",
            "enum": [
              "STK",
              "OPT",
              "FUT",
              "CASH"
            ],
            "default": "STK"
          },
          "exchange": {
            "type": "string",
            "default": "SMART"
          },
          "primary_exch": {
            "type": "string",
            "description": "Primary listing exchange, e.g. NASDAQ."
          },
          "currency": {
            "type": "string",
            "default": "USD"
          },
          "expiration": {
            "type": "string",
            "description": "YYYYMMDD. Required for OPT/FUT identified by legs."
          },
          "strike": {
            "type": "number",
            "description": "Option strike price."
          },
          "right": {
            "type": "string",
            "enum": [
              "C",
              "P",
              "CALL",
              "PUT"
            ],
            "description": "Option right."
          }
        }
      }
    }
  },
  "required": [
    "contracts"
  ]
}

get_option_chain

read-only

Return option chain parameters (expirations, strikes, exchanges, multiplier) for an underlying. Use this to discover valid option contracts BEFORE quoting specific options. Identify the underlying by symbol or con_id.

{
  "type": "object",
  "properties": {
    "symbol": {
      "type": "string"
    },
    "con_id": {
      "type": "integer"
    },
    "sec_type": {
      "type": "string",
      "enum": [
        "STK",
        "FUT",
        "IND"
      ],
      "default": "STK"
    }
  },
  "required": [
    "symbol"
  ]
}

get_account

read-only

Return the account summary: net liquidation value, buying power, cash balances, and margin. Use to answer 'how much can I trade' or 'what's my balance'.

{
  "type": "object",
  "properties": {}
}

list_accounts

read-only

List the IBKR account ids the connected login can act on, capped to the plan limit. Use this to discover which account to pass as the 'account' argument on orders when the login manages more than one account.

{
  "type": "object",
  "properties": {}
}

get_positions

read-only

Return all currently held positions with quantity, average cost, market value, and unrealized P&L. Use to answer 'what do I own' or before discussing closing a position.

{
  "type": "object",
  "properties": {}
}

list_orders

read-only

List tracked orders and their lifecycle state (submitted, filled, cancelled) with fill quantities. Optionally filter by order_ref to find orders tagged by a specific strategy or agent session.

{
  "type": "object",
  "properties": {
    "order_ref": {
      "type": "string",
      "description": "Filter to orders carrying this reference tag."
    }
  }
}

get_order

read-only

Get the full state of a single order by its IBKR order ID: status, filled/remaining quantity, average fill price, commissions, and individual executions.

{
  "type": "object",
  "properties": {
    "order_id": {
      "type": "integer",
      "description": "IBKR order ID returned when the order was placed."
    }
  },
  "required": [
    "order_id"
  ]
}

query_audit_log

read-only

Read the immutable, cryptographically chained audit log of account events (orders, fills, commissions, status changes) in reverse-chronological order. Cursor-paginated: pass next_before_id from a prior response as before_id to page back. Use to answer 'what happened' or review what an agent did.

{
  "type": "object",
  "properties": {
    "event_type": {
      "type": "string",
      "description": "Optional filter, e.g. 'order.filled'."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 50
    },
    "before_id": {
      "type": "integer",
      "description": "Return events with id < before_id (pagination). Omit for the first page."
    }
  }
}

batch_qualify_contract

read-only

Resolve and validate many contracts in one call; results are returned in input order. Prefer this over repeated qualify_contract calls when resolving a list.

{
  "type": "object",
  "properties": {
    "contracts": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Ticker, e.g. AAPL. Provide this or con_id."
          },
          "con_id": {
            "type": "integer",
            "description": "IBKR contract ID; takes precedence over symbol."
          },
          "sec_type": {
            "type": "string",
            "enum": [
              "STK",
              "OPT",
              "FUT",
              "CASH"
            ],
            "default": "STK"
          },
          "exchange": {
            "type": "string",
            "default": "SMART"
          },
          "primary_exch": {
            "type": "string",
            "description": "Primary listing exchange, e.g. NASDAQ."
          },
          "currency": {
            "type": "string",
            "default": "USD"
          },
          "expiration": {
            "type": "string",
            "description": "YYYYMMDD. Required for OPT/FUT identified by legs."
          },
          "strike": {
            "type": "number",
            "description": "Option strike price."
          },
          "right": {
            "type": "string",
            "enum": [
              "C",
              "P",
              "CALL",
              "PUT"
            ],
            "description": "Option right."
          }
        }
      }
    }
  },
  "required": [
    "contracts"
  ]
}

get_contract_details

read-only

Fetch full reference data for a contract (trading hours, tick rules, order-type support, liquid hours) beyond what qualify_contract returns. Same instrument descriptor as qualify_contract.

{
  "type": "object",
  "properties": {
    "symbol": {
      "type": "string",
      "description": "Ticker, e.g. AAPL. Provide this or con_id."
    },
    "con_id": {
      "type": "integer",
      "description": "IBKR contract ID; takes precedence over symbol."
    },
    "sec_type": {
      "type": "string",
      "enum": [
        "STK",
        "OPT",
        "FUT",
        "CASH"
      ],
      "default": "STK"
    },
    "exchange": {
      "type": "string",
      "default": "SMART"
    },
    "primary_exch": {
      "type": "string",
      "description": "Primary listing exchange, e.g. NASDAQ."
    },
    "currency": {
      "type": "string",
      "default": "USD"
    },
    "expiration": {
      "type": "string",
      "description": "YYYYMMDD. Required for OPT/FUT identified by legs."
    },
    "strike": {
      "type": "number",
      "description": "Option strike price."
    },
    "right": {
      "type": "string",
      "enum": [
        "C",
        "P",
        "CALL",
        "PUT"
      ],
      "description": "Option right."
    }
  },
  "required": [
    "symbol"
  ]
}

get_last_price

read-only

Fetch just the last traded price for a single contract — a lighter call than get_snapshot_quote when only the last print is needed.

{
  "type": "object",
  "properties": {
    "symbol": {
      "type": "string",
      "description": "Ticker, e.g. AAPL. Provide this or con_id."
    },
    "con_id": {
      "type": "integer",
      "description": "IBKR contract ID; takes precedence over symbol."
    },
    "sec_type": {
      "type": "string",
      "enum": [
        "STK",
        "OPT",
        "FUT",
        "CASH"
      ],
      "default": "STK"
    },
    "exchange": {
      "type": "string",
      "default": "SMART"
    },
    "primary_exch": {
      "type": "string",
      "description": "Primary listing exchange, e.g. NASDAQ."
    },
    "currency": {
      "type": "string",
      "default": "USD"
    },
    "expiration": {
      "type": "string",
      "description": "YYYYMMDD. Required for OPT/FUT identified by legs."
    },
    "strike": {
      "type": "number",
      "description": "Option strike price."
    },
    "right": {
      "type": "string",
      "enum": [
        "C",
        "P",
        "CALL",
        "PUT"
      ],
      "description": "Option right."
    }
  },
  "required": [
    "symbol"
  ]
}

get_open_orders

read-only

List only the currently working (open/active) orders — those not yet filled or cancelled. Use to answer 'what orders are live right now'.

{
  "type": "object",
  "properties": {}
}

get_executions

read-only

List individual fills (executions) for the session, with price, quantity, time and commission. Optionally filter by order_ref or order_id. Use to answer 'what actually filled'.

{
  "type": "object",
  "properties": {
    "order_ref": {
      "type": "string",
      "description": "Filter to fills for orders carrying this reference tag."
    },
    "order_id": {
      "type": "integer",
      "description": "Filter to fills for a single IBKR order id."
    }
  }
}

list_trades

read-only

List the durable trade-history records (persisted fills) in reverse-chronological order. Cursor-paginated: pass a prior row's id as before_id to page back.

{
  "type": "object",
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "description": "Max rows to return."
    },
    "before_id": {
      "type": "integer",
      "description": "Return trades with id < before_id (pagination)."
    }
  }
}

Trade

Full-scope only. Place-order tools refuse unless confirm is true.

place_order

write · full-scope · confirm

Place a single order. Requires a full-scope key; live orders also require billing in good standing. You MUST first relay the complete order (side, quantity, symbol/contract, order type, limit/stop prices, TIF) to the user, then set confirm:true only once they have seen exactly what will execute. Without confirm:true the order is refused.

{
  "type": "object",
  "properties": {
    "symbol": {
      "type": "string",
      "description": "Ticker, e.g. AAPL. Provide this or con_id."
    },
    "con_id": {
      "type": "integer",
      "description": "IBKR contract ID; takes precedence over symbol."
    },
    "sec_type": {
      "type": "string",
      "enum": [
        "STK",
        "OPT",
        "FUT",
        "CASH"
      ],
      "default": "STK"
    },
    "exchange": {
      "type": "string",
      "default": "SMART"
    },
    "primary_exch": {
      "type": "string",
      "description": "Primary listing exchange, e.g. NASDAQ."
    },
    "currency": {
      "type": "string",
      "default": "USD"
    },
    "expiration": {
      "type": "string",
      "description": "YYYYMMDD. Required for OPT/FUT identified by legs."
    },
    "strike": {
      "type": "number",
      "description": "Option strike price."
    },
    "right": {
      "type": "string",
      "enum": [
        "C",
        "P",
        "CALL",
        "PUT"
      ],
      "description": "Option right."
    },
    "action": {
      "type": "string",
      "enum": [
        "BUY",
        "SELL"
      ],
      "description": "Order side."
    },
    "quantity": {
      "type": "number",
      "description": "Number of units (shares/contracts)."
    },
    "order_type": {
      "type": "string",
      "description": "IBKR order type, e.g. MKT, LMT, STP, STP LMT."
    },
    "lmt_price": {
      "type": "number",
      "description": "Limit price; required for LMT / STP LMT."
    },
    "aux_price": {
      "type": "number",
      "description": "Auxiliary/stop price; required for STP / STP LMT."
    },
    "tif": {
      "type": "string",
      "description": "Time in force, e.g. DAY, GTC."
    },
    "order_ref": {
      "type": "string",
      "description": "Optional strategy/session tag echoed on fills."
    },
    "account": {
      "type": "string",
      "description": "IBKR account id; optional for single-account sessions."
    },
    "algo_strategy": {
      "type": "string",
      "description": "Optional IBKR algo strategy."
    },
    "algo_params": {
      "type": "object",
      "description": "Optional algo strategy parameters."
    },
    "confirm": {
      "type": "boolean",
      "description": "Must be true to submit. Before setting it, relay the full order (side, quantity, symbol/contract, order type, prices, TIF) to the user so they see exactly what will execute."
    }
  },
  "required": [
    "action",
    "quantity",
    "order_type",
    "confirm"
  ]
}

place_orders

write · full-scope · confirm

Place multiple orders in one call; results are returned in input order. Same rules as place_order: full-scope key, live billing for live orders, and confirm:true only after relaying every order in the batch to the user.

{
  "type": "object",
  "properties": {
    "orders": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Ticker, e.g. AAPL. Provide this or con_id."
          },
          "con_id": {
            "type": "integer",
            "description": "IBKR contract ID; takes precedence over symbol."
          },
          "sec_type": {
            "type": "string",
            "enum": [
              "STK",
              "OPT",
              "FUT",
              "CASH"
            ],
            "default": "STK"
          },
          "exchange": {
            "type": "string",
            "default": "SMART"
          },
          "primary_exch": {
            "type": "string",
            "description": "Primary listing exchange, e.g. NASDAQ."
          },
          "currency": {
            "type": "string",
            "default": "USD"
          },
          "expiration": {
            "type": "string",
            "description": "YYYYMMDD. Required for OPT/FUT identified by legs."
          },
          "strike": {
            "type": "number",
            "description": "Option strike price."
          },
          "right": {
            "type": "string",
            "enum": [
              "C",
              "P",
              "CALL",
              "PUT"
            ],
            "description": "Option right."
          },
          "action": {
            "type": "string",
            "enum": [
              "BUY",
              "SELL"
            ],
            "description": "Order side."
          },
          "quantity": {
            "type": "number",
            "description": "Number of units (shares/contracts)."
          },
          "order_type": {
            "type": "string",
            "description": "IBKR order type, e.g. MKT, LMT, STP, STP LMT."
          },
          "lmt_price": {
            "type": "number",
            "description": "Limit price; required for LMT / STP LMT."
          },
          "aux_price": {
            "type": "number",
            "description": "Auxiliary/stop price; required for STP / STP LMT."
          },
          "tif": {
            "type": "string",
            "description": "Time in force, e.g. DAY, GTC."
          },
          "order_ref": {
            "type": "string",
            "description": "Optional strategy/session tag echoed on fills."
          },
          "account": {
            "type": "string",
            "description": "IBKR account id; optional for single-account sessions."
          },
          "algo_strategy": {
            "type": "string",
            "description": "Optional IBKR algo strategy."
          },
          "algo_params": {
            "type": "object",
            "description": "Optional algo strategy parameters."
          },
          "confirm": {
            "type": "boolean",
            "description": "Must be true to submit. Before setting it, relay the full order (side, quantity, symbol/contract, order type, prices, TIF) to the user so they see exactly what will execute."
          }
        },
        "required": [
          "action",
          "quantity",
          "order_type"
        ]
      }
    },
    "confirm": {
      "type": "boolean",
      "description": "Must be true to submit. Relay every order in the batch to the user first."
    }
  },
  "required": [
    "orders",
    "confirm"
  ]
}

cancel_order

destructive · full-scope

Cancel a single working order by its IBKR order id. De-risking is intentionally frictionless — no confirm flag is required.

{
  "type": "object",
  "properties": {
    "order_id": {
      "type": "integer",
      "description": "IBKR order id to cancel."
    }
  },
  "required": [
    "order_id"
  ]
}

cancel_all_orders

destructive · full-scope

Cancel every currently working order for the account in one call. De-risking is intentionally frictionless — no confirm flag is required.

{
  "type": "object",
  "properties": {}
}