Skip to content
Get an API key

Create a live, parameterized what-if simulation: a runnable model the user drives with sliders and play/scrub controls, every output recomputing as they move.

Updated 16 Sep 20264 min read

Send "type": "data_simulator".

Create a live, parameterized what-if simulation: a runnable model the user drives with sliders and play/scrub controls, every output recomputing as they move. Use this for business models (growth, churn, revenue, unit economics), funnels with conversion rates, forecasts and projections, capacity/queue models, epidemic/population dynamics, financial models (compound interest, runway), sensitivity/what-if analysis, and data infographics (metric cards, charts, gauges and funnels composed around one topic). Use this INSTEAD of a chart or table whenever the point is to explore how outcomes CHANGE as the inputs change over time.

Also available as the MCP tool render_datasimulator. The same payload works through either surface.

Fields

data
titlestring

Short title of the simulation

descriptionstring

One short sentence describing what it models

seednumber

Random seed so stochastic runs replay identically (default 42)

timeobject

Simulation horizon

Child attributes
stepsnumber

Number of steps to run (1-1000)

unitstring

Name of one step, e.g. month, day, week, year

layoutobject

Dashboard grid layout

Child attributes
columnsnumber

Grid density, 2-6

controlsenum<string>

Where the what-if control panel docks. One of right, left or bottom.

parametersobject[]

The user's what-if levers, rendered as live controls. Each must be read by at least one rule, derived expression or view.

Child attributes
idstringrequired

Unique id, referenced by expressions

labelstringrequired

Human label shown on the control

controlenum<string>required

One of slider, knob, number, select, toggle, stepper or segmented.

minnumber
maxnumber
stepnumber
valuenumberrequired

Default value

formatenum<string>

One of number, integer, percent or currency.

optionsobject[]

For select/segmented: [{ label, value }]

groupstring

Optional heading clustering related controls

stateobject[]required

The evolving model variables. init is the step-0 value (a number, or a parameter-id expression string).

Child attributes
idstringrequired
labelstring
initanyrequired

Starting value: a number or an expression string

formatenum<string>

One of number, integer, percent or currency.

rulesobject[]

Run once per step in order; each assigns expr to a state id (target). t is 1..steps.

Child attributes
targetstringrequired

A state id

exprstringrequired

Expression evaluated each step

derivedobject[]

Recomputed from state and parameters after the rules each step (cannot accumulate across steps).

Child attributes
idstringrequired
labelstring
exprstringrequired
formatenum<string>

One of number, integer, percent or currency.

viewsobject[]required

Dashboard tiles. CRITICAL: each view type binds to its data through a SPECIFIC field, and a view with the wrong field (or no binding field) renders as 0. Use exactly: metric/sparkline/progress/gauge -> "value" (a single id); progress also "target"; gauge also "min"/"max"/"thresholds". table -> "columns" (array of ids). funnel -> "stages". line/area/bar/pie/doughnut/compare/radar -> "series" (array of ids). scatter -> "x" and "y". sensitivity -> "parameter" and "metric". distribution -> "metric". mapregions -> "regions"; mappoints -> "points". text -> "content" (and optional "variant"). Do NOT put a single value under "series", and never leave a view without its binding field.

Child attributes
typeenum<string>required
titlestring
spannumber

1..columns grid width

tallboolean
valuestring

metric/sparkline/progress/gauge: the SINGLE state/derived/parameter id this tile shows

seriesany[]

line/area/bar/pie/doughnut/compare/radar: ids to plot; an entry is an id string or { id, as: "line"|"bar" }

columnsstring[]

table: the ids to show one column each

stagesobject[]

funnel: [{ label, value }] stage bars

targetany

progress: the goal, a number or another id

minnumber

gauge: dial minimum

maxnumber

gauge: dial maximum

thresholdsnumber[]

gauge: [greenUpTo, amberUpTo] in the value's units

stackedboolean

line/area/bar: stack the series

horizontalboolean

compare: horizontal bars

xstring

scatter: the x-axis series id

ystring

scatter: the y-axis series id

parameterstring

sensitivity: the parameter id to sweep

metricstring

sensitivity/distribution: the id whose final value is measured

samplesnumber

sensitivity: number of sweep points

runsnumber

distribution: number of seeded runs

regionsobject[]

mapregions: [{ region, value }]

pointsobject[]

mappoints: [{ label, lat, lng, value }]

levelstring

mapregions: "country" | "state"

rampstring

mapregions: color ramp name

contentstring

text: the copy to show

variantstring

text: "heading" | "note"

Example

{
  "type": "data_simulator",
  "data": {
    "title": "Q4 Launch Planning",
    "description": "string",
    "seed": 0,
    "time": {
      "steps": 0,
      "unit": "string"
    },
    "layout": {
      "columns": 0,
      "controls": "right"
    },
    "parameters": [
      {
        "id": "string",
        "label": "string",
        "control": "slider",
        "min": 0,
        "max": 0,
        "step": 0,
        "value": 0,
        "format": "number",
        "options": [
          {}
        ],
        "group": "string"
      }
    ],
    "state": [
      {
        "id": "string",
        "label": "string",
        "init": "string",
        "format": "number"
      }
    ],
    "views": [
      {
        "type": "line",
        "title": "Q4 Launch Planning",
        "span": 0,
        "tall": false,
        "value": "string",
        "series": [
          "string"
        ],
        "columns": [
          "string"
        ]
      }
    ]
  }
}
Was this page helpful?

Sign in to MockFlow

The same account you use in the app and on the API.

Forgot your password?
or
Continue with GoogleContinue with Microsoft