Run Creator API JavaScript
creator_execRuns JavaScript against the persistent Creator API document (code mode): build, inspect, preview and export are all done through this one call. Every successful mutation commits before the tool returns; any thrown error, including a timeout, rolls back the whole script and leaves the document unchanged. Returns the script's return value as result, logs, a warnings array (unit and range lints), the new revision, any outputs a render or export queued, and attaches PNGs from renderFilmstrip/render as images. Key parameters: code (the script), documentId (default "default"), timeoutMs (default 5000, max 30000). See the server instructions for units and the invariants, and creator_docs (lookup/query/topic) or creator.help(name) for anything not covered there.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "creator_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript source; creator, PropertyType, params, ctx, dump, files are in scope. See the server instructions for units and the invariants. | |
| note | No | One line for the document's history; default: the script's leading // comment. | |
| params | No | ||
| timeoutMs | No | Wall-clock budget in milliseconds (default 5000, max 30000). | |
| documentId | No | Default "default"; use another id for a separate document. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||