DocsMCP serverThe golden path

The golden path

The order of operations an agent should follow.

The server sends a set of instructions to the client on initialize, and MCP clients pass those to their model. The core of them is an ordering: the sequence of tool calls that takes an idea to a live index without wasting calls or producing something that validates but is wrong.

The order is not arbitrary. Each step is cheap enough to fail at, and fails in a way that tells the model what to fix, before the next step becomes expensive. This page is that ordering with the reasoning attached.

A portfolio of tickers is a short path

For holdings with target weights, such as "SPY 60, AGG 40": get_example("personal_portfolio"), swap your tickers and weights into the literal rows of its map_identifiers step, then run_backtest and get_backtest. The steps below are for everything else.
get_example copy wiring from a real workflow (the catalog ships in the instructions)
get_operations exact schemas — only for operations you add or re-parameterize
inspect_dataset real columns, real values
get_column_values
run_workflow preview against real data (nothing saved)
inspect_run
validate_workflow optional draft check (the run tools validate on their own)
save_workflow persist as a draft
run_backtest validates + simulates, returns a backtest_id immediately
get_backtest poll: run summary (+ chart-sized series)
deploy_index register a live index (confirm=true)

The steps

  1. 1

    list_operations — find out what exists

    Call it with no arguments for everything plus the category list, or pass a category to narrow. The point of starting here is negative: it establishes that the operation you were about to name from memory either exists or does not. An invented operation name is the single most common way an agent-built workflow fails, and it fails late.

  2. 2

    get_example — copy wiring, do not invent it

    list_examples then get_example returns production-tested workflows with index_parameters_json — the full workflow as a JSON string. Reading one teaches the DAG shape faster than any schema does, because it shows how operations are actually chained rather than what each accepts in isolation. Pass several ids in example_ids to fetch them in one call; that is cheaper than separate calls and useful when the index combines patterns from more than one example.

  3. 3

    get_operations — get the exact parameter schema

    An example shows one valid parameterisation, not the full set. Before using an operation, fetch its spec so every parameter name and type is right. This is the step that catches the plausible-but-wrong parameter — the one that is accepted as an unknown key and silently does nothing.

  4. 4

    inspect_dataset and get_column_values — look at the data

    inspect_dataset with view='schema' gives real column names and dtypes; view='stats' gives per-column distributions. get_column_values gives the distinct values in a column — the canonical way to discover the real sector, country or rating strings a filter has to match. Filtering sector == "Tech" when the data says "Information Technology" produces an empty universe and no error.

  5. 5

    run_workflow — preview against real data

    Run a single operation, a sub-workflow or the whole workflow in preview mode. Source data is real; nothing is persisted. The response is a summary — columns, shape, a small sample — and the full outputs are cached for two hours, so inspect_run and get_column_values can drill into them by run_id and op_id.

    Why preview before validate. Validation checks structure: that the graph is wired legally and the parameters typecheck. It cannot tell you that a filter matched zero rows, that a score column is entirely null, or that a weighting is dominated by one name. Only running it does. A workflow that validates and produces nothing is the failure mode this step exists to catch.

  6. 6

    validate_workflow — check structure before you save

    Validates a candidate index_parameters against the manifest and returns structured issues rather than a pass/fail. It is cheap and it is specific, which makes it the right last check before anything is written. Saving an invalid workflow leaves a broken draft behind for a human to find later; validating first keeps the failure inside the conversation.

  7. 7

    save_workflow — persist a draft

    Without workflow_id, this creates a new draft. With one, it updates a workflow your team owns in place — and if that workflow is live, its changed operations trigger a live reload. The tool always validates before writing and never changes stage, so saving cannot accidentally promote a draft to live.

    Save before backtesting so there is something durable to refer back to. A backtest run against inline parameters that only ever existed in a chat message is not reproducible.

  8. 8

    run_backtest — simulate history

    Runs the workflow over history and returns a performance summary. It never creates a live index, no matter how it is called.

    Why backtest before deploy. Deploying is the point at which an index starts being calculated every session, gets an id that other systems can reference, and starts producing history someone may rely on. The backtest is the last opportunity to see the strategy's behaviour — returns, volatility, drawdown, turnover — at zero cost. Read it. Structural validity says nothing about whether the rule does what was intended.

    The tool launches the run and immediately returns a backtest_id; poll get_backtest until the status is completed or failed. include_series=true with max_points returns a chart-sized value series. When a poll arrives before the run finishes, get_backtest waits briefly server-side before answering, so back-to-back polling is cheap.

  9. 9

    deploy_index — go live, with confirmation

    Takes a saved workflow_id or inline index_parameters, runs a full backtest, persists that history, and registers the index for continuous scheduled calculation.

    Why confirm is required. confirm=true is an explicit, separate argument so that deploying cannot happen as a side effect of a model reading "make me an index" as an instruction to ship. It forces the agent to state the intent deliberately, and gives the client a natural place to put a human in the loop. A safety gate also refuses to register an index that resolves to no holdings. The tool returns the pending index_id and backtest_id immediately — poll get_backtest(backtest_id); deployed_index_id appears there when it completes.

Structural rules

Three rules are enforced at validation. An agent that knows them up front saves a round trip.

  • Every flow starts with a trigger operation. The trigger is what defines the schedule the index recalculates on.
  • The workflow must include create_index_holdings. Holdings — actual share counts — are what the value engine calculates from; a workflow that stops at weights produces no index.
  • Every flow must persist a result. A branch that computes something and drops it is treated as an error, not as dead code to ignore.

The $ref convention

Operations are wired together in two places, and both are required. In an operation's parameters, refer to an upstream output with {"$ref": "<op_id>.output#column"}. Separately, list that upstream operation in the operation's input array.

The redundancy is deliberate: input is what builds the DAG and determines execution order, while $ref is what binds a specific column into a specific parameter. Supplying the $ref alone is the classic mistake — the parameter points at an operation the engine has no reason to run first.

{
"id": "weighting",
"operation": "create_index_weighting",
"input": [{ "$ref": "screen" }],
"parameters": {
"weighting_column": { "$ref": "screen.output#market_cap" }
}
}

A worked example

What the path looks like in practice, building a market-cap weighted index of the largest US technology companies. The narrative below is the sequence of tool calls, with what each one settles.

  1. list_operations() — returns every operation with its category. The agent finds the trigger operations, the security-selection operations, create_index_weighting and create_index_holdings, and confirms it is not inventing names.
  2. list_examples(search="market cap") then get_example(example_ids=["staggered_effective"]) — a production workflow with the same shape. Its index_parameters_json shows the real wiring: trigger, then selection, then weighting, then holdings, with input arrays and $ref parameters already correct.
  3. get_operations(operation_ids=["create_index_weighting","create_index_holdings"]) — exact parameter schemas for the two operations the agent will change, rather than assuming the example used every available option.
  4. get_column_values(column="sector", dataset_id="…") — the real sector strings. This is where "Tech" becomes "Information Technology". If the index is driven by a team dataset rather than reference data, list_datasets and inspect_dataset(view="schema") come first.
  5. run_workflow(operations=…) with just the trigger and the selection step — a preview against real data, persisting nothing. inspect_run(view="shape") confirms the filter matched a sane number of securities rather than zero or everything.
  6. run_workflow again with the weighting and holdings steps appended, then inspect_run(view="stats", column="weight") — checks the weight distribution is not dominated by a single name and that nothing is null.
  7. validate_workflow(index_parameters=…) — structure, wiring and manifest conformance. Returns issues to fix, not a bare failure.
  8. save_workflow(index_parameters=…) — persists a draft and returns a workflow_id.
  9. run_backtest(index_parameters=…, start_time="2014-12-31") — returns a backtest_id immediately. get_backtest(backtest_id, include_series=true) returns the performance summary and the downsampled series once complete. This is the point at which a human should look at the numbers.
  10. deploy_index(workflow_id="…", confirm=true) — full backtest, history persisted, index registered for scheduled calculation. Poll get_backtest(backtest_id) — it reports deployed_index_id when it lands.

Never invent, always discover

If there is one rule to keep from this page it is the one the server instructions state directly: never invent operation names, dataset ids, column names or filter values. Every one of them is discoverable with a single tool call, and every one of them fails quietly rather than loudly when it is wrong. A guessed column name produces an index; it just produces the wrong one.