Skip to main content
Glama

Draw a Zpup scene

render_scene

Draws a JSON-defined 3D scene as SVG or PNG, renders multiple angles, and returns validation errors with fix paths so you can correct shape placement.

Instructions

Draws a small 3D scene as a flat SVG picture and returns a PNG of it to look at, the SVG text, and any warnings. An invalid scene draws nothing and returns every error with its path and how to fix it. Pass views to see the same scene from several angles in one call, which is the quickest way to find a shape that is in the wrong place. views and pose change only this picture: an angle or a pose set with changes stays in the remembered scene. A scene is plain JSON: { width, height, rotate?, children: [...] } with shapes such as dot, path, ellipse, rect, polygon, box, pyramid, cylinder, cone and hemisphere placed with translate and rotate (degrees). x is right, y is down, z is toward the viewer. Call get_reference once before writing a first scene. The server remembers the last valid scene: a later call can leave scene out to draw it again, or pass changes to edit it.

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": "render_scene"
  }
}

Input Schema

NameRequiredDescriptionDefault
svgNoWhether to send the SVG text back. Default true. Set false while iterating on the look to save space.
poseNoChanges to draw with but not to keep, in the form of changes: the picture shows the scene in this pose, and the remembered scene stays as it is. Use it with views to check one pose of a sprite sheet large and from several sides before making the sheet.
sceneNoThe scene: an object with width, height and children (JSON text of the same is accepted). Call get_reference for the full format. Leave it out to use the scene from the last valid call.
viewsNoView angles to draw, each used in place of the scene's own rotate. Omit to draw the scene as written.
changesNoEdits to the remembered scene (or to scene, when both are passed), applied in order, so that a small fix does not need the whole scene again. Example: [{ "op": "set", "path": "children[2].translate.y", "value": -30 }, { "op": "append", "path": "children", "value": { "type": "dot", "stroke": 8, "color": "#333" } }, { "op": "copy", "path": "#tree", "value": { "id": "tree2", "translate": { "x": 60 }, "scale": 0.7 } }]. After a remove or insert, later items in that list have a different index, so give shapes an id and use "#id" paths. If the result is not valid, nothing is changed.
save_toNoAbsolute path ending in .svg or .png to write the picture to. With several views, -1, -2 and so on are added to the name.
preview_sizeNoLonger side of the PNG in pixels. Default 512.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the sparse annotations (openWorldHint=false, idempotentHint=false) by disclosing return contents, that an invalid scene draws nothing and returns every error with its path and fix, and that changes are transactional ('If the result is not valid, nothing is changed'). It also clarifies the non-obvious state split: views and pose affect only the picture, while changes persist in the remembered scene, which directly explains the non-idempotent hint.

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

Conciseness4/5

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

Front-loads what the tool does and what comes back, then layers usage, scene format and state semantics in a sensible order. A few sentences are dense and slightly convoluted, notably the clause about views and pose changing only this picture, but nothing is filler.

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

Completeness5/5

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

For a 7-parameter, zero-required, no-output-schema tool, the description covers returns, failure behavior, state/remembered-scene semantics, edit atomicity and where to find the full scene spec. Combined with 100% schema coverage, an agent has what it needs to call this correctly offline.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description still adds real meaning by explaining the pose-versus-changes persistence distinction and by summarizing the scene grammar (width, height, rotate, children; dot, path, ellipse, rect, polygon, box, pyramid, cylinder, cone, hemisphere) with the x-right/y-down/z-toward-viewer convention and degrees. It adds less for save_to, preview_size and the error-path syntax, which the schema already documents.

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 specific verb and resource ('Draws a small 3D scene as a flat SVG picture') and ties it to concrete outputs (PNG, SVG text, warnings). It also distinguishes itself from get_reference by deferring the full scene format to that tool, so an agent can tell which one to call for what.

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

Usage Guidelines4/5

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

Gives clear situational guidance: call get_reference once before writing a first scene, pass views to spot a misplaced shape, leave scene out to redraw the remembered scene, and pass changes for a small fix instead of the whole scene. It never states when NOT to use this tool in favor of render_spin or render_sprites, so the exclusions half of the rubric is missing.

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