Skip to main content
Glama

preview_scene

Read-onlyIdempotent

Render a declarative scene as a PNG preview before plotting, ensuring the simulated output matches what the Line-us pen will draw on paper.

Instructions

Render a declarative SCENE as a PNG without drawing. Prefer this over preview_paths: a scene is ~50x smaller than the coordinates it compiles to, and draw_scene given the SAME scene provably draws what you previewed.

scene = {"shapes": [ ...shape... ], "fit": [x,y,w,h] (optional, scales the lot)}

There is deliberately NO library of shapes -- a fixed catalogue would handle the
dull cases and send everything interesting back to pasting raw points. Curves are
EXPRESSIONS, so the vocabulary is open:

  {"param": {"t": [0, 6.2832, 200],
             "x": "33+5.5*cos(t)", "y": "30+5.5*sin(t)", "closed": true}}

is a circle; change the expressions and it is a spiral, rose, lissajous or
harmonograph. Variables: t, plus i and n inside "repeat". Functions: sin cos tan
asin acos atan atan2 sinh cosh tanh exp log sqrt hypot floor ceil fmod degrees
radians abs min max round pow sign clamp lerp; constants pi, tau, e.

Producers (exactly one per shape):
  "param"  {"t":[start,stop,steps], "x":expr, "y":expr, "closed":bool}
  "path"   [[u,v], ...]                      one stroke, the escape hatch
  "paths"  [[[u,v], ...], ...]               several strokes
  "text"   "a

b", or [{"s":"a","font":"timesr"}, {"s":"b","font":"scriptc"}] with "font", "align" (left|center|right), "leading" (default 1.4) "svg" "..." "doodle" "cat", with "pick" (index), "source" (auto|bundled|web) -- real drawings from Google's Quick, Draw!, single strokes in the order a person drew them. Call doodles() first to SEE the candidates and choose a pick. Modifiers (any producer): "fill" {"hatch":deg, "spacing":mm (default 1.15), "cross":bool, "outline":bool} -- hatching is how you get solid black here "transform" {"translate":[dx,dy], "rotate":deg, "scale":s|[sx,sy], "about":[x,y]} "box"/"fit" [x,y,w,h] scale this shape into a box "repeat" N, with i (0..N-1) and n available in the expressions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sceneYes
simulateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds a genuine behavioral guarantee not in the annotations: the preview is a faithful stand-in for draw_scene output, and no drawing occurs. It also discloses the 'exactly one producer per shape' constraint. It does not explain the simulate flag or return delivery, so not a 5.

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-loaded with purpose and routing, then organized into producers/modifiers blocks that are easy to scan. It is long, and a couple of sentences (e.g. the rationale for having no shape catalogue) are more justification than instruction, but for a DSL this length is largely earned.

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?

No output schema exists, so the description carries return-value burden; 'Render ... as a PNG' states the artifact type but not how the image is delivered. The DSL surface is otherwise thoroughly specified. The undocumented 'simulate' flag is the main remaining hole.

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 0% and the scene object is undocumented in the schema, so the description must compensate — and it does so exhaustively, enumerating producers, modifiers, variables, functions, and constants with examples. However, the second parameter 'simulate' (default true) is never mentioned anywhere, leaving a real gap.

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 ('Render a declarative SCENE as a PNG without drawing') and immediately distinguishes itself from siblings preview_paths and draw_scene. An agent knows exactly what this does and how it differs from the drawing tools.

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?

Explicitly says 'Prefer this over preview_paths', gives the reason (scene ~50x smaller than compiled coordinates), and ties it to draw_scene ('draw_scene given the SAME scene provably draws what you previewed'). It also routes to doodles() first for doodle picks. Clear when-to-use and named alternatives.

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