Simulate Effect
simulate_effectDeterministically step a .prt effect in Node without rendering to report per-layer counts over time, peak vs capacity, spatial bounds, completion, and a reproducible seed/dt state hash.
Instructions
Deterministically step a .prt effect in Node (no rendering) and report per-layer live counts over time, peak vs capacity, spatial bounds, completion, and a statehash plus the exact {seed, dt, steps} to reproduce it. Same seed + dt sequence => identical output. Validates first; an invalid doc returns validate-shaped errors.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "simulate_effect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dt | No | Fixed timestep. Default 1/60; clamped to [0.001, 0.05] (the runtime MAX_DT). | |
| doc | No | The .prt document as a JSON string. | |
| seed | No | Override the doc's authored seed. Default: the doc's seed. | |
| handle | No | A handle from open_effect — use instead of doc to avoid resending the document. | |
| duration | No | Seconds to simulate. Default 3; capped at 60. | |
| sampleInterval | No | Seconds between count samples. Default 0.1; floor 0.001, widened if it would emit more than 4096 samples. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| echo | Yes | The exact inputs used after defaulting/clamping — replay these for an identical statehash. | |
| bounds | Yes | Axis-aligned bounds over every live particle across the run; null if none ever spawned. | |
| layers | Yes | ||
| warnings | Yes | ||
| completed | Yes | True if the effect reached isDone (one-shots); false for looping/unfinished. | |
| statehash | Yes | hex8 FNV-1a over the final public sim state — reproducible per {seed, dt, steps}. | |
| completionTime | Yes | Seconds at which isDone first held; null if never. |