Skip to main content
Glama
nadavgb-atom

ib-async-mcp

by nadavgb-atom

disconnect

Terminate the connection to Interactive Brokers TWS or IB Gateway, ending all active data streams and trading sessions.

Instructions

Disconnect from TWS/Gateway.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler logic for the 'disconnect' tool, which sets the 'ib' client to None and calls its disconnect method.
    if name == "disconnect":
        if ib is not None:
            ib.disconnect()
            ib = None
        return {"status": "disconnected"}
  • Registration of the 'disconnect' tool with name, description, and empty input schema.
    Tool(
        name="disconnect",
        description="Disconnect from TWS/Gateway.",
        inputSchema={"type": "object", "properties": {}},
    ),

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