Skip to main content
This is the field-level reference for every AskFutures MCP tool. For the workflow — which tool to call when, and how the pieces fit together — see the tools walkthrough.
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 in content, the structured data in structuredContent, and isError: true only when something went wrong.
content
array
A one-element array with a text block: a short summary plus a pretty-printed copy of the structured data.
structuredContent
object
The machine-readable result. The per-tool Result fields below describe what’s in here.
isError
boolean
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).
Most tools that act on a session also return an app_url you can open in the browser to see the same session, strategy, or backtest in the web app.

Sessions

A session is the workspace your strategies live in. Create or list one first, then pass its session_id to everything else.

create_session

Create an AskFutures session for strategy work. Inputs
title
string
Optional session title.
Result
session_id
string
The new session’s ID. Pass this to the strategy tools.
app_url
string
Link to the session in the web app.

list_sessions

List the sessions owned by the authenticated user. Inputs
status
string
default:"active"
Filter: active, archived, or all.
limit
integer
default:"20"
Page size, 1–100.
cursor
string
Opaque pagination cursor from a previous page.
Result
sessions
array
The sessions on this page. Each carries its own session_id and app_url.
pagination
object
Cursor info for fetching the next page, when present.

get_session

Fetch one session by ID. Inputs
session_id
string
required
The session to fetch.
Result
session_id
string
The session ID.
app_url
string
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 an operation_id. Call wait_for_completion next with that operation_id. By default a backtest runs as part of creation. Inputs
session_id
string
required
The session to build in.
description
string
required
The strategy idea, in plain English — e.g. “Buy Micro Nasdaq when price breaks above the first 15-minute high.”
backtest
boolean
default:"true"
Whether to run a backtest as part of creation. Set false to build the rules without testing yet, then call backtest_existing_strategy later.
idempotency_key
string
Optional. Reuse the same key to safely retry the same creation request without building a duplicate. Generated automatically when omitted.
provider
string
Advanced/optional. Leave unset to use the default.
Result
operation_id
string
The async operation to poll with wait_for_completion (task="strategy_op").
session_id
string
The session the strategy is being built in.
app_url
string
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 an operation_id. Every edit becomes a new saved version. Inputs
session_id
string
required
The session the strategy lives in.
artifact_id
string
required
The strategy to modify.
changes
string
required
The change, in plain English — e.g. “Add a 200-tick stop and only trade 9:30–11:00.”
provider
string
Advanced/optional. Leave unset to use the default.
Result
operation_id
string
The async operation to poll with wait_for_completion (task="strategy_op").
session_id
string
The session the strategy lives in.
app_url
string
Link to the session in the web app.

list_strategies

List the strategies in a session, including the canonical parameters you need for optimization. Inputs
session_id
string
required
The session to list.
Result
strategies
array
The strategies in the session. Each entry is summarized — see the fields below.
pagination
object
Pagination info, when present.
Backtest figures returned here are hypothetical and simulated, net of modeled slippage and commission. Past performance does not guarantee future results. Always test before you trade.

inspect_strategy

Fetch one strategy in full: entry/exit rules, exit conditions, parameters, the extraction plan, and backtest status. Inputs
session_id
string
required
The session the strategy lives in.
artifact_id
string
required
The strategy to inspect.
Result Includes every field from the list_strategies summary, plus:
entry_rules
array
The rules that open positions.
exit_rules
array
The rules that close positions.
parameter_rules
array
The parameter definitions as they appear on the strategy card.
exit_conditions
array
Structured exits — stop, target, trailing stop, max-time, end-of-day.
extractionPlan
object
The structured plan AskFutures derived from your description.

delete_strategy

Delete a draft strategy. The server refuses unless you set confirm: true. Inputs
session_id
string
required
The session the strategy lives in.
artifact_id
string
required
The strategy to delete.
confirm
boolean
default:"false"
Must be true to actually delete. Anything else is a no-op refusal.
Result
artifact_id
string
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. Because create_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
session_id
string
required
The session the strategy lives in.
artifact_id
string
required
The strategy to backtest.
Result
artifact_id
string
The strategy being backtested.
session_id
string
The session.
app_url
string
Link to watch the backtest in the web app.
Backtest results are hypothetical and simulated, net of modeled slippage and commission. Past performance does not guarantee future results. Always test before you trade.

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. Call list_strategies first to get the canonical parameter key values to sweep. Inputs
session_id
string
required
The session the strategy lives in.
artifact_id
string
required
The strategy to optimize. It should already be backtested.
parameters
array
required
The parameters to sweep. Each entry:
Result
optimization_id
string
The configured batch’s ID. Pass it to run_optimization.
app_url
string
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 with wait_for_completion (task="optimization"). Inputs
session_id
string
required
The session the strategy lives in.
artifact_id
string
required
The strategy being optimized.
optimization_id
string
required
The batch ID from setup_optimization.
Result
optimization_id
string
The running batch’s ID.
app_url
string
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. The task you pass decides which IDs are required.
For create_strategy and update_strategy. Pass the operation_id. On success the result includes the finished strategy summary.
Inputs
session_id
string
required
The session.
task
string
required
Which kind of wait: strategy_op, backtest, or optimization.
operation_id
string
Required when task="strategy_op".
artifact_id
string
Required when task="backtest" or task="optimization".
optimization_id
string
Required when task="optimization".
timeout_seconds
number
default:"45"
How long to wait this call, 1–300. On timeout the work continues server-side.
Result
status
string
Present as timed_out when the wait window elapses but the work is still running. Call again to keep waiting.
strategy
object
On a successful strategy_op: the finished strategy summary.
backtest_results
object
On a successful backtest: the run’s metrics.
best_result
object
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
session_id
string
required
The session.
task
string
required
Which task to cancel: strategy_op, backtest, or optimization.
operation_id
string
The operation to cancel, for strategy_op.
artifact_id
string
The strategy whose task to cancel, for backtest / optimization.
optimization_id
string
The sweep to cancel, for optimization.
Result
session_id
string
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 item in_progress while working, and mark items completed as you finish them. Inputs
session_id
string
required
The session.
todos
array
required
The full task list. Each item:
Result
session_id
string
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. Result
count
number
How many symbols were returned.
symbols
array
The symbols. Each entry includes ticker, name, and sector.

get_reference_data

Look up contract metadata for one symbol. Inputs
symbol
string
required
The ticker, e.g. MNQ.
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.