Run build script
execute_scriptRuns a CraftScript on headless WorldEdit → renders + .schem, saved to the gallery. Returns buildId + scriptId: refine with edit_script, don't rewrite. RULES: Rhino ES5 only — var, function, for; NO let/const, arrow functions, template literals, class. Prelude auto-injected: do NOT call context.remember(). Coords are relative to origin. Write JS strings in 'single quotes' (no JSON escaping). Globals sess (EditSession), origin. Helpers (block ids as strings): pb, ps, fill, noisePalette, makeSphere, makeCylinder, makePyramid, roof, facade, porch, bayWindow, chimney, furnishRoom, staircase, placeBed, chairStair, rug, lampPost, placeTree, component, param, part, checkpoint. All helpers: search_docs "list"; signatures: worldedit-api. Ground: terrain({fit:houseRect, margin}), or pass flatten()'s RETURNED fn to surface (var pad=flatten(h,zone,padY); surface(mask,pad,mat)) or ground fills the interior. Stairs between floors: staircase(x,z,fromWalkY,toWalkY,dir), never a loop. checkpoint("LABEL") per phase shows how far a failing run got. Parametric by default: declare 3-6 param() + part() in every new build, without asking, unless the user refuses sliders.
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": {
"script": "<script>"
},
"name": "execute_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Gallery title. | |
| tags | No | ||
| depth | No | Volume Z (default 64). | |
| model | No | Your model id, recorded with the build. | |
| width | No | Volume X (default 64). Limit is total W×H×D ≤ ~16.7M, not per axis. | |
| dryRun | No | Test run: report stats, params, parts; save nothing (no renders by default). | |
| height | No | Volume Y (default 64). Be generous for tall builds: anything above is cut. | |
| params | No | Values for param() declarations, e.g. {"bays":7} (omitted = default). Declare param() + part() for natural knobs (size, storeys, style): owners get gallery sliders. | |
| script | Yes | CraftScript source (Rhino ES5, coords relative to origin). | |
| originX | No | Script origin in the volume; X/Y/Z default 0. | |
| originY | No | ||
| originZ | No | ||
| renders | No | isometric, front, side, back, top, interior (standing in the interior layer), section_y:N / section_x:N / section_z:N (volume coords). Default the first three; [] = none. Keep few (chat limit ~100 images). | |
| timeout | No | ms (default 30000). | |
| unlisted | No | Hide from the public gallery lists (tests, evals). | |
| showImages | No | false: URLs only, no inline images. | |
| userPrompt | No | The user's original request. | |
| baseBuildId | No | Build (e.g. an in-game capture) pasted at the origin first: EXTEND/EDIT it instead of rebuilding — inspect it, write only the additions. sess.getBlock sees it, onlyAir() masks do not. Volume defaults to its size +50%. | |
| checkParams | No | Also run each param at its extremes: reports dead, throwing or clipping params. | |
| enhancedPrompt | No | Your expanded prompt / plan. |