Skip to main content
Glama

Run build script

execute_script

Runs 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

NameRequiredDescriptionDefault
nameNoGallery title.
tagsNo
depthNoVolume Z (default 64).
modelNoYour model id, recorded with the build.
widthNoVolume X (default 64). Limit is total W×H×D ≤ ~16.7M, not per axis.
dryRunNoTest run: report stats, params, parts; save nothing (no renders by default).
heightNoVolume Y (default 64). Be generous for tall builds: anything above is cut.
paramsNoValues for param() declarations, e.g. {"bays":7} (omitted = default). Declare param() + part() for natural knobs (size, storeys, style): owners get gallery sliders.
scriptYesCraftScript source (Rhino ES5, coords relative to origin).
originXNoScript origin in the volume; X/Y/Z default 0.
originYNo
originZNo
rendersNoisometric, 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).
timeoutNoms (default 30000).
unlistedNoHide from the public gallery lists (tests, evals).
showImagesNofalse: URLs only, no inline images.
userPromptNoThe user's original request.
baseBuildIdNoBuild (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%.
checkParamsNoAlso run each param at its extremes: reports dead, throwing or clipping params.
enhancedPromptNoYour expanded prompt / plan.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false), it discloses the key side effects: renders and .schem are persisted to the gallery, and dryRun saves nothing. It also explains checkpoint('LABEL') progress semantics on failure, the Rhino ES5 runtime constraint, and the auto-injected prelude – all behavior an agent could not infer from the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose sentence and the edit_script routing are front-loaded and earn their place, but the body sprawls into a dense reference dump (helper lists, ground/stairs rules, checkpoint advice) with some duplication of schema text about param()/part(). Readable but not tight; the condensed ALL-CAPS rule blocks are hard to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 20-parameter code-execution tool with no output schema, the description covers return values (buildId, scriptId), runtime constraints, helper availability pointers, ground/stairs conventions, and failure diagnostics via checkpoints. Remaining gaps are error/timeout reporting when a script fails outright, which an agent would still have to discover empirically.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 85%, so the schema already documents origin, size limits, renders, dryRun, params, and baseBuildId in detail. The description restates a few of these (coords relative to origin, param()/part() → slider knobs) rather than adding new semantics, though the 'Rhino ES5' and prelude rules do clarify what the script parameter accepts. Baseline 3 fits.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb and resource ('Runs a CraftScript on headless WorldEdit'), names the artifacts produced (renders + .schem saved to the gallery) and the returned IDs (buildId, scriptId). It also explicitly contrasts itself with the sibling edit_script, so an agent can distinguish create-vs-refine without opening sibling schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit routing guidance: 'refine with edit_script, don't rewrite' for follow-ups, dryRun for test runs, baseBuildId to extend an existing build instead of rebuilding, and a default policy ('Parametric by default … without asking, unless the user refuses sliders'). When-to-use and when-not-to-use are both present.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources