{
  "instructions": "Stonks research + trading system. Tools talk to the local REST API started\nwith `stonks serve`. Read tools are safe. Job tools queue backtests, lab runs,\nsweeps, signal IC analyses and ingests. Follow up with wait_for_job, and stop\none with cancel_job. Check get_golive_report before promote_strategy, and\ncheck_model_swap before swap_model_version. Status changes, model swaps,\ndraft register/enable/disable, broker syncs, manual orders (place_order,\nchange_order, cancel_order) and production ticks need confirm=true; call them\nfirst without it to get a preview and show it to the user before confirming.\nrun_tick is a dry run unless dry_run=false, and a real tick is refused unless\nthe API reports a paper/simulated broker. No tool can change broker settings\nor enable live trading.\nEvery tool acts as the user who owns this server's API token (whoami shows the\nuser, role and scopes) and sees only that user's portfolios. Actions that need\na fresh second factor (switching to auto, connecting a broker, resuming the\nkill switch, restoring a backup, a manual order on a real-money book) are\nrefused here. The user does them in the web app.",
  "resource_templates": [],
  "resources": [
    {
      "description": "Cash, total value and positions of the current portfolio",
      "mime_type": "application/json",
      "name": "portfolio_summary",
      "uri": "stonks://portfolio/summary"
    }
  ],
  "server": "stonks",
  "tools": [
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Add a note to one of your orders in the trade journal (why you\nagree or disagree with it, what you learned). Needs a trading\ntoken. The note is yours and shows in the console.",
      "input_schema": {
        "properties": {
          "client_id": {
            "title": "Client Id",
            "type": "string"
          },
          "note": {
            "description": "the note text",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Note",
            "type": "string"
          }
        },
        "required": [
          "client_id",
          "note"
        ],
        "title": "add_journal_noteArguments",
        "type": "object"
      },
      "name": "add_journal_note",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Deprecated alias of run_draft_backtest. Queue a backtest of a draft. Returns the job; wait_for_job gives the\nBacktestResult. Simulated only: never places real orders.",
      "input_schema": {
        "properties": {
          "benchmark": {
            "anyOf": [
              {
                "maxLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "benchmark to compare against: auto (SPY.US when priced, else EW), EW (equal-weight universe), a ticker such as QQQ.US, or none; default [lab] benchmark",
            "title": "Benchmark"
          },
          "cost_model": {
            "anyOf": [
              {
                "enum": [
                  "zero",
                  "realistic",
                  "ibkr_tiered",
                  "ibkr_fixed"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "transaction-cost preset (see list_cost_models); default [backtest.costs]",
            "title": "Cost Model"
          },
          "draft_id": {
            "title": "Draft Id",
            "type": "string"
          },
          "end": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "End",
            "type": "string"
          },
          "fee_per_trade": {
            "default": 0.0,
            "minimum": 0,
            "title": "Fee Per Trade",
            "type": "number"
          },
          "initial_cash": {
            "default": 10000.0,
            "exclusiveMinimum": 0,
            "title": "Initial Cash",
            "type": "number"
          },
          "interval": {
            "default": "1d",
            "title": "Interval",
            "type": "string"
          },
          "rebalance_every_bars": {
            "default": 1,
            "minimum": 1,
            "title": "Rebalance Every Bars",
            "type": "integer"
          },
          "slippage_bps": {
            "default": 0.0,
            "minimum": 0,
            "title": "Slippage Bps",
            "type": "number"
          },
          "start": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "Start",
            "type": "string"
          },
          "threshold": {
            "default": 0.0,
            "title": "Threshold",
            "type": "number"
          },
          "universe": {
            "description": "instrument ids",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Universe",
            "type": "array"
          }
        },
        "required": [
          "draft_id",
          "universe",
          "start",
          "end"
        ],
        "title": "run_draft_backtestArguments",
        "type": "object"
      },
      "name": "backtest_draft",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Stop one of your background jobs: a queued job never starts, and a\nrunning lab run stops at its next trial (it ends cancelled). Other\nrunning jobs cannot be interrupted (409). Ticks and ingests need an\nadmin.",
      "input_schema": {
        "properties": {
          "job_id": {
            "title": "Job Id",
            "type": "string"
          }
        },
        "required": [
          "job_id"
        ],
        "title": "cancel_jobArguments",
        "type": "object"
      },
      "name": "cancel_job",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Cancel one working order of your portfolio (yours or a strategy's).\nWithout confirm=true returns the order and cancels nothing.",
      "input_schema": {
        "properties": {
          "client_id": {
            "title": "Client Id",
            "type": "string"
          },
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "reason": {
            "description": "why you trade (recorded and audited)",
            "maxLength": 500,
            "minLength": 3,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "client_id",
          "reason"
        ],
        "title": "cancel_orderArguments",
        "type": "object"
      },
      "name": "cancel_order",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Change the quantity or limit of one of your working manual orders.\nThe order is cancelled at the broker and a new one replaces it, after\nevery check again. Without confirm=true returns the order as it is\nnow and changes nothing.",
      "input_schema": {
        "properties": {
          "allow_reduce": {
            "default": false,
            "title": "Allow Reduce",
            "type": "boolean"
          },
          "client_id": {
            "title": "Client Id",
            "type": "string"
          },
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "limit_price": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Limit Price"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "quantity": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Quantity"
          },
          "reason": {
            "description": "why you trade (recorded and audited)",
            "maxLength": 500,
            "minLength": 3,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "client_id",
          "reason"
        ],
        "title": "change_orderArguments",
        "type": "object"
      },
      "name": "change_order",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Check a formula in the factor expression language: whether it\nparses and is point in time (no future reads, no raw price levels\nthat later splits would change), its canonical form and warm-up.",
      "input_schema": {
        "properties": {
          "expression": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Expression",
            "type": "string"
          }
        },
        "required": [
          "expression"
        ],
        "title": "check_factor_expressionArguments",
        "type": "object"
      },
      "name": "check_factor_expression",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The swap check of a candidate against the live version: model\nbook days, drawdown and return against the live model over the same\ndays, each with value, limit and pass or fail. Read it before\nswap_model_version: an override skips exactly these checks.",
      "input_schema": {
        "properties": {
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          },
          "version": {
            "description": "the model version number",
            "minimum": 1,
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "strategy_id",
          "version"
        ],
        "title": "check_model_swapArguments",
        "type": "object"
      },
      "name": "check_model_swap",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Several tickers on one scale: daily adjusted closes rebased to 100\non the first day they all have a price, each with its drawdown from\nthe running peak, its rolling Sharpe, total return and worst\ndrawdown. Tickers without prices come back in ``missing``.",
      "input_schema": {
        "properties": {
          "end": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "End"
          },
          "limit": {
            "default": 750,
            "maximum": 5000,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "start": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Start"
          },
          "tickers": {
            "description": "instrument ids, e.g. AAPL.US",
            "items": {
              "type": "string"
            },
            "maxItems": 6,
            "minItems": 1,
            "title": "Tickers",
            "type": "array"
          },
          "window": {
            "default": 63,
            "description": "bars behind each rolling Sharpe point",
            "maximum": 252,
            "minimum": 5,
            "title": "Window",
            "type": "integer"
          }
        },
        "required": [
          "tickers"
        ],
        "title": "compare_tickersArguments",
        "type": "object"
      },
      "name": "compare_tickers",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Write one order ticket per trade of the plan. Each waits for the\nperson's approval with a fresh second factor in the web app, so\nnothing is sent from here. Without confirm=true returns the plan.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "min_trade_value": {
            "default": 0.0,
            "minimum": 0,
            "title": "Min Trade Value",
            "type": "number"
          },
          "portfolio_id": {
            "title": "Portfolio Id",
            "type": "string"
          },
          "reason": {
            "description": "why (audited)",
            "maxLength": 500,
            "minLength": 3,
            "title": "Reason",
            "type": "string"
          },
          "source": {
            "enum": [
              "strategy",
              "targets"
            ],
            "title": "Source",
            "type": "string"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Strategy Id"
          },
          "targets": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "your own targets, ticker to weight, e.g. {\"AAPL.US\": 0.3}",
            "title": "Targets"
          }
        },
        "required": [
          "portfolio_id",
          "source",
          "reason"
        ],
        "title": "confirm_rebalanceArguments",
        "type": "object"
      },
      "name": "confirm_rebalance",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Create a Studio draft (saved, not registered, never traded). Rule\ndrafts take a spec; code drafts take source_code and are refused (403)\nunless the API allows code strategies.",
      "input_schema": {
        "properties": {
          "kind": {
            "default": "rule",
            "enum": [
              "rule",
              "code"
            ],
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "description": "draft name",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "source_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Python source of a code draft (API must allow code strategies)",
            "title": "Source Code"
          },
          "spec": {
            "anyOf": [
              {
                "additionalProperties": true,
                "description": "rule spec (see get_rule_schema); constructor params for code drafts",
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Spec"
          }
        },
        "required": [
          "name"
        ],
        "title": "create_draftArguments",
        "type": "object"
      },
      "name": "create_draft",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Create a price alert on a ticker or one of your watchlists. It is\nchecked after each data refresh and sent through your notification\nchannels (push, email, Telegram) with your quiet hours.",
      "input_schema": {
        "properties": {
          "condition": {
            "description": "crosses_above or crosses_below a level, or moves_pct",
            "enum": [
              "crosses_above",
              "crosses_below",
              "moves_pct"
            ],
            "title": "Condition",
            "type": "string"
          },
          "level": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "the price to watch (crossings)",
            "title": "Level"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 80,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "pct": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "maximum": 1000,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "percent move, either way",
            "title": "Pct"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one instrument id, e.g. AAPL.US",
            "title": "Ticker"
          },
          "watchlist_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "or every ticker of one of your watchlists",
            "title": "Watchlist Id"
          },
          "window_days": {
            "anyOf": [
              {
                "maximum": 365,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "calendar days the move is measured over",
            "title": "Window Days"
          }
        },
        "required": [
          "condition"
        ],
        "title": "create_price_alertArguments",
        "type": "object"
      },
      "name": "create_price_alert",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Save a screen under a name, unique per person. Needs a trading token.",
      "input_schema": {
        "properties": {
          "name": {
            "description": "the screen's name",
            "maxLength": 80,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "spec": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "the screen: rule filters (asset_classes, sectors, exclude_sectors, exchanges, min_price, min_adv), universe_id to start from a stored universe, filters [{\"metric\": \"pe_ratio\", \"min\": 0, \"max\": 15}], sort_by, descending, limit and columns. Metric ids come from list_screen_metrics",
            "title": "Spec"
          }
        },
        "required": [
          "name"
        ],
        "title": "create_screenArguments",
        "type": "object"
      },
      "name": "create_screen",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Store a universe definition. It has no members until refreshed\n(refresh_universe). Without confirm=true returns a preview.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "csv": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "list only: CSV with a ticker column (replaces spec)",
            "title": "Csv"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Description"
          },
          "kind": {
            "enum": [
              "list",
              "exchange",
              "rule",
              "index"
            ],
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "spec": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "kind settings. list: {tickers, spans}. exchange: {exchange, source, security_types, include_delisted}. rule: {start, end, rebalance, min_adv, min_price, asset_classes, sectors, exclude_sectors, exchanges}. index: {index_id, source, start_date}",
            "title": "Spec"
          },
          "universe_id": {
            "description": "universe id, e.g. sp500 or us_common",
            "title": "Universe Id",
            "type": "string"
          }
        },
        "required": [
          "universe_id",
          "kind"
        ],
        "title": "create_universeArguments",
        "type": "object"
      },
      "name": "create_universe",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Start a watchlist of yours. Names are unique per person. Needs a\ntrading token.",
      "input_schema": {
        "properties": {
          "name": {
            "description": "the list's name",
            "maxLength": 80,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "tickers": {
            "anyOf": [
              {
                "description": "instrument ids, kept once and in order",
                "items": {
                  "type": "string"
                },
                "maxItems": 500,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tickers"
          }
        },
        "required": [
          "name"
        ],
        "title": "create_watchlistArguments",
        "type": "object"
      },
      "name": "create_watchlist",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Delete one of your Studio drafts. A strategy already registered\nfrom it stays registered. Without confirm=true returns a preview\n(the draft's name, kind and status) and deletes nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "draft_id": {
            "title": "Draft Id",
            "type": "string"
          }
        },
        "required": [
          "draft_id"
        ],
        "title": "delete_draftArguments",
        "type": "object"
      },
      "name": "delete_draft",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Delete one of your price alerts. Without confirm=true returns the\nrule and deletes nothing.",
      "input_schema": {
        "properties": {
          "alert_id": {
            "title": "Alert Id",
            "type": "string"
          },
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          }
        },
        "required": [
          "alert_id"
        ],
        "title": "delete_price_alertArguments",
        "type": "object"
      },
      "name": "delete_price_alert",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Delete one of your saved screens. Universes made from it stay.\nWithout confirm=true returns a preview.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "screen_id": {
            "title": "Screen Id",
            "type": "string"
          }
        },
        "required": [
          "screen_id"
        ],
        "title": "delete_screenArguments",
        "type": "object"
      },
      "name": "delete_screen",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Remove the alert from one of your saved screens (the screen\nstays). Without confirm=true returns the alert and removes nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "screen_id": {
            "title": "Screen Id",
            "type": "string"
          }
        },
        "required": [
          "screen_id"
        ],
        "title": "delete_screen_alertArguments",
        "type": "object"
      },
      "name": "delete_screen_alert",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Delete a stored universe and its membership rows (admins only).\nLab runs, ticks and scheduled jobs that name it stop resolving.\nWithout confirm=true returns a preview.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "universe_id": {
            "description": "universe id, e.g. sp500 or us_common",
            "title": "Universe Id",
            "type": "string"
          }
        },
        "required": [
          "universe_id"
        ],
        "title": "delete_universeArguments",
        "type": "object"
      },
      "name": "delete_universe",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Move a registered draft's strategy back to shadow (stops trading it).\nNeeds a reason. Without confirm=true returns a preview and changes nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "draft_id": {
            "title": "Draft Id",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "why (logged in the audit trail); required for demotions and overrides",
            "title": "Reason"
          }
        },
        "required": [
          "draft_id"
        ],
        "title": "disable_draftArguments",
        "type": "object"
      },
      "name": "disable_draft",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Propose an order without placing it. The server prices it at the\nlatest close and checks it. The person approves it in the web app\nwith a fresh second factor, and only then is it placed.",
      "input_schema": {
        "properties": {
          "limit_price": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Limit Price"
          },
          "order_type": {
            "default": "market",
            "enum": [
              "market",
              "limit"
            ],
            "title": "Order Type",
            "type": "string"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "quantity": {
            "exclusiveMinimum": 0,
            "title": "Quantity",
            "type": "number"
          },
          "reason": {
            "description": "why you trade (recorded and audited)",
            "maxLength": 500,
            "minLength": 3,
            "title": "Reason",
            "type": "string"
          },
          "retry_key": {
            "description": "the same key returns the draft already made (a safe retry)",
            "pattern": "^[A-Za-z0-9_.:\\-]{1,120}$",
            "title": "Retry Key",
            "type": "string"
          },
          "side": {
            "enum": [
              "buy",
              "sell"
            ],
            "title": "Side",
            "type": "string"
          },
          "ticker": {
            "description": "instrument id, e.g. AAPL.US or BTC-USD.CC",
            "title": "Ticker",
            "type": "string"
          }
        },
        "required": [
          "ticker",
          "side",
          "quantity",
          "reason",
          "retry_key"
        ],
        "title": "draft_orderArguments",
        "type": "object"
      },
      "name": "draft_order",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Replace the text of one of your journal notes.",
      "input_schema": {
        "properties": {
          "note": {
            "description": "the note text",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Note",
            "type": "string"
          },
          "note_id": {
            "minimum": 1,
            "title": "Note Id",
            "type": "integer"
          }
        },
        "required": [
          "note_id",
          "note"
        ],
        "title": "edit_journal_noteArguments",
        "type": "object"
      },
      "name": "edit_journal_note",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Promote a registered draft's strategy to active so production ticks rank\nand trade it. Same go-live gate as promote_strategy (override=true needs a\nreason of at least 20 characters). Without confirm=true returns a preview\n(survival results, warnings) and changes nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "draft_id": {
            "title": "Draft Id",
            "type": "string"
          },
          "override": {
            "default": false,
            "description": "promote without a passing go-live check; needs a reason of at least 20 characters",
            "title": "Override",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "why (logged in the audit trail); required for demotions and overrides",
            "title": "Reason"
          }
        },
        "required": [
          "draft_id"
        ],
        "title": "enable_draftArguments",
        "type": "object"
      },
      "name": "enable_draft",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Stop new orders at once and cancel the orders still working at the\nbroker. Without confirm=true returns a preview and changes nothing.\nResuming is done in the console or the CLI with a typed confirmation\nand a fresh 2FA code.",
      "input_schema": {
        "properties": {
          "buys_only": {
            "default": false,
            "description": "stop buys and cancel working buy orders only: sells and exits still go through, and no position is closed",
            "title": "Buys Only",
            "type": "boolean"
          },
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "flatten": {
            "default": false,
            "description": "deprecated name of buys_only (it never closed a position)",
            "title": "Flatten",
            "type": "boolean"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          },
          "reason": {
            "description": "audited",
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason",
            "type": "string"
          },
          "scope": {
            "description": "global: every portfolio (admins only); user: all of yours; portfolio: one of yours (give portfolio_id)",
            "enum": [
              "global",
              "user",
              "portfolio"
            ],
            "title": "Scope",
            "type": "string"
          }
        },
        "required": [
          "scope",
          "reason"
        ],
        "title": "engage_kill_switchArguments",
        "type": "object"
      },
      "name": "engage_kill_switch",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": true,
        "read_only": false
      },
      "description": "Queue a job that fetches only the missing bars of every member\nover the window (delisted names included) from the data source.\nFollow up with wait_for_job. Without confirm=true returns a preview.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "end": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "End",
            "type": "string"
          },
          "interval": {
            "default": "1d",
            "title": "Interval",
            "type": "string"
          },
          "source": {
            "anyOf": [
              {
                "enum": [
                  "eodhd",
                  "yahoo",
                  "defillama"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Source"
          },
          "start": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "Start",
            "type": "string"
          },
          "universe_id": {
            "description": "universe id, e.g. sp500 or us_common",
            "title": "Universe Id",
            "type": "string"
          }
        },
        "required": [
          "universe_id",
          "start",
          "end"
        ],
        "title": "ensure_universe_dataArguments",
        "type": "object"
      },
      "name": "ensure_universe_data",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Check that the Stonks API is up and report its version.",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "get_api_health",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "OHLCV bars for one instrument at one interval.",
      "input_schema": {
        "properties": {
          "end": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "End"
          },
          "interval": {
            "default": "1d",
            "description": "bar interval, e.g. 1d, 1h, 5m",
            "title": "Interval",
            "type": "string"
          },
          "limit": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "max bars",
            "title": "Limit"
          },
          "start": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Start"
          },
          "ticker": {
            "description": "instrument id, e.g. AAPL.US or BTC-USD.CC",
            "title": "Ticker",
            "type": "string"
          }
        },
        "required": [
          "ticker"
        ],
        "title": "get_barsArguments",
        "type": "object"
      },
      "name": "get_bars",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "How you trade by hand in one of your portfolios: manual and synced\nbroker trades as round trips, with P&L by holding time and weekday,\nwin rate, the disposition effect, overtrading, revenge trades after\na loss, and what trading against the active strategies cost.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "since": {
            "anyOf": [
              {
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Since"
          }
        },
        "title": "get_behaviour_reportArguments",
        "type": "object"
      },
      "name": "get_behaviour_report",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The broker production ticks trade through: kind (simulated/alpaca), paper, allow_live and whether credentials are configured (keys are never shown). Read-only.",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "get_broker",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "IB Gateway health: connected or not, the last good check, and the\nauto books of yours a gateway outage paused.",
      "input_schema": {
        "properties": {},
        "title": "get_broker_gatewaysArguments",
        "type": "object"
      },
      "name": "get_broker_gateways",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Upcoming earnings (with the time of day and the EPS estimate),\nex-dividend dates and economic releases from ``start`` (default\ntoday) to ``end`` (default two weeks on, at most 120 days).\nEconomic releases are market wide.",
      "input_schema": {
        "properties": {
          "countries": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 100,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "economic events of these ISO alpha-2 codes",
            "title": "Countries"
          },
          "end": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "End"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "scope": {
            "default": "holdings",
            "description": "holdings (default), watchlists, tickers or all",
            "enum": [
              "holdings",
              "watchlists",
              "tickers",
              "all"
            ],
            "title": "Scope",
            "type": "string"
          },
          "start": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Start"
          },
          "tickers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 500,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "instrument ids (scope tickers)",
            "title": "Tickers"
          },
          "watchlist_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your watchlists (scope watchlists)",
            "title": "Watchlist Id"
          }
        },
        "title": "get_calendarArguments",
        "type": "object"
      },
      "name": "get_calendar",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Strategy classes that can be backtested or tuned, with their parameter\nspecs, plus the valid bar intervals and asset classes.",
      "input_schema": {
        "properties": {},
        "title": "get_catalogArguments",
        "type": "object"
      },
      "name": "get_catalog",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "A price chart's data for one ticker: OHLCV bars (the latest\n``limit`` in the window), your fills of it (side, quantity, price)\nin one of your portfolios, and every strategy's signal events for it\n(entry, exit, increase, decrease) with the plain reason.",
      "input_schema": {
        "properties": {
          "end": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "End"
          },
          "interval": {
            "default": "1d",
            "title": "Interval",
            "type": "string"
          },
          "limit": {
            "default": 750,
            "maximum": 5000,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "start": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Start"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "only this strategy's signals",
            "title": "Strategy Id"
          },
          "ticker": {
            "description": "instrument id, e.g. AAPL.US or BTC-USD.CC",
            "title": "Ticker",
            "type": "string"
          }
        },
        "required": [
          "ticker"
        ],
        "title": "get_chartArguments",
        "type": "object"
      },
      "name": "get_chart",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "External accounts on one of your connections, each with the\nportfolio that mirrors it (null when not linked).",
      "input_schema": {
        "properties": {
          "connection_id": {
            "title": "Connection Id",
            "type": "string"
          }
        },
        "required": [
          "connection_id"
        ],
        "title": "get_connection_accountsArguments",
        "type": "object"
      },
      "name": "get_connection_accounts",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Data coverage: first/last bar and bar count per instrument and interval.",
      "input_schema": {
        "properties": {
          "interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Interval"
          },
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ticker"
          }
        },
        "title": "get_coverageArguments",
        "type": "object"
      },
      "name": "get_coverage",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One Studio draft: spec, kind, status and its registered strategy's status.",
      "input_schema": {
        "properties": {
          "draft_id": {
            "title": "Draft Id",
            "type": "string"
          }
        },
        "required": [
          "draft_id"
        ],
        "title": "get_draftArguments",
        "type": "object"
      },
      "name": "get_draft",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Which of ``tickers`` report earnings before the next open of\ntheir market. An order placed now fills after the report.",
      "input_schema": {
        "properties": {
          "tickers": {
            "items": {
              "type": "string"
            },
            "maxItems": 500,
            "minItems": 1,
            "title": "Tickers",
            "type": "array"
          }
        },
        "required": [
          "tickers"
        ],
        "title": "get_earnings_warningsArguments",
        "type": "object"
      },
      "name": "get_earnings_warnings",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "How one of your portfolio's orders are worked: its own algo and\neach strategy's override. Empty: plain limit orders.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "title": "Portfolio Id",
            "type": "string"
          }
        },
        "required": [
          "portfolio_id"
        ],
        "title": "get_execution_algo_settingsArguments",
        "type": "object"
      },
      "name": "get_execution_algo_settings",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One library factor: formula, family, direction, hypothesis and\nwarm-up in bars.",
      "input_schema": {
        "properties": {
          "factor_id": {
            "title": "Factor Id",
            "type": "string"
          }
        },
        "required": [
          "factor_id"
        ],
        "title": "get_factorArguments",
        "type": "object"
      },
      "name": "get_factor",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Each universe name's factor value known at the close of as_of,\nranked best first in the factor's direction.",
      "input_schema": {
        "properties": {
          "as_of": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "As Of",
            "type": "string"
          },
          "factor": {
            "description": "a library factor id (e.g. mom_12_1, ROC20, piotroski_f) or a formula such as '$close / Ref($close, 20) - 1'",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Factor",
            "type": "string"
          },
          "universe": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "instrument ids; or name a stored universe_id",
            "title": "Universe"
          },
          "universe_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "a stored universe id (or give universe)",
            "title": "Universe Id"
          }
        },
        "required": [
          "factor",
          "as_of"
        ],
        "title": "get_factor_valuesArguments",
        "type": "object"
      },
      "name": "get_factor_values",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The FX rate the system converts with: units of quote per one base,\nthe latest stored on or before the day (inverse pair or a cross\nthrough USD when needed). Null when no stored rate gives it.",
      "input_schema": {
        "properties": {
          "base": {
            "description": "ISO code, e.g. EUR",
            "pattern": "^[A-Za-z]{3}$",
            "title": "Base",
            "type": "string"
          },
          "day": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD; default today",
            "title": "Day"
          },
          "quote": {
            "description": "ISO code, e.g. EUR",
            "pattern": "^[A-Za-z]{3}$",
            "title": "Quote",
            "type": "string"
          }
        },
        "required": [
          "base",
          "quote"
        ],
        "title": "get_fx_rateArguments",
        "type": "object"
      },
      "name": "get_fx_rate",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The go-live gate for one strategy: every check of its paper period\n(days, trades, drawdown, Sharpe against the backtest, MinTRL, ...)\nwith its value, limit and pass or fail, and the verdict. Read it\nbefore promote_strategy: an override skips exactly these checks.",
      "input_schema": {
        "properties": {
          "since": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "first day of the paper period, default all",
            "title": "Since"
          },
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          }
        },
        "required": [
          "strategy_id"
        ],
        "title": "get_golive_reportArguments",
        "type": "object"
      },
      "name": "get_golive_report",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Operational health (every `stonks health` check): bar freshness, stuck\nticks and ingest runs, recent ingest failures; see `healthy`.",
      "input_schema": {
        "properties": {
          "tickers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "bar-freshness tickers; default [production].universe",
            "title": "Tickers"
          }
        },
        "title": "get_health_reportArguments",
        "type": "object"
      },
      "name": "get_health_report",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Insights for one of your portfolios (a synced broker account too):\nallocation by asset class, sector, currency and ticker; exposure\n(gross, net, beta); P&L over 1d, 1w, 1m, 3m, ytd, 1y and since\ninception; risk (volatility, drawdown, VaR, concentration).",
      "input_schema": {
        "properties": {
          "benchmark": {
            "anyOf": [
              {
                "maxLength": 32,
                "pattern": "^[A-Za-z0-9_.\\-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "ticker beta is measured against; default SPY.US",
            "title": "Benchmark"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          }
        },
        "title": "get_insightsArguments",
        "type": "object"
      },
      "name": "get_insights",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Admins only: asset-class allocation and exposure summed over every active portfolio (no tickers, no per-person numbers).",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "get_insights_totals",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One background job: status, progress, and its result once finished.",
      "input_schema": {
        "properties": {
          "job_id": {
            "title": "Job Id",
            "type": "string"
          }
        },
        "required": [
          "job_id"
        ],
        "title": "get_jobArguments",
        "type": "object"
      },
      "name": "get_job",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Win rate, P&L, profit factor, average R and exit efficiency per\ngroup: by sleeve, tag, mistake, playbook, or followed versus broke\nplan.",
      "input_schema": {
        "properties": {
          "by": {
            "default": "all",
            "description": "how to group the trades",
            "enum": [
              "all",
              "sleeve",
              "origin",
              "ticker",
              "side",
              "exit_trigger",
              "tag",
              "mistake",
              "playbook",
              "plan"
            ],
            "title": "By",
            "type": "string"
          },
          "origin": {
            "anyOf": [
              {
                "enum": [
                  "strategy",
                  "manual"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "strategy or manual orders",
            "title": "Origin"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          },
          "since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Since"
          },
          "sleeve": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Sleeve"
          },
          "until": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Until"
          }
        },
        "title": "get_journal_breakdownArguments",
        "type": "object"
      },
      "name": "get_journal_breakdown",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Every strategy ranked by its risk-adjusted paper result (the\nmodel book the tick keeps for it): total return, CAGR, Sharpe,\nSortino, worst drawdown, trades in the model book and in real books,\nsurvival tests passed and the go-live verdict.",
      "input_schema": {
        "properties": {
          "include_retired": {
            "default": false,
            "title": "Include Retired",
            "type": "boolean"
          },
          "sort": {
            "default": "sharpe",
            "description": "rank by paper Sharpe, total return, drawdown or trades",
            "enum": [
              "sharpe",
              "return",
              "drawdown",
              "trades"
            ],
            "title": "Sort",
            "type": "string"
          }
        },
        "title": "get_leaderboardArguments",
        "type": "object"
      },
      "name": "get_leaderboard",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One recorded lab run with every trial (parameters, score, status)\nand the trial count of its strategy class across all runs.",
      "input_schema": {
        "properties": {
          "run_id": {
            "title": "Run Id",
            "type": "string"
          }
        },
        "required": [
          "run_id"
        ],
        "title": "get_ledger_runArguments",
        "type": "object"
      },
      "name": "get_ledger_run",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "How much Stonks may trade in a live portfolio, set by hand by its\nowner (amount null: not set, so nothing opens).",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "description": "a portfolio id of yours (pf_...)",
            "title": "Portfolio Id",
            "type": "string"
          }
        },
        "required": [
          "portfolio_id"
        ],
        "title": "get_live_allocationArguments",
        "type": "object"
      },
      "name": "get_live_allocation",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "What a promotion to the next stage needs, checked now. A check\nwith passed = null has no data yet and does not block. Promoting is\ndone in the web app with a fresh second factor, never here.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "description": "a portfolio id of yours (pf_...)",
            "title": "Portfolio Id",
            "type": "string"
          }
        },
        "required": [
          "portfolio_id"
        ],
        "title": "get_live_gate_reportArguments",
        "type": "object"
      },
      "name": "get_live_gate_report",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Buying power and margin use of a live portfolio, read from the\nbroker now: equity, available funds, initial and maintenance margin,\nthe margin cushion and its level (ok, warn, reduce, call), the\nsafety buffer, and whether the pattern day trader rule binds. A\nmargin account is chosen in the web app with a fresh second factor,\nnever here.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "description": "a portfolio id of yours (pf_...)",
            "title": "Portfolio Id",
            "type": "string"
          }
        },
        "required": [
          "portfolio_id"
        ],
        "title": "get_live_marginArguments",
        "type": "object"
      },
      "name": "get_live_margin",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One of your portfolios on its latest tick day: one-day 95% and\n99% VaR and expected shortfall (fractions of value, loss positive),\nthe rolling VaR violation ratio (1.0 is right, outside 0.5 to 1.5\nmeans the risk model is off) with its Kupiec p-value, and per\nstrategy sleeve the same plus the alpha-decay check against the\nbacktest's IR.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          }
        },
        "title": "get_live_riskArguments",
        "type": "object"
      },
      "name": "get_live_risk",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Which live safeguards and account rules act on a live portfolio,\nwith their settings as its book follows them.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "description": "a portfolio id of yours (pf_...)",
            "title": "Portfolio Id",
            "type": "string"
          }
        },
        "required": [
          "portfolio_id"
        ],
        "title": "get_live_rulesArguments",
        "type": "object"
      },
      "name": "get_live_rules",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "A portfolio's live stage (sim_paper, broker_paper, live_small,\nlive_scale), its stage changes, and the last sessions' gate metrics:\norders sent, rejected and stuck, fills with no commission, the TCA\ngap, the book's and the model book's returns, and drift.",
      "input_schema": {
        "properties": {
          "days": {
            "default": 30,
            "title": "Days",
            "type": "integer"
          },
          "portfolio_id": {
            "description": "a portfolio id of yours (pf_...)",
            "title": "Portfolio Id",
            "type": "string"
          }
        },
        "required": [
          "portfolio_id"
        ],
        "title": "get_live_stageArguments",
        "type": "object"
      },
      "name": "get_live_stage",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Look-through exposure of one of your portfolios: each held fund\n(an ETF) split into what it holds, then summed by sector, country\nand single name. Your real Apple weight counts AAPL plus its share\nof SPY and QQQ. Funds without a holdings list stay whole.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "top": {
            "default": 20,
            "description": "single names to list",
            "maximum": 100,
            "minimum": 1,
            "title": "Top",
            "type": "integer"
          }
        },
        "title": "get_look_throughArguments",
        "type": "object"
      },
      "name": "get_look_through",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Market breadth from the lake, display only: advances and declines,\nthe share of stocks above their 50 and 200 day averages, new one year\nhighs and lows, and distribution days on the index (falls of 0.2% or\nmore on higher volume), each with a plain sentence.",
      "input_schema": {
        "properties": {
          "as_of": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "As Of"
          }
        },
        "title": "get_market_breadthArguments",
        "type": "object"
      },
      "name": "get_market_breadth",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Live calibration of a classifier version's probability forecasts:\nBrier score against the base rate, skill, expected calibration error\nand the reliability table. Empty for a model with no forecasts.",
      "input_schema": {
        "properties": {
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          },
          "version": {
            "description": "the model version number",
            "minimum": 1,
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "strategy_id",
          "version"
        ],
        "title": "get_model_calibrationArguments",
        "type": "object"
      },
      "name": "get_model_calibration",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "A strategy's append-only version log (baseline, candidate, swap,\nreject, supersede, fail), with actor, reason and swap check result.",
      "input_schema": {
        "properties": {
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          }
        },
        "required": [
          "strategy_id"
        ],
        "title": "get_model_version_historyArguments",
        "type": "object"
      },
      "name": "get_model_version_history",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your own risk limits next to the system policy, what your\nportfolios follow (the system tightened by yours) and any of yours\nthat are looser than the system and so change nothing.",
      "input_schema": {
        "properties": {},
        "title": "get_my_risk_limitsArguments",
        "type": "object"
      },
      "name": "get_my_risk_limits",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The newest articles on the scope's tickers and their daily\nsentiment over the last 30 days. Scope all is refused.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "maximum": 200,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "scope": {
            "default": "holdings",
            "description": "holdings (default), watchlists, tickers or all",
            "enum": [
              "holdings",
              "watchlists",
              "tickers",
              "all"
            ],
            "title": "Scope",
            "type": "string"
          },
          "tickers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 500,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "instrument ids (scope tickers)",
            "title": "Tickers"
          },
          "watchlist_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your watchlists (scope watchlists)",
            "title": "Watchlist Id"
          }
        },
        "title": "get_newsArguments",
        "type": "object"
      },
      "name": "get_news",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your notification settings: which categories (signals, orders,\nrisk, system, price alerts, event alerts) go to which channel, the\nupcoming-event alert kinds you get, and your quiet hours. The webhook\nshows its host only.",
      "input_schema": {
        "properties": {},
        "title": "get_notification_preferencesArguments",
        "type": "object"
      },
      "name": "get_notification_preferences",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One expiry of a stored option chain with our implied vol and\nGreeks, calls and puts by strike. Theta is money per share per day,\nvega money per share per vol point.",
      "input_schema": {
        "properties": {
          "as_of": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "the last stored day on or before it; default latest",
            "title": "As Of"
          },
          "expiry": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "default: the expiry nearest 30 days out",
            "title": "Expiry"
          },
          "underlying": {
            "description": "instrument id, e.g. AAPL.US or BTC-USD.CC",
            "title": "Underlying",
            "type": "string"
          }
        },
        "required": [
          "underlying"
        ],
        "title": "get_option_chainArguments",
        "type": "object"
      },
      "name": "get_option_chain",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One unit of a structure picked from a stored chain, its legs and\nits profit at expiry over a range of underlying prices, with max\nloss, max gain (null: no bound) and breakevens.",
      "input_schema": {
        "properties": {
          "as_of": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "As Of"
          },
          "delta": {
            "anyOf": [
              {
                "exclusiveMaximum": 1.0,
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "absolute target delta, e.g. 0.30",
            "title": "Delta"
          },
          "dte": {
            "default": 35,
            "description": "target days to expiry",
            "maximum": 400,
            "minimum": 1,
            "title": "Dte",
            "type": "integer"
          },
          "long_delta": {
            "anyOf": [
              {
                "exclusiveMaximum": 1.0,
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "absolute target delta, e.g. 0.30",
            "title": "Long Delta"
          },
          "short_delta": {
            "anyOf": [
              {
                "exclusiveMaximum": 1.0,
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "absolute target delta, e.g. 0.30",
            "title": "Short Delta"
          },
          "structure": {
            "description": "a name from list_option_structures",
            "title": "Structure",
            "type": "string"
          },
          "underlying": {
            "description": "instrument id, e.g. AAPL.US or BTC-USD.CC",
            "title": "Underlying",
            "type": "string"
          },
          "wing_delta": {
            "anyOf": [
              {
                "exclusiveMaximum": 1.0,
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "absolute target delta, e.g. 0.30",
            "title": "Wing Delta"
          }
        },
        "required": [
          "underlying",
          "structure"
        ],
        "title": "get_option_payoffArguments",
        "type": "object"
      },
      "name": "get_option_payoff",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Whether an option order may open in a live portfolio (off by\ndefault), with every reason it may not: the admin's switch, the\nlive stage and the options approval level (none, covered, spreads,\nnaked). Setting the level needs a fresh second factor in the web app.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "description": "a portfolio id of yours (pf_...)",
            "title": "Portfolio Id",
            "type": "string"
          }
        },
        "required": [
          "portfolio_id"
        ],
        "title": "get_options_liveArguments",
        "type": "object"
      },
      "name": "get_options_live",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One of your orders in full: decision price and context, arrival\nand fill prices, the shortfall split and the notes.",
      "input_schema": {
        "properties": {
          "client_id": {
            "title": "Client Id",
            "type": "string"
          }
        },
        "required": [
          "client_id"
        ],
        "title": "get_order_tcaArguments",
        "type": "object"
      },
      "name": "get_order_tca",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Daily P&L of one of your portfolios (last snapshot per UTC day). Returns\nand drawdown are measured from inception even when since trims the rows.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "since": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD; first day to include",
            "title": "Since"
          }
        },
        "title": "get_pnlArguments",
        "type": "object"
      },
      "name": "get_pnl",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Realised P&L of closed trades by exit day, with weekly and\nmonthly totals, in the portfolio's base currency.",
      "input_schema": {
        "properties": {
          "origin": {
            "anyOf": [
              {
                "enum": [
                  "strategy",
                  "manual"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "strategy or manual orders",
            "title": "Origin"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          },
          "since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Since"
          },
          "sleeve": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Sleeve"
          },
          "until": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Until"
          }
        },
        "title": "get_pnl_calendarArguments",
        "type": "object"
      },
      "name": "get_pnl_calendar",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Current portfolio: cash, positions valued at the latest stored closes,\nweights and total value, from the latest snapshot.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          }
        },
        "title": "get_portfolioArguments",
        "type": "object"
      },
      "name": "get_portfolio",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Admins only: cash and value summed across every active portfolio (no holdings).",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "get_portfolio_totals",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The newest second-source price check: each held and signalled\nticker's vendor close and adjusted return against a second source,\nand the tickers whose opening orders the tick holds (`held`). Null\nbefore the first check.",
      "input_schema": {
        "properties": {},
        "title": "get_price_checkArguments",
        "type": "object"
      },
      "name": "get_price_check",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One reconcile report: every unexplained drift item, what the check\nexplained itself, and the owner's own positions and orders it kept\napart (never drift).",
      "input_schema": {
        "properties": {
          "report_id": {
            "title": "Report Id",
            "type": "string"
          }
        },
        "required": [
          "report_id"
        ],
        "title": "get_reconcile_reportArguments",
        "type": "object"
      },
      "name": "get_reconcile_report",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One research session with every proposal: its hypothesis, whether\nit ran or why not, and its lab run in the trial ledger.",
      "input_schema": {
        "properties": {
          "session_id": {
            "description": "the rs_... id",
            "maxLength": 64,
            "minLength": 1,
            "title": "Session Id",
            "type": "string"
          }
        },
        "required": [
          "session_id"
        ],
        "title": "get_research_sessionArguments",
        "type": "object"
      },
      "name": "get_research_session",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The [production.risk] limits applied between a strategy's orders and the broker (max weights, order caps, ...).",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "get_risk_policy",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One trade with every leg (each partial exit) and its review.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          },
          "trade_id": {
            "description": "the id of the opening fill",
            "minimum": 1,
            "title": "Trade Id",
            "type": "integer"
          }
        },
        "required": [
          "trade_id"
        ],
        "title": "get_round_tripArguments",
        "type": "object"
      },
      "name": "get_round_trip",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "JSON Schema of a Studio rule spec (version 1): indicators, entry/exit conditions, ranking. Use it to write a draft's spec.",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "get_rule_schema",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The scheduler: each job with its next run and last outcome, the\nmost recent runs (did last night's trading run go?), and the market\nsession today and next (open, close, and whether it is open now).",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 20,
            "description": "recent runs to show",
            "maximum": 200,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          }
        },
        "title": "get_scheduleArguments",
        "type": "object"
      },
      "name": "get_schedule",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One of your saved screens with its spec.",
      "input_schema": {
        "properties": {
          "screen_id": {
            "title": "Screen Id",
            "type": "string"
          }
        },
        "required": [
          "screen_id"
        ],
        "title": "get_screenArguments",
        "type": "object"
      },
      "name": "get_screen",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Daily P&L of one shadow strategy's virtual portfolio.",
      "input_schema": {
        "properties": {
          "since": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD; first day to include",
            "title": "Since"
          },
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          }
        },
        "required": [
          "strategy_id"
        ],
        "title": "get_shadow_pnlArguments",
        "type": "object"
      },
      "name": "get_shadow_pnl",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One registered strategy with its survival-test reports (pass/fail and metrics).",
      "input_schema": {
        "properties": {
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          }
        },
        "required": [
          "strategy_id"
        ],
        "title": "get_strategyArguments",
        "type": "object"
      },
      "name": "get_strategy",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "For each holding of one of your portfolios: whether each active\nstrategy's latest signal agrees or disagrees with it, and why.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          }
        },
        "title": "get_strategy_agreementArguments",
        "type": "object"
      },
      "name": "get_strategy_agreement",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "A strategy's audited status changes (actor, reason, override, go-live\nresult), oldest first.",
      "input_schema": {
        "properties": {
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          }
        },
        "required": [
          "strategy_id"
        ],
        "title": "get_strategy_historyArguments",
        "type": "object"
      },
      "name": "get_strategy_history",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The live intraday engine: live or not, its market, the dead-man\n(`silent` after no bar close for `deadman_minutes` in market hours), the\nstream (connected, last event age, bars built, late ticks), dispatch lag\nand event to order latency. `engines` is empty until an engine runs.",
      "input_schema": {
        "properties": {},
        "title": "get_stream_statusArguments",
        "type": "object"
      },
      "name": "get_stream_status",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "What the Studio allows on this server: whether code drafts are allowed (an operator setting MCP cannot change) and the draft kinds you can create.",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "get_studio_capabilities",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One of your portfolios' base currency and tax settings: the\njurisdiction (us, eu or uk), the lot method (fifo or specific) and\nwhether US wash sales are adjusted.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          }
        },
        "title": "get_tax_settingsArguments",
        "type": "object"
      },
      "name": "get_tax_settings",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The gains one of your portfolios realised this year (or ``year``)\nand the estimated tax owed on them, in its base currency.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "year": {
            "anyOf": [
              {
                "maximum": 2200,
                "minimum": 1900,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Year"
          }
        },
        "title": "get_tax_yearArguments",
        "type": "object"
      },
      "name": "get_tax_year",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Implementation shortfall of your orders in bps of notional:\ndelay (decision to arrival), impact (arrival to fill), fees and the\nopportunity cost of what did not fill, next to the cost model's\nestimate (model_gap_bps = realised minus modelled).",
      "input_schema": {
        "properties": {
          "by": {
            "default": "all",
            "description": "how to group the orders",
            "enum": [
              "all",
              "strategy",
              "ticker",
              "portfolio",
              "day",
              "week",
              "month"
            ],
            "title": "By",
            "type": "string"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          },
          "since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Since"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Strategy Id"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ticker"
          },
          "until": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Until"
          }
        },
        "title": "get_tca_summaryArguments",
        "type": "object"
      },
      "name": "get_tca_summary",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One strategy on one page: paper figures and value curve, monthly\nreturns, recent model-book trades, survival verdicts, the go-live\nreport and the status history.",
      "input_schema": {
        "properties": {
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          }
        },
        "required": [
          "strategy_id"
        ],
        "title": "get_tear_sheetArguments",
        "type": "object"
      },
      "name": "get_tear_sheet",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One production tick run with the orders it placed in your\nportfolios (or in ``portfolio_id`` only).",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "tick_id": {
            "title": "Tick Id",
            "type": "string"
          }
        },
        "required": [
          "tick_id"
        ],
        "title": "get_tickArguments",
        "type": "object"
      },
      "name": "get_tick",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One order ticket: the order, why the book wants it, the rules\nthat touched it, and what became of it.",
      "input_schema": {
        "properties": {
          "ticket_id": {
            "title": "Ticket Id",
            "type": "string"
          }
        },
        "required": [
          "ticket_id"
        ],
        "title": "get_ticketArguments",
        "type": "object"
      },
      "name": "get_ticket",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One stored universe definition.",
      "input_schema": {
        "properties": {
          "universe_id": {
            "description": "universe id, e.g. sp500 or us_common",
            "title": "Universe Id",
            "type": "string"
          }
        },
        "required": [
          "universe_id"
        ],
        "title": "get_universeArguments",
        "type": "object"
      },
      "name": "get_universe",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Membership spans of a universe, latest change first: each ticker\njoined on start_date (null: from the start) and left on end_date\n(null: still a member).",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 100,
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "keep tickers containing this, e.g. AAPL",
            "title": "Ticker"
          },
          "universe_id": {
            "description": "universe id, e.g. sp500 or us_common",
            "title": "Universe Id",
            "type": "string"
          }
        },
        "required": [
          "universe_id"
        ],
        "title": "get_universe_historyArguments",
        "type": "object"
      },
      "name": "get_universe_history",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Members of a universe on a date (default today), point in time:\nnames that later died are members on the days they were listed.",
      "input_schema": {
        "properties": {
          "as_of": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "As Of"
          },
          "universe_id": {
            "description": "universe id, e.g. sp500 or us_common",
            "title": "Universe Id",
            "type": "string"
          }
        },
        "required": [
          "universe_id"
        ],
        "title": "get_universe_membersArguments",
        "type": "object"
      },
      "name": "get_universe_members",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "One of your watchlists with its tickers.",
      "input_schema": {
        "properties": {
          "watchlist_id": {
            "title": "Watchlist Id",
            "type": "string"
          }
        },
        "required": [
          "watchlist_id"
        ],
        "title": "get_watchlistArguments",
        "type": "object"
      },
      "name": "get_watchlist",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Deprecated alias of get_api_health. Check that the Stonks API is up and report its version.",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "health",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Import an index's constituents and changes. CSV columns\ndate,ticker,action with action add, remove or member. Without\nconfirm=true returns a preview.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "content": {
            "description": "the CSV or JSON text",
            "title": "Content",
            "type": "string"
          },
          "format": {
            "default": "csv",
            "enum": [
              "csv",
              "json"
            ],
            "title": "Format",
            "type": "string"
          },
          "index_id": {
            "description": "lower_snake_case index code, e.g. sp500",
            "title": "Index Id",
            "type": "string"
          }
        },
        "required": [
          "index_id",
          "content"
        ],
        "title": "import_index_historyArguments",
        "type": "object"
      },
      "name": "import_index_history",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Deprecated alias of run_draft_lab. Queue tune -> fit -> survival suite for a draft (a rule draft's spec\nis fixed; a code draft is tuned). Returns the job; wait_for_job gives\nthe verdict and survival reports. Registering (register_strategy, or\nregister_if_passes for a passing run only) needs confirm=true\n(preview otherwise), like register_draft.",
      "input_schema": {
        "properties": {
          "benchmark": {
            "anyOf": [
              {
                "maxLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "benchmark to compare against: auto (SPY.US when priced, else EW), EW (equal-weight universe), a ticker such as QQQ.US, or none; default [lab] benchmark",
            "title": "Benchmark"
          },
          "budget": {
            "default": 20,
            "description": "tuner trials",
            "maximum": 1000,
            "minimum": 1,
            "title": "Budget",
            "type": "integer"
          },
          "confirm": {
            "default": false,
            "description": "must be true with register_strategy / register_if_passes; otherwise a preview",
            "title": "Confirm",
            "type": "boolean"
          },
          "cost_model": {
            "anyOf": [
              {
                "enum": [
                  "zero",
                  "realistic",
                  "ibkr_tiered",
                  "ibkr_fixed"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "transaction-cost preset (see list_cost_models); default [backtest.costs]",
            "title": "Cost Model"
          },
          "draft_id": {
            "title": "Draft Id",
            "type": "string"
          },
          "embargo_bars": {
            "anyOf": [
              {
                "maximum": 10000,
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "trading bars skipped between the train and validation windows (a strategy's label horizon raises it); default [lab] embargo_bars",
            "title": "Embargo Bars"
          },
          "end": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "End",
            "type": "string"
          },
          "hypothesis": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "the edge and who pays for it; recorded before tuning (trial ledger)",
            "title": "Hypothesis"
          },
          "interval": {
            "default": "1d",
            "title": "Interval",
            "type": "string"
          },
          "objective": {
            "default": "sharpe",
            "description": "an objective: sharpe, cagr, final_return, sortino, calmar, sharpe_dd, multi, a cv_ variant or another from list_lab_objectives",
            "pattern": "^[a-z][a-z0-9_]{0,63}$",
            "title": "Objective",
            "type": "string"
          },
          "premortem": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "how the strategy is expected to fail; recorded",
            "title": "Premortem"
          },
          "preset": {
            "anyOf": [
              {
                "enum": [
                  "quick",
                  "standard",
                  "promotion"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "named survival suite when survival_tests is omitted (default: promotion when registering, else quick)",
            "title": "Preset"
          },
          "register_if_passes": {
            "default": false,
            "description": "register the result in shadow only if every survival test passes (needs confirm=true)",
            "title": "Register If Passes",
            "type": "boolean"
          },
          "register_strategy": {
            "default": false,
            "description": "register the result in shadow status whatever the verdict (needs confirm=true)",
            "title": "Register Strategy",
            "type": "boolean"
          },
          "seed": {
            "default": 0,
            "title": "Seed",
            "type": "integer"
          },
          "start": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "Start",
            "type": "string"
          },
          "survival_tests": {
            "anyOf": [
              {
                "items": {
                  "description": "a survival test id (list_survival_tests)",
                  "pattern": "^[a-z][a-z0-9_]{0,63}$",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "survival suite; server default when omitted",
            "title": "Survival Tests"
          },
          "test_options": {
            "anyOf": [
              {
                "additionalProperties": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "options per survival test id, validated by each test (422 on an unknown test or option), e.g. {\"oos\": {\"mode\": \"sharpe\", \"min_trades\": 0}, \"deflated_sharpe\": {\"min_dsr\": 0.9}, \"pbo\": {\"max_pbo\": 0.3}, \"mc_trades\": {\"n_paths\": 2000}, \"cost_stress\": {\"stress_multiplier\": 3}}; each test must be in the suite",
            "title": "Test Options"
          },
          "train_ratio": {
            "default": 0.7,
            "exclusiveMaximum": 1,
            "exclusiveMinimum": 0,
            "title": "Train Ratio",
            "type": "number"
          },
          "tuner": {
            "default": "random",
            "description": "a tuner: grid, random, optuna, prescreen or another from list_lab_tuners",
            "pattern": "^[a-z][a-z0-9_]{0,63}$",
            "title": "Tuner",
            "type": "string"
          },
          "universe": {
            "description": "instrument ids",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Universe",
            "type": "array"
          }
        },
        "required": [
          "draft_id",
          "universe",
          "start",
          "end"
        ],
        "title": "run_draft_labArguments",
        "type": "object"
      },
      "name": "lab_run_draft",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "System alerts for you, newest first (admins also see operational\nalerts with no single recipient): failed runs, halts, stale data.",
      "input_schema": {
        "properties": {
          "level": {
            "anyOf": [
              {
                "enum": [
                  "info",
                  "warning",
                  "error"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Level"
          },
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          }
        },
        "title": "list_alertsArguments",
        "type": "object"
      },
      "name": "list_alerts",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Parent orders Stonks works as child slices (TWAP, VWAP at a broker\nwithout them), with each slice's state.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "title": "Portfolio Id",
            "type": "string"
          }
        },
        "required": [
          "portfolio_id"
        ],
        "title": "list_algo_parentsArguments",
        "type": "object"
      },
      "name": "list_algo_parents",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Every deposit and withdrawal of one of your portfolios, oldest\nfirst: recorded ones and those a broker sync brought in. Returns take\nthem out, so a deposit is never profit.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 200,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "portfolio_id": {
            "title": "Portfolio Id",
            "type": "string"
          }
        },
        "required": [
          "portfolio_id"
        ],
        "title": "list_cash_flowsArguments",
        "type": "object"
      },
      "name": "list_cash_flows",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your broker connections: provider, status, last sync and error.\nNever includes credentials.",
      "input_schema": {
        "properties": {},
        "title": "list_connectionsArguments",
        "type": "object"
      },
      "name": "list_connections",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Transaction-cost presets run_backtest accepts as cost_model, with their settings.",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "list_cost_models",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Studio drafts (strategies being edited), with status and registered strategy.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          }
        },
        "title": "list_draftsArguments",
        "type": "object"
      },
      "name": "list_drafts",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The upcoming-event alert kinds (earnings, ex-dividend) and how\nmany days ahead each looks by default.",
      "input_schema": {
        "properties": {},
        "title": "list_event_alert_kindsArguments",
        "type": "object"
      },
      "name": "list_event_alert_kinds",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Every execution algo (Adaptive, TWAP, VWAP): its parameters,\ndefaults, whether Stonks can slice it at brokers without it, and the\ncosts the backtest assumes for it.",
      "input_schema": {
        "properties": {},
        "title": "list_execution_algosArguments",
        "type": "object"
      },
      "name": "list_execution_algos",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The factor library: every factor with its family, direction,\nformula and hypothesis, plus the sets and families to filter by.",
      "input_schema": {
        "properties": {
          "family": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "e.g. momentum, value, kbar",
            "title": "Family"
          },
          "kind": {
            "anyOf": [
              {
                "enum": [
                  "expression",
                  "fundamental"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Kind"
          },
          "set": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "alpha158, classic or fundamentals",
            "title": "Set"
          }
        },
        "title": "list_factorsArguments",
        "type": "object"
      },
      "name": "list_factors",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Fills (executions) of orders, with optional filters.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "order_client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Order Client Id"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "tick_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tick Id"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ticker"
          }
        },
        "title": "list_fillsArguments",
        "type": "object"
      },
      "name": "list_fills",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Halts you can see, newest first: the kill switch, circuit-breaker\ntrips (month loss, week loss, latched drawdown) and the operational\nhalt. By default only those in force today.",
      "input_schema": {
        "properties": {
          "include_cleared": {
            "default": false,
            "title": "Include Cleared",
            "type": "boolean"
          }
        },
        "title": "list_haltsArguments",
        "type": "object"
      },
      "name": "list_halts",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Market-data ingest runs (source, kind, tickers ok/failed, status).",
      "input_schema": {
        "properties": {
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Kind"
          },
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Status"
          }
        },
        "title": "list_ingest_runsArguments",
        "type": "object"
      },
      "name": "list_ingest_runs",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Intraday P&L and risk snapshots of one of your portfolios for one\nday, newest first, one every few minutes of the session: realised\nand unrealised P&L from live marks, fees, the day's return, the\ndrawdown from the day's high, gross and net exposure, and how many\nheld names had a stale or missing mark.",
      "input_schema": {
        "properties": {
          "all_books": {
            "default": false,
            "description": "every book: the whole portfolio and each sleeve",
            "title": "All Books",
            "type": "boolean"
          },
          "day": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD; default the latest day with rows",
            "title": "Day"
          },
          "limit": {
            "default": 50,
            "maximum": 200,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one strategy's sleeve; default the whole portfolio",
            "title": "Strategy Id"
          }
        },
        "title": "list_intraday_snapshotsArguments",
        "type": "object"
      },
      "name": "list_intraday_snapshots",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Background jobs (backtests, lab runs, ingests, ticks), newest first.",
      "input_schema": {
        "properties": {
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "backtest, lab_run, ingest, tick, studio_backtest, studio_lab_run",
            "title": "Kind"
          },
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "status": {
            "anyOf": [
              {
                "enum": [
                  "queued",
                  "running",
                  "succeeded",
                  "failed",
                  "cancelled"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Status"
          }
        },
        "title": "list_jobsArguments",
        "type": "object"
      },
      "name": "list_jobs",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Every objective a lab run can score trials with (the names objective takes), with a label and what it measures.",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "list_lab_objectives",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Every tuner a lab run can search with (the names tuner takes), with a label and the options schema of each.",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "list_lab_tuners",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The trial ledger: every recorded lab run, newest first, with its\nhypothesis, tuner, budget, trials run and failed, best score and\nverdict. Trials of a class add up across runs, which is what the\ndeflated Sharpe and other multiple-testing checks count.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "strategy_class": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "only runs of this module:Class",
            "title": "Strategy Class"
          }
        },
        "title": "list_ledger_runsArguments",
        "type": "object"
      },
      "name": "list_ledger_runs",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Every candidate model version running as a model book, across strategies.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 100,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          }
        },
        "title": "list_model_candidatesArguments",
        "type": "object"
      },
      "name": "list_model_candidates",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "A strategy's model versions, oldest first: the live one, candidates\nrunning as model books beside it, and archived, rejected or failed fits.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 100,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          }
        },
        "required": [
          "strategy_id"
        ],
        "title": "list_model_versionsArguments",
        "type": "object"
      },
      "name": "list_model_versions",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your notification feed, newest first, with the unread count: what\nStonks told you (signals, fills, halts, failed runs), each with a\ncategory, level, message and a link into the console.",
      "input_schema": {
        "properties": {
          "before_id": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "page: only items with a lower id",
            "title": "Before Id"
          },
          "limit": {
            "default": 50,
            "maximum": 200,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "unread_only": {
            "default": false,
            "title": "Unread Only",
            "type": "boolean"
          }
        },
        "title": "list_notificationsArguments",
        "type": "object"
      },
      "name": "list_notifications",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The options strategy catalog: each strategy's hypothesis, the\nstructures it opens and its parameters.",
      "input_schema": {
        "properties": {},
        "title": "list_option_strategiesArguments",
        "type": "object"
      },
      "name": "list_option_strategies",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Structures a payoff can be drawn for, with the parameters each\nreads (dte, delta, long_delta, short_delta, wing_delta).",
      "input_schema": {
        "properties": {},
        "title": "list_option_structuresArguments",
        "type": "object"
      },
      "name": "list_option_structures",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Underlyings with stored option chains: first and last day, days,\ncontracts and sources. synthetic=true means generated chains, fine\nfor trying the tools but never evidence.",
      "input_schema": {
        "properties": {},
        "title": "list_option_underlyingsArguments",
        "type": "object"
      },
      "name": "list_option_underlyings",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your order drafts, newest first: proposed orders waiting for your\napproval in the web app, and what became of the others.",
      "input_schema": {
        "properties": {
          "status": {
            "anyOf": [
              {
                "enum": [
                  "pending",
                  "placed",
                  "rejected",
                  "expired",
                  "cancelled"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Status"
          }
        },
        "title": "list_order_draftsArguments",
        "type": "object"
      },
      "name": "list_order_drafts",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Orders placed by production ticks, newest first, with optional filters.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Status"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Strategy Id"
          },
          "tick_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tick Id"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ticker"
          }
        },
        "title": "list_ordersArguments",
        "type": "object"
      },
      "name": "list_orders",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your playbooks: the setups you trade, with their rules.",
      "input_schema": {
        "properties": {
          "include_archived": {
            "default": false,
            "title": "Include Archived",
            "type": "boolean"
          }
        },
        "title": "list_playbooksArguments",
        "type": "object"
      },
      "name": "list_playbooks",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Portfolio history: one snapshot per production tick, newest first.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          }
        },
        "title": "list_portfolio_snapshotsArguments",
        "type": "object"
      },
      "name": "list_portfolio_snapshots",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your portfolios, oldest first, each marked paper or live.",
      "input_schema": {
        "properties": {},
        "title": "list_portfoliosArguments",
        "type": "object"
      },
      "name": "list_portfolios",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "When your price alerts fired, newest first.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "rule_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Rule Id"
          }
        },
        "title": "list_price_alert_eventsArguments",
        "type": "object"
      },
      "name": "list_price_alert_events",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your price alert rules, with the price each last saw per ticker.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 100,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          }
        },
        "title": "list_price_alertsArguments",
        "type": "object"
      },
      "name": "list_price_alerts",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The latest checks of your live portfolios against their brokers,\nnewest first. Status clean, warn (an alert only), drift (opened the\nbroker_drift halt and paused auto), outage (the day was skipped) or\nfault (auto paused).",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 20,
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          }
        },
        "title": "list_reconcile_reportsArguments",
        "type": "object"
      },
      "name": "list_reconcile_reports",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your AI research sessions, newest first: goal, budgets used, status.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          }
        },
        "title": "list_research_sessionsArguments",
        "type": "object"
      },
      "name": "list_research_sessions",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Daily risk snapshots of one of your portfolios, newest first:\nVaR, ES, the day's hypothetical return, violations and decay.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "maximum": 200,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          },
          "since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Since"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one strategy's sleeve; default the whole portfolio",
            "title": "Strategy Id"
          }
        },
        "title": "list_risk_snapshotsArguments",
        "type": "object"
      },
      "name": "list_risk_snapshots",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your round trips built from fills, open first then newest exit\nfirst: entry and exit, holding days, P&L, adverse and favourable\nexcursion, R multiple (when a stop is known), exit efficiency, and\nyour tags, mistakes and playbook.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "maximum": 200,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "mistake": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Mistake"
          },
          "offset": {
            "default": 0,
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "origin": {
            "anyOf": [
              {
                "enum": [
                  "strategy",
                  "manual"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "strategy or manual orders",
            "title": "Origin"
          },
          "plan": {
            "anyOf": [
              {
                "enum": [
                  "followed",
                  "broke",
                  "not_said"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "whether the plan was followed",
            "title": "Plan"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          },
          "since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Since"
          },
          "sleeve": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one strategy id, or manual",
            "title": "Sleeve"
          },
          "status": {
            "default": "all",
            "description": "all, open or closed",
            "enum": [
              "all",
              "open",
              "closed"
            ],
            "title": "Status",
            "type": "string"
          },
          "tag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tag"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ticker"
          },
          "until": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Until"
          }
        },
        "title": "list_round_tripsArguments",
        "type": "object"
      },
      "name": "list_round_trips",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "When your screens found names that newly match, newest first.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "screen_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Screen Id"
          }
        },
        "title": "list_screen_alert_eventsArguments",
        "type": "object"
      },
      "name": "list_screen_alert_events",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your screen alerts: which saved screens alert, daily or weekly,\nthe last day each ran and how many names it matched.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 100,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          }
        },
        "title": "list_screen_alertsArguments",
        "type": "object"
      },
      "name": "list_screen_alerts",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Every metric a screen may filter or sort on: id, group (price or\nfundamental), unit and what it measures.",
      "input_schema": {
        "properties": {},
        "title": "list_screen_metricsArguments",
        "type": "object"
      },
      "name": "list_screen_metrics",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your saved screens, oldest first.",
      "input_schema": {
        "properties": {},
        "title": "list_screensArguments",
        "type": "object"
      },
      "name": "list_screens",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Virtual orders shadow strategies placed (never sent to a broker), newest first.",
      "input_schema": {
        "properties": {
          "as_of": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "As Of"
          },
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Strategy Id"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ticker"
          }
        },
        "title": "list_shadow_decisionsArguments",
        "type": "object"
      },
      "name": "list_shadow_decisions",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Latest value, return and worst drawdown of every shadow strategy's\nvirtual portfolio.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "since": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD; first day to include",
            "title": "Since"
          }
        },
        "title": "list_shadow_pnlArguments",
        "type": "object"
      },
      "name": "list_shadow_pnl",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Market-data sources an ingest can name, which is the default, and whether each is configured.",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "list_sources",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Statement periods the accounting audit flagged (BL-36): balance\nidentity, net income and cash mismatches, quarters vs annual, filings\ndated before period end, negative shares. Error flags make lab\npreflight warn.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "severity": {
            "anyOf": [
              {
                "enum": [
                  "error",
                  "warning"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "only this severity",
            "title": "Severity"
          },
          "ticker": {
            "anyOf": [
              {
                "description": "instrument id, e.g. AAPL.US or BTC-USD.CC",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ticker"
          }
        },
        "title": "list_statement_flagsArguments",
        "type": "object"
      },
      "name": "list_statement_flags",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Registered strategies (id, class, params, status), optionally by status\nor a search term.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "q": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "case-insensitive substring of the id or class path",
            "title": "Q"
          },
          "status": {
            "anyOf": [
              {
                "enum": [
                  "active",
                  "shadow",
                  "retired"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Status"
          }
        },
        "title": "list_strategiesArguments",
        "type": "object"
      },
      "name": "list_strategies",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Starter rule specs (id, title, description, spec) for building a rule draft.",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "list_studio_templates",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your subscriptions: strategy, portfolio, mode (notify, paper,\nauto), whether it is on, the paper-day count and what still blocks\nauto.",
      "input_schema": {
        "properties": {},
        "title": "list_subscriptionsArguments",
        "type": "object"
      },
      "name": "list_subscriptions",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The named survival suites (quick, standard, promotion) and the tests in each.",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "list_survival_presets",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Every survival test a lab run can name (the ids survival_tests takes), with what it checks and its options schema (the keys test_options takes).",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "list_survival_tests",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The specific lots each sell closes (used with lot method specific).",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "sell_fill_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Sell Fill Id"
          }
        },
        "title": "list_tax_lot_picksArguments",
        "type": "object"
      },
      "name": "list_tax_lot_picks",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your order tickets, newest first: the orders a live book decided\nafter the close. Approve mode tickets wait for your approval in the\nweb app (a fresh second factor, never through MCP). Approved ones are\nsent before the next open.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "status": {
            "anyOf": [
              {
                "enum": [
                  "awaiting_approval",
                  "approved",
                  "rejected",
                  "expired",
                  "submitted",
                  "filled",
                  "unfilled",
                  "cancelled",
                  "failed"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Status"
          }
        },
        "title": "list_ticketsArguments",
        "type": "object"
      },
      "name": "list_tickets",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Production tick runs, newest first. Summaries show the global\noutcome and the parts about your own portfolios only.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Status"
          }
        },
        "title": "list_ticksArguments",
        "type": "object"
      },
      "name": "list_ticks",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Why a ticker did or did not trade in one of your portfolios,\nnewest first. Each row names the step that kept it out or trimmed\nit: universe, rank (another pick won), constructor (no weight),\nbuffer (inside the no-trade band), stale_price, risk_rule (with the\nrule and the quantities), lots (rounded to tradable lots or\nskipped below one lot), scope, external, halt, held or traded.\nAsk with a ticker to answer \"why didn't we buy X\".",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 20,
            "maximum": 200,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          },
          "since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Since"
          },
          "strategy_id": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "rows this strategy owned or scored",
            "title": "Strategy Id"
          },
          "tick_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one tick",
            "title": "Tick Id"
          },
          "ticker": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one ticker, e.g. AAPL.US",
            "title": "Ticker"
          }
        },
        "title": "list_trade_decisionsArguments",
        "type": "object"
      },
      "name": "list_trade_decisions",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your orders, newest first: why each was placed (trigger, signal\nscore and rank), the outcome (shortfall, next-day move) and notes.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "maximum": 200,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          },
          "since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Since"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Strategy Id"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ticker"
          }
        },
        "title": "list_trade_journalArguments",
        "type": "object"
      },
      "name": "list_trade_journal",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "For each of your portfolios: paper or live money, and the broker\n(simulated ledger, the configured Alpaca account, or a linked\nconnection).",
      "input_schema": {
        "properties": {},
        "title": "list_trading_modesArguments",
        "type": "object"
      },
      "name": "list_trading_modes",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Exchanges our instruments name, with instrument counts, for an\nexchange universe's spec. The data source may list more.",
      "input_schema": {
        "properties": {},
        "title": "list_universe_exchangesArguments",
        "type": "object"
      },
      "name": "list_universe_exchanges",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Stored universes: id, kind, spec, last refresh and member count.",
      "input_schema": {
        "properties": {},
        "title": "list_universesArguments",
        "type": "object"
      },
      "name": "list_universes",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Your watchlists (named ticker lists), oldest first.",
      "input_schema": {
        "properties": {},
        "title": "list_watchlistsArguments",
        "type": "object"
      },
      "name": "list_watchlists",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Deprecated alias of get_live_risk. One of your portfolios on its latest tick day: one-day 95% and\n99% VaR and expected shortfall (fractions of value, loss positive),\nthe rolling VaR violation ratio (1.0 is right, outside 0.5 to 1.5\nmeans the risk model is off) with its Kupiec p-value, and per\nstrategy sleeve the same plus the alpha-decay check against the\nbacktest's IR.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          }
        },
        "title": "get_live_riskArguments",
        "type": "object"
      },
      "name": "live_risk",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Mark notifications read (all of yours when ids is omitted). Only\ntouches your own feed, and returns how many changed and the new unread\ncount.",
      "input_schema": {
        "properties": {
          "ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "maxItems": 500,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "notification ids, or omit to mark all of yours",
            "title": "Ids"
          }
        },
        "title": "mark_notifications_readArguments",
        "type": "object"
      },
      "name": "mark_notifications_read",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Deprecated alias of get_order_tca. One of your orders in full: decision price and context, arrival\nand fill prices, the shortfall split and the notes.",
      "input_schema": {
        "properties": {
          "client_id": {
            "title": "Client Id",
            "type": "string"
          }
        },
        "required": [
          "client_id"
        ],
        "title": "get_order_tcaArguments",
        "type": "object"
      },
      "name": "order_tca",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Place a manual order on one of your portfolios. It goes through the\nkill switch, every halt and every risk rule, like a strategy's order.\nWithout confirm=true returns the preview (what would be placed, the\nrisk rules' adjustments) and places nothing. Real-money books are\nrefused here: place those in the web app with a fresh second factor.",
      "input_schema": {
        "properties": {
          "allow_reduce": {
            "default": false,
            "description": "accept a smaller order when a risk rule shrinks it",
            "title": "Allow Reduce",
            "type": "boolean"
          },
          "client_id": {
            "anyOf": [
              {
                "pattern": "^[A-Za-z0-9_.\\-]{1,64}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "your idempotency key: the same key places the order once",
            "title": "Client Id"
          },
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "limit_price": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Limit Price"
          },
          "order_type": {
            "default": "market",
            "enum": [
              "market",
              "limit"
            ],
            "title": "Order Type",
            "type": "string"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "quantity": {
            "exclusiveMinimum": 0,
            "title": "Quantity",
            "type": "number"
          },
          "reason": {
            "description": "why you trade (recorded and audited)",
            "maxLength": 500,
            "minLength": 3,
            "title": "Reason",
            "type": "string"
          },
          "side": {
            "enum": [
              "buy",
              "sell"
            ],
            "title": "Side",
            "type": "string"
          },
          "ticker": {
            "description": "instrument id, e.g. AAPL.US or BTC-USD.CC",
            "title": "Ticker",
            "type": "string"
          }
        },
        "required": [
          "ticker",
          "side",
          "quantity",
          "reason"
        ],
        "title": "place_orderArguments",
        "type": "object"
      },
      "name": "place_order",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "The trades that move one of your portfolios to a strategy's model\nweights (source=strategy) or your own targets (source=targets): whole\nshares, costs, turnover and a tax preview. Writes and sends nothing.",
      "input_schema": {
        "properties": {
          "long_term_rate": {
            "anyOf": [
              {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "tax rate as a fraction",
            "title": "Long Term Rate"
          },
          "min_trade_value": {
            "default": 0.0,
            "minimum": 0,
            "title": "Min Trade Value",
            "type": "number"
          },
          "portfolio_id": {
            "title": "Portfolio Id",
            "type": "string"
          },
          "short_term_rate": {
            "anyOf": [
              {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "tax rate as a fraction",
            "title": "Short Term Rate"
          },
          "source": {
            "enum": [
              "strategy",
              "targets"
            ],
            "title": "Source",
            "type": "string"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Strategy Id"
          },
          "targets": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "your own targets, ticker to weight, e.g. {\"AAPL.US\": 0.3}",
            "title": "Targets"
          }
        },
        "required": [
          "portfolio_id",
          "source"
        ],
        "title": "plan_rebalanceArguments",
        "type": "object"
      },
      "name": "plan_rebalance",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Before a trade in one of your portfolios: the lots a sell closes\nunder your lot method, the realised gain and holding period, the\nestimated tax at the configured rate, the after-tax proceeds and a\nUS wash sale warning. An estimate, not tax advice. Places nothing.",
      "input_schema": {
        "properties": {
          "portfolio_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (not found otherwise); default: your own book",
            "title": "Portfolio Id"
          },
          "price": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Default: latest close",
            "title": "Price"
          },
          "quantity": {
            "exclusiveMinimum": 0,
            "maximum": 1000000000.0,
            "title": "Quantity",
            "type": "number"
          },
          "side": {
            "enum": [
              "buy",
              "sell"
            ],
            "title": "Side",
            "type": "string"
          },
          "ticker": {
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._\\-^=]{0,31}$",
            "title": "Ticker",
            "type": "string"
          }
        },
        "required": [
          "ticker",
          "side",
          "quantity"
        ],
        "title": "preview_trade_taxArguments",
        "type": "object"
      },
      "name": "preview_trade_tax",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Promote a strategy to active so production ticks rank and trade it.\nNeeds a passing go-live check, or override=true with a reason of at\nleast 20 characters; the change is audited. Without confirm=true\nreturns a preview (current status, survival results, warnings) and\nchanges nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "override": {
            "default": false,
            "description": "promote without a passing go-live check; needs a reason of at least 20 characters",
            "title": "Override",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "why (logged in the audit trail); required for demotions and overrides",
            "title": "Reason"
          },
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          }
        },
        "required": [
          "strategy_id"
        ],
        "title": "promote_strategyArguments",
        "type": "object"
      },
      "name": "promote_strategy",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": true,
        "read_only": false
      },
      "description": "Queue a refresh that rebuilds the universe's membership (an\nexchange universe lists symbols at the data source). Follow up with\nwait_for_job. Without confirm=true returns a preview.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "universe_id": {
            "description": "universe id, e.g. sp500 or us_common",
            "title": "Universe Id",
            "type": "string"
          }
        },
        "required": [
          "universe_id"
        ],
        "title": "refresh_universeArguments",
        "type": "object"
      },
      "name": "refresh_universe",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Register a draft's strategy in shadow (virtual portfolio, never traded\nuntil enabled). Without confirm=true returns a preview and changes nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "draft_id": {
            "title": "Draft Id",
            "type": "string"
          }
        },
        "required": [
          "draft_id"
        ],
        "title": "register_draftArguments",
        "type": "object"
      },
      "name": "register_draft",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Drop a candidate version: its model book stops and it can never\nswap in. Needs a reason. Without confirm=true returns a preview and\nchanges nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "why (logged in the audit trail); required for demotions and overrides",
            "title": "Reason"
          },
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          },
          "version": {
            "description": "the model version number",
            "minimum": 1,
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "strategy_id",
          "version"
        ],
        "title": "reject_model_versionArguments",
        "type": "object"
      },
      "name": "reject_model_version",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Retire a strategy: it stops being ranked or evaluated.\nNeeds a reason. Without confirm=true returns a preview and changes nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "why (logged in the audit trail); required for demotions and overrides",
            "title": "Reason"
          },
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          }
        },
        "required": [
          "strategy_id"
        ],
        "title": "retire_strategyArguments",
        "type": "object"
      },
      "name": "retire_strategy",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Queue a retrain. Each fit becomes a candidate version that runs as\na model book; nothing trades until a swap. Without confirm=true\nreturns a preview and queues nothing.",
      "input_schema": {
        "properties": {
          "as_of": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD, last day of the training window",
            "title": "As Of"
          },
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "force": {
            "default": false,
            "description": "refit even when a recent fit exists",
            "title": "Force",
            "type": "boolean"
          },
          "strategy_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "refit only these (default: every strategy that learns from data)",
            "title": "Strategy Ids"
          },
          "tickers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "tickers to fit on when a strategy records no lab universe",
            "title": "Tickers"
          }
        },
        "title": "retrain_modelsArguments",
        "type": "object"
      },
      "name": "retrain_models",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Deprecated alias of list_risk_snapshots. Daily risk snapshots of one of your portfolios, newest first:\nVaR, ES, the day's hypothetical return, violations and decay.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "maximum": 200,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          },
          "since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Since"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one strategy's sleeve; default the whole portfolio",
            "title": "Strategy Id"
          }
        },
        "title": "list_risk_snapshotsArguments",
        "type": "object"
      },
      "name": "risk_snapshots",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Queue a backtest of one strategy over typed tickers (universe) or a\nstored universe (universe_id) and a date window. Returns the job. Use\nwait_for_job to get the metrics and equity curve. Simulated only:\nnever places real orders.",
      "input_schema": {
        "properties": {
          "benchmark": {
            "anyOf": [
              {
                "maxLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "benchmark to compare against: auto (SPY.US when priced, else EW), EW (equal-weight universe), a ticker such as QQQ.US, or none; default [lab] benchmark",
            "title": "Benchmark"
          },
          "class_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "catalog class path, e.g. pkg.mod:Class",
            "title": "Class Path"
          },
          "cost_model": {
            "anyOf": [
              {
                "enum": [
                  "zero",
                  "realistic",
                  "ibkr_tiered",
                  "ibkr_fixed"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "transaction-cost preset (see list_cost_models); replaces slippage_bps/fee_per_trade. Neither: the configured [backtest.costs]",
            "title": "Cost Model"
          },
          "end": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "End",
            "type": "string"
          },
          "fee_per_trade": {
            "default": 0.0,
            "minimum": 0,
            "title": "Fee Per Trade",
            "type": "number"
          },
          "initial_cash": {
            "default": 10000.0,
            "exclusiveMinimum": 0,
            "title": "Initial Cash",
            "type": "number"
          },
          "interval": {
            "default": "1d",
            "title": "Interval",
            "type": "string"
          },
          "params": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "strategy params (with class_path)",
            "title": "Params"
          },
          "rebalance_every_bars": {
            "default": 1,
            "minimum": 1,
            "title": "Rebalance Every Bars",
            "type": "integer"
          },
          "slippage_bps": {
            "default": 0.0,
            "minimum": 0,
            "title": "Slippage Bps",
            "type": "number"
          },
          "start": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "Start",
            "type": "string"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "registered strategy id (or use class_path)",
            "title": "Strategy Id"
          },
          "threshold": {
            "default": 0.0,
            "title": "Threshold",
            "type": "number"
          },
          "universe": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "instrument ids, or give universe_id",
            "title": "Universe"
          },
          "universe_id": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9_.-]{0,63}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "a stored universe (see list_universes): its point-in-time members, delisted names included, instead of typed tickers",
            "title": "Universe Id"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "title": "run_backtestArguments",
        "type": "object"
      },
      "name": "run_backtest",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Queue a backtest of a draft. Returns the job; wait_for_job gives the\nBacktestResult. Simulated only: never places real orders.",
      "input_schema": {
        "properties": {
          "benchmark": {
            "anyOf": [
              {
                "maxLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "benchmark to compare against: auto (SPY.US when priced, else EW), EW (equal-weight universe), a ticker such as QQQ.US, or none; default [lab] benchmark",
            "title": "Benchmark"
          },
          "cost_model": {
            "anyOf": [
              {
                "enum": [
                  "zero",
                  "realistic",
                  "ibkr_tiered",
                  "ibkr_fixed"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "transaction-cost preset (see list_cost_models); default [backtest.costs]",
            "title": "Cost Model"
          },
          "draft_id": {
            "title": "Draft Id",
            "type": "string"
          },
          "end": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "End",
            "type": "string"
          },
          "fee_per_trade": {
            "default": 0.0,
            "minimum": 0,
            "title": "Fee Per Trade",
            "type": "number"
          },
          "initial_cash": {
            "default": 10000.0,
            "exclusiveMinimum": 0,
            "title": "Initial Cash",
            "type": "number"
          },
          "interval": {
            "default": "1d",
            "title": "Interval",
            "type": "string"
          },
          "rebalance_every_bars": {
            "default": 1,
            "minimum": 1,
            "title": "Rebalance Every Bars",
            "type": "integer"
          },
          "slippage_bps": {
            "default": 0.0,
            "minimum": 0,
            "title": "Slippage Bps",
            "type": "number"
          },
          "start": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "Start",
            "type": "string"
          },
          "threshold": {
            "default": 0.0,
            "title": "Threshold",
            "type": "number"
          },
          "universe": {
            "description": "instrument ids",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Universe",
            "type": "array"
          }
        },
        "required": [
          "draft_id",
          "universe",
          "start",
          "end"
        ],
        "title": "run_draft_backtestArguments",
        "type": "object"
      },
      "name": "run_draft_backtest",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Queue tune -> fit -> survival suite for a draft (a rule draft's spec\nis fixed; a code draft is tuned). Returns the job; wait_for_job gives\nthe verdict and survival reports. Registering (register_strategy, or\nregister_if_passes for a passing run only) needs confirm=true\n(preview otherwise), like register_draft.",
      "input_schema": {
        "properties": {
          "benchmark": {
            "anyOf": [
              {
                "maxLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "benchmark to compare against: auto (SPY.US when priced, else EW), EW (equal-weight universe), a ticker such as QQQ.US, or none; default [lab] benchmark",
            "title": "Benchmark"
          },
          "budget": {
            "default": 20,
            "description": "tuner trials",
            "maximum": 1000,
            "minimum": 1,
            "title": "Budget",
            "type": "integer"
          },
          "confirm": {
            "default": false,
            "description": "must be true with register_strategy / register_if_passes; otherwise a preview",
            "title": "Confirm",
            "type": "boolean"
          },
          "cost_model": {
            "anyOf": [
              {
                "enum": [
                  "zero",
                  "realistic",
                  "ibkr_tiered",
                  "ibkr_fixed"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "transaction-cost preset (see list_cost_models); default [backtest.costs]",
            "title": "Cost Model"
          },
          "draft_id": {
            "title": "Draft Id",
            "type": "string"
          },
          "embargo_bars": {
            "anyOf": [
              {
                "maximum": 10000,
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "trading bars skipped between the train and validation windows (a strategy's label horizon raises it); default [lab] embargo_bars",
            "title": "Embargo Bars"
          },
          "end": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "End",
            "type": "string"
          },
          "hypothesis": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "the edge and who pays for it; recorded before tuning (trial ledger)",
            "title": "Hypothesis"
          },
          "interval": {
            "default": "1d",
            "title": "Interval",
            "type": "string"
          },
          "objective": {
            "default": "sharpe",
            "description": "an objective: sharpe, cagr, final_return, sortino, calmar, sharpe_dd, multi, a cv_ variant or another from list_lab_objectives",
            "pattern": "^[a-z][a-z0-9_]{0,63}$",
            "title": "Objective",
            "type": "string"
          },
          "premortem": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "how the strategy is expected to fail; recorded",
            "title": "Premortem"
          },
          "preset": {
            "anyOf": [
              {
                "enum": [
                  "quick",
                  "standard",
                  "promotion"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "named survival suite when survival_tests is omitted (default: promotion when registering, else quick)",
            "title": "Preset"
          },
          "register_if_passes": {
            "default": false,
            "description": "register the result in shadow only if every survival test passes (needs confirm=true)",
            "title": "Register If Passes",
            "type": "boolean"
          },
          "register_strategy": {
            "default": false,
            "description": "register the result in shadow status whatever the verdict (needs confirm=true)",
            "title": "Register Strategy",
            "type": "boolean"
          },
          "seed": {
            "default": 0,
            "title": "Seed",
            "type": "integer"
          },
          "start": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "Start",
            "type": "string"
          },
          "survival_tests": {
            "anyOf": [
              {
                "items": {
                  "description": "a survival test id (list_survival_tests)",
                  "pattern": "^[a-z][a-z0-9_]{0,63}$",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "survival suite; server default when omitted",
            "title": "Survival Tests"
          },
          "test_options": {
            "anyOf": [
              {
                "additionalProperties": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "options per survival test id, validated by each test (422 on an unknown test or option), e.g. {\"oos\": {\"mode\": \"sharpe\", \"min_trades\": 0}, \"deflated_sharpe\": {\"min_dsr\": 0.9}, \"pbo\": {\"max_pbo\": 0.3}, \"mc_trades\": {\"n_paths\": 2000}, \"cost_stress\": {\"stress_multiplier\": 3}}; each test must be in the suite",
            "title": "Test Options"
          },
          "train_ratio": {
            "default": 0.7,
            "exclusiveMaximum": 1,
            "exclusiveMinimum": 0,
            "title": "Train Ratio",
            "type": "number"
          },
          "tuner": {
            "default": "random",
            "description": "a tuner: grid, random, optuna, prescreen or another from list_lab_tuners",
            "pattern": "^[a-z][a-z0-9_]{0,63}$",
            "title": "Tuner",
            "type": "string"
          },
          "universe": {
            "description": "instrument ids",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Universe",
            "type": "array"
          }
        },
        "required": [
          "draft_id",
          "universe",
          "start",
          "end"
        ],
        "title": "run_draft_labArguments",
        "type": "object"
      },
      "name": "run_draft_lab",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Queue a factor tear sheet: IC per horizon and by sector, asset\nclass and size, returns per quantile, factor alpha and beta, a\nmonthly IC heatmap and turnover. Needs at least 10 tickers (else\nn/a). Returns the job; use wait_for_job for the result. Research\nonly: writes nothing.",
      "input_schema": {
        "properties": {
          "end": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "End",
            "type": "string"
          },
          "every_bars": {
            "default": 5,
            "description": "sample every N bars",
            "minimum": 1,
            "title": "Every Bars",
            "type": "integer"
          },
          "factor": {
            "description": "a library factor id (e.g. mom_12_1, ROC20, piotroski_f) or a formula such as '$close / Ref($close, 20) - 1'",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Factor",
            "type": "string"
          },
          "horizons": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "forward-return horizons in bars; default [1, 5, 21]",
            "title": "Horizons"
          },
          "interval": {
            "default": "1d",
            "title": "Interval",
            "type": "string"
          },
          "n_quantiles": {
            "default": 5,
            "maximum": 20,
            "minimum": 2,
            "title": "N Quantiles",
            "type": "integer"
          },
          "start": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "Start",
            "type": "string"
          },
          "universe": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "instrument ids; or name a stored universe_id",
            "title": "Universe"
          },
          "universe_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "a stored universe id (or give universe)",
            "title": "Universe Id"
          }
        },
        "required": [
          "factor",
          "start",
          "end"
        ],
        "title": "run_factor_tearsheetArguments",
        "type": "object"
      },
      "name": "run_factor_tearsheet",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": true,
        "read_only": false
      },
      "description": "Queue a market-data ingest into the lake from the configured vendor,\nor from ``source``. ``borrow`` pulls daily stock borrow rates. Returns\nthe job; use wait_for_job for the outcome.",
      "input_schema": {
        "properties": {
          "exchange": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "ingest a whole exchange",
            "title": "Exchange"
          },
          "interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "for intraday, e.g. 5m",
            "title": "Interval"
          },
          "kind": {
            "enum": [
              "prices",
              "intraday",
              "fundamentals",
              "metadata",
              "borrow"
            ],
            "title": "Kind",
            "type": "string"
          },
          "markets": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "for borrow: IBKR short stock markets, e.g. usa",
            "title": "Markets"
          },
          "since": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Since"
          },
          "source": {
            "anyOf": [
              {
                "enum": [
                  "eodhd",
                  "yahoo",
                  "defillama"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "data source; the default one when left out (see list_sources)",
            "title": "Source"
          },
          "tickers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "instrument ids; or use exchange",
            "title": "Tickers"
          },
          "until": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Until"
          }
        },
        "required": [
          "kind"
        ],
        "title": "run_ingestArguments",
        "type": "object"
      },
      "name": "run_ingest",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Queue a lab run: tune a strategy class, fit, run the survival suite and\ngive a pass/fail verdict. Returns the job; use wait_for_job for the result.\nEvery run and trial is recorded in the trial ledger (with the hypothesis).\nGive typed tickers (universe) or a stored universe (universe_id), and\nensure_data=true to fetch missing bars first.\nRegistering (register_strategy, or register_if_passes to register only a\npassing run) needs confirm=true (preview otherwise).",
      "input_schema": {
        "$defs": {
          "HeatmapOptions": {
            "additionalProperties": false,
            "description": "A 2D sweep of two parameters around the tuned set, with the plateau\nverdict on it. Every cell counts as a trial.",
            "properties": {
              "fast": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "score cells on the vectorised fast path (default true)",
                "title": "Fast"
              },
              "grid_size": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "points per axis, 2..15 (default 7)",
                "title": "Grid Size"
              },
              "x": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "param across (default: first numeric)",
                "title": "X"
              },
              "y": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "param down (default: next numeric)",
                "title": "Y"
              }
            },
            "title": "HeatmapOptions",
            "type": "object"
          },
          "McptOptions": {
            "additionalProperties": false,
            "description": "Settings of the ``permutation`` (Monte-Carlo permutation) survival test.",
            "properties": {
              "max_p_value": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "pass threshold (default 0.05)",
                "title": "Max P Value"
              },
              "metric": {
                "anyOf": [
                  {
                    "enum": [
                      "profit_factor",
                      "sharpe",
                      "final_return",
                      "cagr"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "title": "Metric"
              },
              "n_permutations": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "1..1000 (default 200)",
                "title": "N Permutations"
              },
              "retune": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "const": "auto",
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "re-tune on every permutation: (n + 1) x budget backtests; 'auto' re-tunes only strategies with a non-trivial fit (the promotion preset's default)",
                "title": "Retune"
              },
              "seed": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "title": "Seed"
              }
            },
            "title": "McptOptions",
            "type": "object"
          },
          "WalkForwardOptions": {
            "additionalProperties": false,
            "description": "Settings of the ``walk_forward`` survival test.",
            "properties": {
              "anchored": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "expanding (true) or rolling window",
                "title": "Anchored"
              },
              "matrix": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "also run the train x test matrix (default false)",
                "title": "Matrix"
              },
              "metric": {
                "anyOf": [
                  {
                    "enum": [
                      "sharpe",
                      "cagr",
                      "final_return"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "statistic scored per test window",
                "title": "Metric"
              },
              "min_mean_score": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "mean fold score floor",
                "title": "Min Mean Score"
              },
              "min_positive_share": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "share of folds that must score above 0 (0..1)",
                "title": "Min Positive Share"
              },
              "min_wfe": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "walk-forward efficiency gate, OOS / IS return (default 0.5)",
                "title": "Min Wfe"
              },
              "n_splits": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "number of folds (default 4)",
                "title": "N Splits"
              },
              "test_days": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "days per test window; default splits the validation window",
                "title": "Test Days"
              },
              "train_days": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "days per train window; default all history before it",
                "title": "Train Days"
              }
            },
            "title": "WalkForwardOptions",
            "type": "object"
          }
        },
        "properties": {
          "benchmark": {
            "anyOf": [
              {
                "maxLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "benchmark to compare against: auto (SPY.US when priced, else EW), EW (equal-weight universe), a ticker such as QQQ.US, or none; default [lab] benchmark",
            "title": "Benchmark"
          },
          "budget": {
            "default": 20,
            "description": "tuner trials",
            "maximum": 1000,
            "minimum": 1,
            "title": "Budget",
            "type": "integer"
          },
          "class_path": {
            "description": "catalog class path to tune",
            "title": "Class Path",
            "type": "string"
          },
          "confirm": {
            "default": false,
            "description": "must be true with register_strategy / register_if_passes; otherwise a preview",
            "title": "Confirm",
            "type": "boolean"
          },
          "cost_model": {
            "anyOf": [
              {
                "enum": [
                  "zero",
                  "realistic",
                  "ibkr_tiered",
                  "ibkr_fixed"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "transaction-cost preset (see list_cost_models); default [backtest.costs]",
            "title": "Cost Model"
          },
          "embargo_bars": {
            "anyOf": [
              {
                "maximum": 10000,
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "trading bars skipped between the train and validation windows (a strategy's label horizon raises it); default [lab] embargo_bars",
            "title": "Embargo Bars"
          },
          "end": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "End",
            "type": "string"
          },
          "ensure_data": {
            "default": false,
            "description": "fetch the bars the run needs that the lake lacks first (a lab_ensure job the run waits for, and its id is ensure_job_id in the result)",
            "title": "Ensure Data",
            "type": "boolean"
          },
          "heatmap": {
            "anyOf": [
              {
                "$ref": "#/$defs/HeatmapOptions"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "parameter heatmap around the tuned set (22.5)"
          },
          "hypothesis": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "the edge and who pays for it; recorded before tuning (trial ledger)",
            "title": "Hypothesis"
          },
          "interval": {
            "default": "1d",
            "title": "Interval",
            "type": "string"
          },
          "mcpt": {
            "anyOf": [
              {
                "$ref": "#/$defs/McptOptions"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "permutation (MCPT) settings; add 'permutation' to survival_tests"
          },
          "objective": {
            "default": "sharpe",
            "description": "an objective: sharpe, cagr, final_return, sortino, calmar, sharpe_dd, multi, a cv_ variant or another from list_lab_objectives",
            "pattern": "^[a-z][a-z0-9_]{0,63}$",
            "title": "Objective",
            "type": "string"
          },
          "preflight": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "check the data before tuning (missing bars, gaps). Default [lab] preflight",
            "title": "Preflight"
          },
          "premortem": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "how the strategy is expected to fail; recorded",
            "title": "Premortem"
          },
          "preset": {
            "anyOf": [
              {
                "enum": [
                  "quick",
                  "standard",
                  "promotion"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "named survival suite when survival_tests is omitted (default: promotion when registering, else quick)",
            "title": "Preset"
          },
          "prune": {
            "default": false,
            "description": "optuna tuner: stop trials whose fast score trails",
            "title": "Prune",
            "type": "boolean"
          },
          "register_if_passes": {
            "default": false,
            "description": "register the result in shadow only if every survival test passes (needs confirm=true)",
            "title": "Register If Passes",
            "type": "boolean"
          },
          "register_strategy": {
            "default": false,
            "description": "register the result in shadow status whatever the verdict (needs confirm=true)",
            "title": "Register Strategy",
            "type": "boolean"
          },
          "sampler": {
            "default": "tpe",
            "description": "optuna tuner: tpe, nsga2 (Pareto over multi) or random",
            "enum": [
              "tpe",
              "nsga2",
              "random"
            ],
            "title": "Sampler",
            "type": "string"
          },
          "seed": {
            "default": 0,
            "title": "Seed",
            "type": "integer"
          },
          "start": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "Start",
            "type": "string"
          },
          "strict_preflight": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "treat preflight warnings as errors. Default [lab] strict_preflight",
            "title": "Strict Preflight"
          },
          "survival_tests": {
            "anyOf": [
              {
                "items": {
                  "description": "a survival test id (list_survival_tests)",
                  "pattern": "^[a-z][a-z0-9_]{0,63}$",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "survival suite; server default when omitted",
            "title": "Survival Tests"
          },
          "test_options": {
            "anyOf": [
              {
                "additionalProperties": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "options per survival test id, validated by each test (422 on an unknown test or option), e.g. {\"oos\": {\"mode\": \"sharpe\", \"min_trades\": 0}, \"deflated_sharpe\": {\"min_dsr\": 0.9}, \"pbo\": {\"max_pbo\": 0.3}, \"mc_trades\": {\"n_paths\": 2000}, \"cost_stress\": {\"stress_multiplier\": 3}}; each test must be in the suite",
            "title": "Test Options"
          },
          "train_ratio": {
            "default": 0.7,
            "exclusiveMaximum": 1,
            "exclusiveMinimum": 0,
            "title": "Train Ratio",
            "type": "number"
          },
          "tuner": {
            "default": "random",
            "description": "a tuner: grid, random, optuna, prescreen or another from list_lab_tuners",
            "pattern": "^[a-z][a-z0-9_]{0,63}$",
            "title": "Tuner",
            "type": "string"
          },
          "universe": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "instrument ids, or give universe_id",
            "title": "Universe"
          },
          "universe_id": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9_.-]{0,63}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "a stored universe (see list_universes): its point-in-time members, delisted names included, instead of typed tickers",
            "title": "Universe Id"
          },
          "walk_forward": {
            "anyOf": [
              {
                "$ref": "#/$defs/WalkForwardOptions"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "walk_forward test settings; add 'walk_forward' to survival_tests"
          }
        },
        "required": [
          "class_path",
          "start",
          "end"
        ],
        "title": "run_labArguments",
        "type": "object"
      },
      "name": "run_lab",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Queue an options backtest on the stored chains, with its\nvalidation checks and a verdict. Returns the job; use wait_for_job\nfor the result. Research only: nothing trades options.",
      "input_schema": {
        "properties": {
          "cash": {
            "default": 100000.0,
            "exclusiveMinimum": 0,
            "title": "Cash",
            "type": "number"
          },
          "end": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "End",
            "type": "string"
          },
          "params": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "strategy parameters; defaults otherwise",
            "title": "Params"
          },
          "start": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "Start",
            "type": "string"
          },
          "strategy": {
            "description": "an id from list_option_strategies",
            "title": "Strategy",
            "type": "string"
          },
          "trials": {
            "default": 1,
            "description": "trials run so far, for the deflated Sharpe",
            "minimum": 1,
            "title": "Trials",
            "type": "integer"
          },
          "underlyings": {
            "items": {
              "type": "string"
            },
            "maxItems": 10,
            "minItems": 1,
            "title": "Underlyings",
            "type": "array"
          },
          "validation": {
            "default": true,
            "description": "also run out of sample, deflated Sharpe and stress checks",
            "title": "Validation",
            "type": "boolean"
          }
        },
        "required": [
          "strategy",
          "underlyings",
          "start",
          "end"
        ],
        "title": "run_options_backtestArguments",
        "type": "object"
      },
      "name": "run_options_backtest",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Run a screen (or one of your saved ones) on the lake as it was on\n``as_of`` (default today): the matching tickers with the value of\neach metric it uses. Only data known on that day counts.",
      "input_schema": {
        "properties": {
          "as_of": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "As Of"
          },
          "screen_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your saved screens",
            "title": "Screen Id"
          },
          "spec": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "the screen: rule filters (asset_classes, sectors, exclude_sectors, exchanges, min_price, min_adv), universe_id to start from a stored universe, filters [{\"metric\": \"pe_ratio\", \"min\": 0, \"max\": 15}], sort_by, descending, limit and columns. Metric ids come from list_screen_metrics",
            "title": "Spec"
          }
        },
        "title": "run_screenArguments",
        "type": "object"
      },
      "name": "run_screen",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Queue a signal IC analysis: does the strategy's estimate_return rank\nfuture returns across the universe? Reports mean IC, ICIR, HAC t-stat\nand quantile spread per horizon, plus turnover and the IC estimate.\nNeeds at least 10 tickers (else n/a). Returns the job; use wait_for_job\nfor the result. Research only: writes nothing.",
      "input_schema": {
        "properties": {
          "class_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "catalog class path, e.g. pkg.mod:Class",
            "title": "Class Path"
          },
          "end": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "End",
            "type": "string"
          },
          "every_bars": {
            "default": 5,
            "description": "score every N bars",
            "minimum": 1,
            "title": "Every Bars",
            "type": "integer"
          },
          "horizons": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "forward-return horizons in bars; default [1, 5, 21]",
            "title": "Horizons"
          },
          "interval": {
            "default": "1d",
            "title": "Interval",
            "type": "string"
          },
          "n_quantiles": {
            "default": 5,
            "maximum": 20,
            "minimum": 2,
            "title": "N Quantiles",
            "type": "integer"
          },
          "params": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "strategy params (with class_path)",
            "title": "Params"
          },
          "start": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "Start",
            "type": "string"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "registered strategy id (or use class_path)",
            "title": "Strategy Id"
          },
          "universe": {
            "description": "instrument ids",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Universe",
            "type": "array"
          }
        },
        "required": [
          "universe",
          "start",
          "end"
        ],
        "title": "run_signal_icArguments",
        "type": "object"
      },
      "name": "run_signal_ic",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Queue a sweep: a lab run of every strategy (or the ones named) on\nthe same tickers or stored universe and window, ranked best first.\nA strategy with a ticker parameter runs once per ticker. Returns the\njob, and wait_for_job gives the ranked rows. Every trial is counted in\nthe trial ledger. A sweep never registers a strategy: register the\none you like with run_lab.",
      "input_schema": {
        "properties": {
          "benchmark": {
            "anyOf": [
              {
                "maxLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "benchmark to compare against: auto (SPY.US when priced, else EW), EW (equal-weight universe), a ticker such as QQQ.US, or none; default [lab] benchmark",
            "title": "Benchmark"
          },
          "budget": {
            "default": 20,
            "description": "tuner trials each",
            "maximum": 1000,
            "minimum": 1,
            "title": "Budget",
            "type": "integer"
          },
          "cost_model": {
            "anyOf": [
              {
                "enum": [
                  "zero",
                  "realistic",
                  "ibkr_tiered",
                  "ibkr_fixed"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "transaction-cost preset (see list_cost_models); default [backtest.costs]",
            "title": "Cost Model"
          },
          "embargo_bars": {
            "anyOf": [
              {
                "maximum": 10000,
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "trading bars skipped between the train and validation windows (a strategy's label horizon raises it); default [lab] embargo_bars",
            "title": "Embargo Bars"
          },
          "end": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "End",
            "type": "string"
          },
          "exclude": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 200,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "strategies to leave out",
            "title": "Exclude"
          },
          "hypothesis": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "the edge and who pays for it; recorded before tuning (trial ledger)",
            "title": "Hypothesis"
          },
          "interval": {
            "default": "1d",
            "title": "Interval",
            "type": "string"
          },
          "objective": {
            "default": "sharpe",
            "description": "an objective: sharpe, cagr, final_return, sortino, calmar, sharpe_dd, multi, a cv_ variant or another from list_lab_objectives",
            "pattern": "^[a-z][a-z0-9_]{0,63}$",
            "title": "Objective",
            "type": "string"
          },
          "preflight": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "check the data before tuning (missing bars, gaps). Default [lab] preflight",
            "title": "Preflight"
          },
          "premortem": {
            "anyOf": [
              {
                "maxLength": 4000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "how the strategy is expected to fail; recorded",
            "title": "Premortem"
          },
          "preset": {
            "anyOf": [
              {
                "enum": [
                  "quick",
                  "standard",
                  "promotion"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "named survival suite when survival_tests is omitted (default: promotion when registering, else quick)",
            "title": "Preset"
          },
          "seed": {
            "default": 0,
            "title": "Seed",
            "type": "integer"
          },
          "start": {
            "description": "YYYY-MM-DD",
            "format": "date",
            "title": "Start",
            "type": "string"
          },
          "strategies": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 200,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "strategy ids (e.g. momentum), class names or module:Class. default every catalogued strategy",
            "title": "Strategies"
          },
          "strict_preflight": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "treat preflight warnings as errors. Default [lab] strict_preflight",
            "title": "Strict Preflight"
          },
          "survival_tests": {
            "anyOf": [
              {
                "items": {
                  "description": "a survival test id (list_survival_tests)",
                  "pattern": "^[a-z][a-z0-9_]{0,63}$",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "survival suite for every strategy, the server default when omitted",
            "title": "Survival Tests"
          },
          "train_ratio": {
            "default": 0.7,
            "exclusiveMaximum": 1,
            "exclusiveMinimum": 0,
            "title": "Train Ratio",
            "type": "number"
          },
          "tuner": {
            "default": "random",
            "description": "a tuner: grid, random, optuna, prescreen or another from list_lab_tuners",
            "pattern": "^[a-z][a-z0-9_]{0,63}$",
            "title": "Tuner",
            "type": "string"
          },
          "universe": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "instrument ids, or give universe_id",
            "title": "Universe"
          },
          "universe_id": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9_.-]{0,63}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "a stored universe (see list_universes): its point-in-time members, delisted names included, instead of typed tickers",
            "title": "Universe Id"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "title": "run_sweepArguments",
        "type": "object"
      },
      "name": "run_sweep",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Queue one production tick (rank active strategies, then trade the winner).\nDry run by default. Without confirm=true returns a preview and queues\nnothing. A real tick (dry_run=false) is refused unless GET /api/brokers\nreports a simulated or paper broker.",
      "input_schema": {
        "properties": {
          "as_of": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD; default today",
            "title": "As Of"
          },
          "asset_class": {
            "anyOf": [
              {
                "enum": [
                  "equity",
                  "crypto",
                  "commodity",
                  "bond"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Asset Class"
          },
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "dry_run": {
            "default": true,
            "description": "true (default): rank and log only, place no orders",
            "title": "Dry Run",
            "type": "boolean"
          },
          "tickers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "override [production].universe",
            "title": "Tickers"
          }
        },
        "title": "run_tickArguments",
        "type": "object"
      },
      "name": "run_tick",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Store a screen as a universe for the lab and queue its refresh\n(follow up with wait_for_job). Without confirm=true returns a preview.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "end": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "End"
          },
          "mode": {
            "default": "rule",
            "description": "rule reruns the screen at each rebalance (point in time); snapshot stores today's matches",
            "enum": [
              "rule",
              "snapshot"
            ],
            "title": "Mode",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "rebalance": {
            "default": "monthly",
            "enum": [
              "weekly",
              "monthly",
              "quarterly"
            ],
            "title": "Rebalance",
            "type": "string"
          },
          "screen_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your saved screens",
            "title": "Screen Id"
          },
          "spec": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "the screen: rule filters (asset_classes, sectors, exclude_sectors, exchanges, min_price, min_adv), universe_id to start from a stored universe, filters [{\"metric\": \"pe_ratio\", \"min\": 0, \"max\": 15}], sort_by, descending, limit and columns. Metric ids come from list_screen_metrics",
            "title": "Spec"
          },
          "start": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Start"
          },
          "universe_id": {
            "description": "new universe id, e.g. cheap_tech",
            "title": "Universe Id",
            "type": "string"
          }
        },
        "required": [
          "universe_id"
        ],
        "title": "save_screen_as_universeArguments",
        "type": "object"
      },
      "name": "save_screen_as_universe",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Search instruments in the lake by id/name and asset class.",
      "input_schema": {
        "properties": {
          "asset_class": {
            "anyOf": [
              {
                "enum": [
                  "equity",
                  "crypto",
                  "commodity",
                  "bond"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Asset Class"
          },
          "limit": {
            "default": 50,
            "description": "page size",
            "maximum": 500,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "rows to skip",
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "q": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "substring of id or name",
            "title": "Q"
          }
        },
        "title": "search_instrumentsArguments",
        "type": "object"
      },
      "name": "search_instruments",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Turn kinds of upcoming-event alerts on or off for yourself:\nearnings coming up, ex-dividend dates coming up, economic releases\ncoming up. Off means none of that kind, not even in the app. Also\npicks the countries and the importance threshold (low, medium, high)\nof economic release alerts. Without confirm=true returns your\ncurrent choices and changes nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "dividends": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "true: on, false: off, omit: leave as is",
            "title": "Dividends"
          },
          "earnings": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "true: on, false: off, omit: leave as is",
            "title": "Earnings"
          },
          "economic": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "true: on, false: off, omit: leave as is",
            "title": "Economic"
          },
          "economic_countries": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 30,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "countries for economic release alerts, such as US, EU, DE",
            "title": "Economic Countries"
          },
          "economic_default_countries": {
            "default": false,
            "description": "true: follow your portfolios' base currencies again",
            "title": "Economic Default Countries",
            "type": "boolean"
          },
          "economic_importance": {
            "anyOf": [
              {
                "enum": [
                  "low",
                  "medium",
                  "high"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "the lowest importance of release that alerts you",
            "title": "Economic Importance"
          }
        },
        "title": "set_event_alertsArguments",
        "type": "object"
      },
      "name": "set_event_alerts",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Work a portfolio's orders (or one strategy's) with an algo from the\nnext tickets on. Without confirm=true returns the current settings and\nchanges nothing.",
      "input_schema": {
        "properties": {
          "algo": {
            "enum": [
              "adaptive",
              "twap",
              "vwap"
            ],
            "title": "Algo",
            "type": "string"
          },
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "params": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "the algo's parameters",
            "title": "Params"
          },
          "portfolio_id": {
            "title": "Portfolio Id",
            "type": "string"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "only this strategy's orders",
            "title": "Strategy Id"
          }
        },
        "required": [
          "portfolio_id",
          "algo"
        ],
        "title": "set_execution_algoArguments",
        "type": "object"
      },
      "name": "set_execution_algo",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Turn on (or change) the alert of a saved screen. It runs after\neach data refresh and notifies you about names that newly match,\nthrough your notification channels. Notify only: nothing trades.\nThe first run stores the matches and sends nothing.",
      "input_schema": {
        "properties": {
          "cadence": {
            "default": "daily",
            "description": "run on every trading day, or weekly",
            "enum": [
              "daily",
              "weekly"
            ],
            "title": "Cadence",
            "type": "string"
          },
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "screen_id": {
            "description": "one of your saved screens",
            "title": "Screen Id",
            "type": "string"
          },
          "weekday": {
            "anyOf": [
              {
                "maximum": 6,
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "weekly: the day it runs, 0 = Monday",
            "title": "Weekday"
          }
        },
        "required": [
          "screen_id"
        ],
        "title": "set_screen_alertArguments",
        "type": "object"
      },
      "name": "set_screen_alert",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Move a strategy to shadow: evaluated on a virtual portfolio, never traded.\nNeeds a reason. Without confirm=true returns a preview and changes nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "why (logged in the audit trail); required for demotions and overrides",
            "title": "Reason"
          },
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          }
        },
        "required": [
          "strategy_id"
        ],
        "title": "shadow_strategyArguments",
        "type": "object"
      },
      "name": "shadow_strategy",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Start an AI research session: the assistant's model proposes lab\ntrials for the goal and runs them under the session's budgets. Every\nproposal is recorded with its hypothesis first, every trial is counted\nin the trial ledger, and validation windows start after the model's\ntraining cutoff. It never registers or promotes a strategy. Returns\nthe job; use wait_for_job, then get_research_session.",
      "input_schema": {
        "properties": {
          "goal": {
            "description": "what to look for",
            "maxLength": 2000,
            "minLength": 10,
            "title": "Goal",
            "type": "string"
          },
          "max_cpu_seconds": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "compute seconds, at most the setting",
            "title": "Max Cpu Seconds"
          },
          "max_proposals": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "proposals, at most the setting",
            "title": "Max Proposals"
          },
          "max_trials": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "tuning trials, at most the setting",
            "title": "Max Trials"
          },
          "universe": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "instrument ids, or give universe_id",
            "title": "Universe"
          },
          "universe_id": {
            "anyOf": [
              {
                "pattern": "^[a-z0-9][a-z0-9_.-]{0,63}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "a stored universe",
            "title": "Universe Id"
          }
        },
        "required": [
          "goal"
        ],
        "title": "start_researchArguments",
        "type": "object"
      },
      "name": "start_research",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Follow a strategy in notify or paper mode. Without confirm=true\nreturns a preview and changes nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "mode": {
            "default": "notify",
            "description": "notify: signals only; paper: simulated orders on one of your portfolios",
            "enum": [
              "notify",
              "paper"
            ],
            "title": "Mode",
            "type": "string"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "one of your portfolios (needed for paper)",
            "title": "Portfolio Id"
          },
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          }
        },
        "required": [
          "strategy_id"
        ],
        "title": "subscribeArguments",
        "type": "object"
      },
      "name": "subscribe",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Make a candidate version live, so the next tick trades it. Needs a\npassing swap check, or override=true with a reason of at least 20\ncharacters, and the change is audited. Without confirm=true returns\nthe swap check as a preview and changes nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "override": {
            "default": false,
            "description": "swap without a passing swap check; needs a reason of at least 20 characters",
            "title": "Override",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "why (logged in the audit trail); required for demotions and overrides",
            "title": "Reason"
          },
          "strategy_id": {
            "title": "Strategy Id",
            "type": "string"
          },
          "version": {
            "description": "the model version number",
            "minimum": 1,
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "strategy_id",
          "version"
        ],
        "title": "swap_model_versionArguments",
        "type": "object"
      },
      "name": "swap_model_version",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": true,
        "read_only": false
      },
      "description": "Sync one of your connections now: read balances, positions and\nactivity from the provider (read-only there) into the linked broker\nportfolios. Without confirm=true returns a preview and syncs nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "connection_id": {
            "title": "Connection Id",
            "type": "string"
          }
        },
        "required": [
          "connection_id"
        ],
        "title": "sync_connectionArguments",
        "type": "object"
      },
      "name": "sync_connection",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Deprecated alias of get_tca_summary. Implementation shortfall of your orders in bps of notional:\ndelay (decision to arrival), impact (arrival to fill), fees and the\nopportunity cost of what did not fill, next to the cost model's\nestimate (model_gap_bps = realised minus modelled).",
      "input_schema": {
        "properties": {
          "by": {
            "default": "all",
            "description": "how to group the orders",
            "enum": [
              "all",
              "strategy",
              "ticker",
              "portfolio",
              "day",
              "week",
              "month"
            ],
            "title": "By",
            "type": "string"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          },
          "since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Since"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Strategy Id"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ticker"
          },
          "until": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Until"
          }
        },
        "title": "get_tca_summaryArguments",
        "type": "object"
      },
      "name": "tca_summary",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Deprecated alias of list_trade_journal. Your orders, newest first: why each was placed (trigger, signal\nscore and rank), the outcome (shortfall, next-day move) and notes.",
      "input_schema": {
        "properties": {
          "limit": {
            "default": 50,
            "maximum": 200,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "minimum": 0,
            "title": "Offset",
            "type": "integer"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Id"
          },
          "since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "YYYY-MM-DD",
            "title": "Since"
          },
          "strategy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Strategy Id"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ticker"
          }
        },
        "title": "list_trade_journalArguments",
        "type": "object"
      },
      "name": "trade_journal",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Overwrite fields of a draft (only the ones given). A registered\nstrategy keeps the version it was registered with.",
      "input_schema": {
        "properties": {
          "draft_id": {
            "title": "Draft Id",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 100,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "source_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Python source of a code draft (API must allow code strategies)",
            "title": "Source Code"
          },
          "spec": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "replaces the spec",
            "title": "Spec"
          }
        },
        "required": [
          "draft_id"
        ],
        "title": "update_draftArguments",
        "type": "object"
      },
      "name": "update_draft",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Change a price alert's thresholds or name, or switch it on or off.",
      "input_schema": {
        "properties": {
          "alert_id": {
            "title": "Alert Id",
            "type": "string"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Enabled"
          },
          "level": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "the price to watch (crossings)",
            "title": "Level"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 80,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "pct": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "maximum": 1000,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "percent move, either way",
            "title": "Pct"
          },
          "window_days": {
            "anyOf": [
              {
                "maximum": 365,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "calendar days the move is measured over",
            "title": "Window Days"
          }
        },
        "required": [
          "alert_id"
        ],
        "title": "update_price_alertArguments",
        "type": "object"
      },
      "name": "update_price_alert",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Rename one of your saved screens, replace its spec, or both.",
      "input_schema": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "maxLength": 80,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "screen_id": {
            "title": "Screen Id",
            "type": "string"
          },
          "spec": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "the screen: rule filters (asset_classes, sectors, exclude_sectors, exchanges, min_price, min_adv), universe_id to start from a stored universe, filters [{\"metric\": \"pe_ratio\", \"min\": 0, \"max\": 15}], sort_by, descending, limit and columns. Metric ids come from list_screen_metrics",
            "title": "Spec"
          }
        },
        "required": [
          "screen_id"
        ],
        "title": "update_screenArguments",
        "type": "object"
      },
      "name": "update_screen",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Turn one of your subscriptions on or off, or move it between\nnotify and paper. Auto is refused here (it needs the web app).\nWithout confirm=true returns a preview and changes nothing.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Enabled"
          },
          "mode": {
            "anyOf": [
              {
                "enum": [
                  "notify",
                  "paper",
                  "auto"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "notify or paper; auto is switched on in the web app (second factor)",
            "title": "Mode"
          },
          "reason": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "audited",
            "title": "Reason"
          },
          "subscription_id": {
            "title": "Subscription Id",
            "type": "string"
          }
        },
        "required": [
          "subscription_id"
        ],
        "title": "update_subscriptionArguments",
        "type": "object"
      },
      "name": "update_subscription",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Replace a universe's definition. The members stay as they are\nuntil the next refresh (refresh_universe). Without confirm=true\nreturns a preview with the current definition.",
      "input_schema": {
        "properties": {
          "confirm": {
            "default": false,
            "description": "must be true to apply; false (default) returns a preview only",
            "title": "Confirm",
            "type": "boolean"
          },
          "csv": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "list only: CSV with a ticker column (replaces spec)",
            "title": "Csv"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Description"
          },
          "kind": {
            "enum": [
              "list",
              "exchange",
              "rule",
              "index"
            ],
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "spec": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "kind settings. list: {tickers, spans}. exchange: {exchange, source, security_types, include_delisted}. rule: {start, end, rebalance, min_adv, min_price, asset_classes, sectors, exclude_sectors, exchanges}. index: {index_id, source, start_date}",
            "title": "Spec"
          },
          "universe_id": {
            "description": "universe id, e.g. sp500 or us_common",
            "title": "Universe Id",
            "type": "string"
          }
        },
        "required": [
          "universe_id",
          "kind"
        ],
        "title": "update_universeArguments",
        "type": "object"
      },
      "name": "update_universe",
      "needs_confirm": true
    },
    {
      "annotations": {
        "destructive": true,
        "idempotent": true,
        "open_world": false,
        "read_only": false
      },
      "description": "Rename one of your watchlists, replace its tickers, or both.",
      "input_schema": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "maxLength": 80,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "tickers": {
            "anyOf": [
              {
                "description": "instrument ids, kept once and in order",
                "items": {
                  "type": "string"
                },
                "maxItems": 500,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tickers"
          },
          "watchlist_id": {
            "title": "Watchlist Id",
            "type": "string"
          }
        },
        "required": [
          "watchlist_id"
        ],
        "title": "update_watchlistArguments",
        "type": "object"
      },
      "name": "update_watchlist",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Validate a draft and smoke-run it (on lake tickers or synthetic data).\nSaves nothing, but a code draft's Python runs inside the API server.",
      "input_schema": {
        "properties": {
          "as_of": {
            "anyOf": [
              {
                "description": "YYYY-MM-DD",
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "As Of"
          },
          "bars": {
            "anyOf": [
              {
                "maximum": 250,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "bars to evaluate",
            "title": "Bars"
          },
          "draft_id": {
            "title": "Draft Id",
            "type": "string"
          },
          "tickers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 20,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "lake tickers to smoke-run on; default sample data",
            "title": "Tickers"
          }
        },
        "required": [
          "draft_id"
        ],
        "title": "validate_draftArguments",
        "type": "object"
      },
      "name": "validate_draft",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Validate a rule spec without saving it (no smoke run): valid + issues.",
      "input_schema": {
        "properties": {
          "spec": {
            "additionalProperties": true,
            "description": "rule spec (see get_rule_schema); constructor params for code drafts",
            "title": "Spec",
            "type": "object"
          }
        },
        "required": [
          "spec"
        ],
        "title": "validate_rule_specArguments",
        "type": "object"
      },
      "name": "validate_rule_spec",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": false,
        "open_world": false,
        "read_only": false
      },
      "description": "Queue a rerun of lab results from their stored manifests: per\ntarget the stored and rerun objective score, whether it moved beyond\nthe tolerance, and the tickers whose bars or corporate actions changed\nsince (vendor restatements). Returns the job; use wait_for_job for the\nresult. Research only: writes nothing.",
      "input_schema": {
        "properties": {
          "targets": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "lab run ids or strategy ids (default: every active strategy)",
            "title": "Targets"
          },
          "tolerance": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "allowed score drift (default [lab.verify] tolerance)",
            "title": "Tolerance"
          }
        },
        "title": "verify_lab_resultsArguments",
        "type": "object"
      },
      "name": "verify_lab_results",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Poll a job until it finishes or the timeout passes. Returns\n{\"timed_out\": bool, \"job\": {...}, \"result\": {...} | null}: once the job\nsucceeded, \"result\" is its typed result (BacktestResult, LabRunView,\nSignalICView, ingest or tick result); otherwise null and the job carries its error.",
      "input_schema": {
        "properties": {
          "job_id": {
            "title": "Job Id",
            "type": "string"
          },
          "poll_seconds": {
            "default": 1.0,
            "maximum": 30,
            "minimum": 0.05,
            "title": "Poll Seconds",
            "type": "number"
          },
          "timeout_seconds": {
            "default": 120.0,
            "description": "give up after this long (max 600)",
            "exclusiveMinimum": 0,
            "title": "Timeout Seconds",
            "type": "number"
          }
        },
        "required": [
          "job_id"
        ],
        "title": "wait_for_jobArguments",
        "type": "object"
      },
      "name": "wait_for_job",
      "needs_confirm": false
    },
    {
      "annotations": {
        "destructive": false,
        "idempotent": true,
        "open_world": false,
        "read_only": true
      },
      "description": "Who this MCP server acts as: the token's user, role and scopes. Every tool does only what that user may do.",
      "input_schema": {
        "properties": {},
        "title": "toolArguments",
        "type": "object"
      },
      "name": "whoami",
      "needs_confirm": false
    }
  ]
}
