Skip to main content
Glama

Make a sprite sheet of a Zpup scene

render_sprites

Draws a 3D scene from every direction into one transparent PNG sprite sheet for games, adding poses for walk cycles and an optional JSON frame list for engines.

Instructions

Draws one scene from every side, turned in equal steps about its vertical axis, and lays the pictures out as one transparent PNG sprite sheet for a game: the same object in 4, 8 or 16 directions, all from one scene, so they agree with each other. With poses it draws every direction in every pose, for a walk cycle: one row per direction, one column per pose. With save_to it also writes the frame list next to the PNG as JSON, in the form TexturePacker writes (JSON hash) and Phaser, PixiJS and other engines read. Returns the sheet to look at. Every cell has the scene's own frame, so check that nothing is cut off as the object turns, or pass fit to have the frame set for you. Keep the scene's own view angle for the tilt: rotate x around -30 for a view from above. 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_sprites"
  }
}

Input Schema

NameRequiredDescriptionDefault
fitNoSet to true to have the frame set for you: every cell shows the same part of the scene, enlarged so that the drawing fills the cell in the direction and pose where it reaches furthest. Nothing is cut off and no space is wasted, and the scene is not changed. Default false, which uses the scene's own frame.
posesNoPoses of the scene, for a walk or any other motion: each pose is a list of changes, in the form of changes, applied to the scene on its own, and an empty list is the scene as it is. The sheet then has one row per direction and one column per pose. Give each part that moves an id and put it in a group at its joint, so that a pose only sets rotate: [[], [{ "op": "set", "path": "#leg-front.rotate", "value": { "x": 25 } }, { "op": "set", "path": "#leg-back.rotate", "value": { "x": -25 } }], [], [{ "op": "set", "path": "#leg-front.rotate", "value": { "x": -25 } }, { "op": "set", "path": "#leg-back.rotate", "value": { "x": 25 } }]]. Poses do not build on each other and are not remembered. At most 16, and at most 128 cells in all.
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.
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.
columnsNoCells per row. Default: all directions in one row, up to 8. Not used with poses, where a row is one direction.
save_toNoAbsolute path ending in .png to write the sheet to. The frame list is written next to it with the same name ending in .json.
cell_sizeNoLonger side of each cell in pixels. Default 128.
directionsNoHow many directions to draw, at even steps of a full turn. Default 8.
preview_directionNoA direction, counted from 0, to send back on its own as a second, larger picture: its poses in a row, to judge the motion from one pose to the next. 2 is the side view when there are 8 directions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the supplied openWorldHint/idempotentHint annotations, the description discloses real behavioral traits: the server retains the last valid scene so later calls can omit it, save_to writes a sibling JSON file in TexturePacker JSON-hash form readable by Phaser and PixiJS, and poses are applied independently and not remembered. Those are exactly the stateful, side-effecting facts an agent needs before calling, and they are consistent with idempotentHint=false.

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?

The purpose leads, then layout, then file output, then the scene-format primer and the memory rule, which is a sensible order. It runs long and the scene/coordinate-system recap partly duplicates what get_reference is said to provide, but almost every sentence carries operational information.

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?

With nine optional parameters, no output schema, and no required inputs, the description supplies the missing scaffolding: the prerequisite get_reference call, the scene JSON shape, the remembered-scene fallback, the fit safety valve for clipping, and the return value (the sheet). An agent can call it correctly without further context.

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 description coverage is 100%, so the baseline is 3, and the description earns an increment by explaining the grid geometry (one row per direction, one column per pose) and the engine-facing meaning of the save_to JSON. It adds little on cell_size, columns, or preview_direction beyond what the schema already states.

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

Purpose4/5

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

"Draws one scene from every side, turned in equal steps about its vertical axis, and lays the pictures out as one transparent PNG sprite sheet" is a specific verb plus a precisely scoped output, so an agent immediately knows what it gets back. It does not, however, contrast itself with sibling render_spin, which by name suggests overlapping rotation-rendering behavior, so the boundary between the two must be inferred.

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?

It gives concrete usage conditions: poses for a walk cycle, fit when the object gets cut off as it turns, columns for layout, preview_direction to judge motion, and the prerequisite "Call get_reference once before writing a first scene." What is missing is an explicit statement of when to prefer this over render_scene or render_spin.

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