Skip to main content
Glama
Chandelier

Chandelier

by acidka

preview

Renders the active Illustrator document or a region as a PNG, optionally comparing it with a reference image to report visual differences and RMSE.

Instructions

Look at the active document: renders a PNG and returns it as an image. One of: artboard (index, default active), refs (items, framed with pad, default 5%), region ([x,y,w,h] from artboard's top-left if given, else the active one's; may lie off it). max_px = longest side (default 1024) or width = exact px. background "white" | "transparent". save_to copies the PNG (with reference: the comparison, and the render as .preview.png). reference: an image (PNG/JPEG) to compare with → ONE image [reference | preview | difference in red] (600 px panels) + rmse (0 = same), content_box in both (shift/scale show an offset or wrong size) and differences: up to 6 regions {rect, kind: shifted (with shift [dx, dy] = preview − reference) | missing | extra | changed, items there}. reference_crop: [x,y,w,h] in image pixels to cut the page out first. One check call: more [artboards] → extra renders (default 500 px); preflight:true, info:true (document_info) add those results.

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

Input Schema

NameRequiredDescriptionDefault
padNo
infoNo
moreNo
refsNo
widthNo
max_pxNo
regionNo
save_toNo
artboardNo
preflightNo
referenceNo
backgroundNo
reference_cropNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations supplied, the description carries the burden and does so well: it discloses the side effect of save_to (writes <name>.preview.png), the composite return of reference mode (reference | preview | difference panels at 600 px plus rmse, content_box, up to 6 difference regions), and the extra results triggered by preflight/info. It does not state permissions or read-only nature, but the 'Look at' framing and absence of destructive behavior make the risk profile clear.

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 is front-loaded, but the remainder is telegraphic prose dense with brackets, arrows, and parenthetical nesting ('differences: up to 6 regions {rect, kind: shifted (with shift [dx, dy] = preview − reference) | missing | extra | changed}') that is hard to parse on a first read. Little is wasted, but structure could be improved with clearer enumeration.

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 13-parameter tool with no annotations and no output schema, the description covers the modes, all parameters, and the shape of the comparison return in reasonable detail. The plain non-reference return (does it include content_box or just the image?) is the main unresolved gap.

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

Parameters5/5

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

Schema description coverage is 0% across 13 parameters, so the description must compensate and it does: artboard index (default active), refs and pad (default 5%), region coordinates from the artboard's top-left, max_px default 1024 vs width exact px, background enum values, save_to behavior, reference and reference_crop semantics, and more/preflight/info effects. Every parameter receives meaning beyond its bare type.

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?

The opening clause gives a concrete verb and resource: 'Look at the active document: renders a PNG and returns it as an image.' It then names the three modes (artboard, refs/region) that distinguish it from siblings like export or document_info. It stops short of explicitly contrasting itself with those siblings, which keeps it from a 5.

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

Usage Guidelines3/5

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

Usage context is implied rather than stated: 'reference' mode is clearly for visual comparison and 'One check call: more [artboards] ... preflight:true, info:true (document_info) add those results' hints at routing to document_info. However, there is no explicit when-to-use-this-vs-export guidance and no statement of when not to use it.

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