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.
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
titlestringShort title of the simulation
descriptionstringOne short sentence describing what it models
seednumberRandom seed so stochastic runs replay identically (default 42)
timeobjectSimulation horizon
Child attributes
stepsnumberNumber of steps to run (1-1000)
unitstringName of one step, e.g. month, day, week, year
layoutobjectDashboard grid layout
Child attributes
columnsnumberGrid 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
idstringrequiredUnique id, referenced by expressions
labelstringrequiredHuman label shown on the control
controlenum<string>requiredOne of slider, knob, number, select, toggle, stepper or segmented.
minnumbermaxnumberstepnumbervaluenumberrequiredDefault value
formatenum<string>One of number, integer, percent or currency.
optionsobject[]For select/segmented: [{ label, value }]
groupstringOptional heading clustering related controls
stateobject[]requiredThe evolving model variables. init is the step-0 value (a number, or a parameter-id expression string).
Child attributes
idstringrequiredlabelstringinitanyrequiredStarting 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
targetstringrequiredA state id
exprstringrequiredExpression evaluated each step
derivedobject[]Recomputed from state and parameters after the rules each step (cannot accumulate across steps).
Child attributes
idstringrequiredlabelstringexprstringrequiredformatenum<string>One of number, integer, percent or currency.
viewsobject[]requiredDashboard 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>requiredtitlestringspannumber1..columns grid width
tallbooleanvaluestringmetric/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
targetanyprogress: the goal, a number or another id
minnumbergauge: dial minimum
maxnumbergauge: dial maximum
thresholdsnumber[]gauge: [greenUpTo, amberUpTo] in the value's units
stackedbooleanline/area/bar: stack the series
horizontalbooleancompare: horizontal bars
xstringscatter: the x-axis series id
ystringscatter: the y-axis series id
parameterstringsensitivity: the parameter id to sweep
metricstringsensitivity/distribution: the id whose final value is measured
samplesnumbersensitivity: number of sweep points
runsnumberdistribution: number of seeded runs
regionsobject[]mapregions: [{ region, value }]
pointsobject[]mappoints: [{ label, lat, lng, value }]
levelstringmapregions: "country" | "state"
rampstringmapregions: color ramp name
contentstringtext: the copy to show
variantstringtext: "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"
]
}
]
}
}