How to read this page. Each tool lists its inputs (what you send) and
its result (what comes back). Every tool returns the standard envelope
below; the Result fields documented per tool are what lands inside
structuredContent.The result envelope
Every tool returns the same shape. A human-readable summary incontent, the
structured data in structuredContent, and isError: true only when something
went wrong.
A one-element array with a
text block: a short summary plus a pretty-printed
copy of the structured data.Present and
true only on failure. On a failure the structured content carries
the error detail (for example a status and, for upstream errors, the failing
status code and body).Sessions
A session is the workspace your strategies live in. Create or list one first, then pass itssession_id to everything else.
create_session
Create an AskFutures session for strategy work. Inputs Resultlist_sessions
List the sessions owned by the authenticated user. Inputs Resultget_session
Fetch one session by ID. Inputs ResultStrategies
A strategy is the rule-based plan AskFutures builds from your description. See Strategies for the concept.create_strategy
Start building a new strategy from a plain-English description. This is asynchronous: it queues the work and returns anoperation_id. Call
wait_for_completion next with that operation_id.
By default a backtest runs as part of creation.
Inputs
The strategy idea, in plain English — e.g. “Buy Micro Nasdaq when price breaks
above the first 15-minute high.”
Whether to run a backtest as part of creation. Set
false to build the rules
without testing yet, then call
backtest_existing_strategy later.Optional. Reuse the same key to safely retry the same creation request without
building a duplicate. Generated automatically when omitted.
The async operation to poll with
wait_for_completion
(task="strategy_op").update_strategy
Start modifying an existing strategy — add a filter, change an exit, swap the symbol, change the period. Like creation, this is asynchronous and returns anoperation_id. Every edit becomes a new saved version.
Inputs
Result
The async operation to poll with
wait_for_completion
(task="strategy_op").list_strategies
List the strategies in a session, including the canonical parameters you need for optimization. Inputs Resultinspect_strategy
Fetch one strategy in full: entry/exit rules, exit conditions, parameters, the extraction plan, and backtest status. Inputs Result Includes every field from thelist_strategies summary,
plus:
delete_strategy
Delete a draft strategy. The server refuses unless you setconfirm: true.
Inputs
Result
Backtesting
See Backtesting and Is the backtest real? for what the engine does and doesn’t model.backtest_existing_strategy
Run (or re-run) a backtest on an existing strategy. It does not create or fork — it tests the strategy in place. Becausecreate_strategy already
backtests by default, only call this when the strategy was created with
backtest=false, when its backtestStatus is not_tested or failed, or when
you explicitly want a re-run.
This is asynchronous — poll with wait_for_completion
(task="backtest").
Inputs
Result
Optimization
Optimization is a two-step flow: configure the sweep, then run it. See Optimization.setup_optimization
Configure an optimization sweep for a backtested strategy. Calllist_strategies first to get the canonical parameter
key values to sweep.
Inputs
Result
The configured batch’s ID. Pass it to
run_optimization.run_optimization
Promote a configured batch to running. Queues one backtest per parameter combination; results land on the strategy when the batch completes. This is asynchronous — poll withwait_for_completion
(task="optimization").
Inputs
The batch ID from
setup_optimization.Async control
Strategy creation, updates, backtests, and optimizations all run in the background. These two tools let you wait on them and cancel them.wait_for_completion
Poll an async operation until it succeeds, fails, or the timeout is reached. On timeout the operation keeps running server-side — just call again later. Thetask you pass decides which IDs are required.
- strategy_op
- backtest
- optimization
For
create_strategy and
update_strategy. Pass the operation_id. On success the
result includes the finished strategy summary.Present as
timed_out when the wait window elapses but the work is still
running. Call again to keep waiting.On a successful
optimization: the best combination found, alongside
total_combinations and failed_count.A failed or timed-out operation comes back with
isError: true and the
operation detail (for example backtestError for a failed backtest, or the
batch error for a failed sweep).cancel_task
Request cancellation of an in-flight task. Returns immediately and is idempotent. For optimization, the session’s single running sweep is resolved automatically, stops between combinations, and partial results are kept. For backtests and create/update, cancellation only takes effect if the worker hasn’t started yet — short in-flight tasks are allowed to finish. Inputs ResultPlanning
write_todos
Replace the agent’s task list for the session. Full-replace semantics — send the entire list every call. Useful for multi-step work, especially when an async wait may span turns. Keep exactly one itemin_progress while working, and mark
items completed as you finish them.
Inputs
Result
Reference data
What’s available to trade, and the contract specs. Scope is CME Group only (CME, CBOT, NYMEX, COMEX), ~74 symbols.list_symbols
List all CME Group futures symbols available for trading. Use it to discover what’s available before creating a strategy. Inputs None. Resultget_reference_data
Look up contract metadata for one symbol. Inputs Result The contract specs for the symbol, returned as the structured content directly — including tick size, tick value, margin, and session hours.Next steps
Tools walkthrough
The same tools, explained as a workflow.
Recipes
End-to-end programmatic examples.
Internal HTTP API
Why the web app’s HTTP layer is private.
Is the backtest real?
Where the AI stops and the deterministic math begins.