Skip to main content
Glama

replace_scene

Replace an entire scene's contents with new elements, snapshotting prior state for revert. For partial edits, use add_elements or update_elements.

Instructions

Replace a scene's entire contents. Destructive by design - the previous state is snapshotted, but prefer add_elements or update_elements when you only mean to change part of it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesShort description of what this change is doing, e.g. 'add the dog illustration'. Shown next to the snapshot in the history sidebar, which is how the user decides whether to keep or revert it. Always set it.
sceneYesScene id, exact name, or a unique part of the name. Use list_scenes if unsure.
elementsYesExcalidraw elements. Any field of a real element is honoured verbatim; what you omit gets a valid default (id, index, seed, version are generated). USE THIS FOR diagrams, layout, text, boxes, arrows, and detail strokes on top of something already drawn. For anything that has to LOOK LIKE something - a character, creature, object, vehicle, logo, illustration - do NOT assemble it from shapes here. Write it as one SVG and call import_svg. Shapes stacked by hand come out as a pile of parts (fat, seamed, toy-like) every time; one SVG comes out as one drawing. Types: rectangle ellipse diamond arrow line text freedraw frame. Fields: x y width height angle, strokeColor, backgroundColor (the fill), fillStyle solid|hachure|cross-hatch, strokeWidth 1|2|4, strokeStyle, roughness 0|1|2, opacity, roundness, fontSize, fontFamily (5 hand-drawn), textAlign, groupIds, points [[0,0],[dx,dy],...] relative. y points down. TEXT WRAPS: give a text element a `width` and prose is wrapped to it with the real font metrics (height follows); no width = one line per \n, sized exactly. Never break long paragraphs by hand. THE LOOK IS HAND-DRAWN. This is Excalidraw. roughness 1 (default) on everything; native rectangle/ellipse/arrow rather than 4-point lines; sparse points with roundness {type:2} for a curve (dense points look furry, not sketchy); hand-drawn font. Detail is a few extra strokes, never more parts. COLOUR IS FLAT. Solid fills, one colour per part, and the wobbly outline does the rest - that is the Excalidraw look. Do not shade: no hachure or cross-hatch as texture, no gradients faked with stacked shapes, no drop shadows. If a part must read as darker, give it a darker solid hex. Reserve hachure/cross-hatch for something that IS hatched (a cutaway, a glass pane). PAPER AND INK. Nothing is inverted for display: every hex shows exactly as written. New scenes are dark paper (#121212). Anything drawn without a strokeColor gets ink that contrasts with the paper (#e9ecef on dark, #1e1e1e on light); describe_scene reports `background` and `ink`. Any hex is fine - character colours are character colours on any paper. SHORTHAND. label on a shape adds centred bound text; ref names an element and start/end on an arrow bind to it. Generated geometry is an element whose type is polygon|star|arc|capsule|path, e.g. {"type":"path","points":[[0,0],[40,30],[90,10]],"closed":true} smooth curve through the points polygon {sides,cx,cy,r} star {points,cx,cy,r,innerRatio} arc {cx,cy,r,from,to} capsule {x,y,width,height,radius} repeat {count,dx,dy | cols,rows | around:{cx,cy}} and mirror {axis:'vertical',at} multiply one spec evenly. These are for furniture - rings, plates, arrays - not for bodies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the critical trait: the operation is destructive but recoverable because 'the previous state is snapshotted.' That is exactly the safety context an agent needs before wiping a scene. It stops short of explaining the snapshot/restore mechanics or failure modes, so not perfect, but strong for a mutation tool.

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

Conciseness5/5

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

Two sentences, front-loaded with the core action followed by the destructive caveat and the alternative. Every clause earns its place with zero redundancy.

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 destructive, three-parameter replace tool with no annotations and no output schema, the description plus the thorough inline schema cover purpose, destructiveness, recoverability, and alternatives. Only the restore path and edge-case behavior are left implicit, which are minor gaps given the sibling restore_snapshot.

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 coverage is 100% and the schema itself richly documents all three parameters (label, scene, elements), so the schema does the heavy lifting. The description adds no parameter syntax or format detail beyond what the schema provides, making the baseline 3 appropriate.

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 ('Replace a scene's entire contents'), making the full-overwrite semantics unmistakable. It also explicitly names the siblings it is not (add_elements, update_elements), so an agent can route correctly without opening any schema.

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?

Provides both the when-to-use ('replace entire contents') and the when-not ('prefer add_elements or update_elements when you only mean to change part of it'), naming the alternatives explicitly. Nothing is left to inference.

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