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.The machine-readable result. The per-tool Result fields below describe
what’s in here.
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. InputsOptional session title.
The new session’s ID. Pass this to the strategy tools.
Link to the session in the web app.
list_sessions
List the sessions owned by the authenticated user. InputsFilter:
active, archived, or all.Page size, 1–100.
Opaque pagination cursor from a previous page.
The sessions on this page. Each carries its own
session_id and app_url.Cursor info for fetching the next page, when present.
get_session
Fetch one session by ID. InputsThe session to fetch.
The session ID.
Link to the session in the web app.
Strategies
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 session to build in.
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.
Advanced/optional. Leave unset to use the default.
The async operation to poll with
wait_for_completion
(task="strategy_op").The session the strategy is being built in.
Link to the session in the web app.
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
The session the strategy lives in.
The strategy to modify.
The change, in plain English — e.g. “Add a 200-tick stop and only trade
9:30–11:00.”
Advanced/optional. Leave unset to use the default.
The async operation to poll with
wait_for_completion
(task="strategy_op").The session the strategy lives in.
Link to the session in the web app.
list_strategies
List the strategies in a session, including the canonical parameters you need for optimization. InputsThe session to list.
The strategies in the session. Each entry is summarized — see the fields below.
Pagination info, when present.
inspect_strategy
Fetch one strategy in full: entry/exit rules, exit conditions, parameters, the extraction plan, and backtest status. InputsThe session the strategy lives in.
The strategy to inspect.
list_strategies summary,
plus:
The rules that open positions.
The rules that close positions.
The parameter definitions as they appear on the strategy card.
Structured exits — stop, target, trailing stop, max-time, end-of-day.
The structured plan AskFutures derived from your description.
delete_strategy
Delete a draft strategy. The server refuses unless you setconfirm: true.
Inputs
The session the strategy lives in.
The strategy to delete.
Must be
true to actually delete. Anything else is a no-op refusal.The deleted strategy’s ID, echoed back on success.
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
The session the strategy lives in.
The strategy to backtest.
The strategy being backtested.
The session.
Link to watch the backtest in the web app.
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
The session the strategy lives in.
The strategy to optimize. It should already be backtested.
The parameters to sweep. Each entry:
The configured batch’s ID. Pass it to
run_optimization.Link to the session in the web app.
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 session the strategy lives in.
The strategy being optimized.
The batch ID from
setup_optimization.The running batch’s ID.
Link to watch the sweep in the web app.
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.The session.
Which kind of wait:
strategy_op, backtest, or optimization.Required when
task="strategy_op".Required when
task="backtest" or task="optimization".Required when
task="optimization".How long to wait this call, 1–300. On timeout the work continues server-side.
Present as
timed_out when the wait window elapses but the work is still
running. Call again to keep waiting.On a successful
strategy_op: the finished strategy summary.On a successful
backtest: the run’s metrics.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. InputsThe session.
Which task to cancel:
strategy_op, backtest, or optimization.The operation to cancel, for
strategy_op.The strategy whose task to cancel, for
backtest / optimization.The sweep to cancel, for
optimization.The session, echoed back with the upstream cancellation acknowledgement.
Planning
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
The session.
The full task list. Each item:
The session, echoed back with the saved plan.
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. ResultHow many symbols were returned.
The symbols. Each entry includes
ticker, name, and sector.get_reference_data
Look up contract metadata for one symbol. InputsThe ticker, e.g.
MNQ.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.