Skip to main content
Glama

Paint: export a file

paint_export
Idempotent

Save a canvas as PNG, JPG, BMP, SVG, or layered .paint, returning the file path and a preview of the output.

Instructions

Write the canvas out: png, jpg, bmp, svg (rebuilt from recorded vector operations) or .paint (layered, re-openable). Returns the path under the paint root plus a preview of exactly what was written.

svg keeps rect/ellipse/line/polygon/path/text/gradient operations; raster-only steps (brush, fill, pixels, filters, stamps) cannot be vectorised and are reported. Set embed_raster_fallback to also place the current PNG behind them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoTarget path relative to the paint root; omit to use the canvas name
canvasYesCanvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted.
formatNoauto = png unless path says otherwiseauto
flattenNotrue = whole canvas, false = active layer only (raster formats)
previewNoImage reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only
qualityNojpeg quality or png deflate effort
backgroundNoColour to flatten onto, e.g. '#ffffff'; null keeps transparency
embed_raster_fallbackNosvg only: embed the current picture underneath the vector shapes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare non-read-only, idempotent, non-destructive, closed-world. The description adds genuinely new behavior: the return shape (path under paint root plus preview of what was written), the lossy nature of svg for raster-only steps, and the reported unvectorised operations. It omits overwrite/error behavior for existing target paths, keeping it short of 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 the core action and format list in the first clause, then return value, then the svg caveat. Dense but every sentence carries actionable content; the svg/embed explanation is slightly long but justified for a lossy-conversion caveat.

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?

No output schema exists, yet the description explicitly states what is returned (path plus a preview of exactly what was written), and it covers the format-specific edge cases that an agent must know before calling. Nothing essential is missing for an 8-parameter export tool.

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 description coverage is 100%, so every parameter including format, flatten, preview, quality and embed_raster_fallback is already documented in-schema; baseline is 3. The description reinforces format and svg-fallback semantics but mostly restates what the schema states, adding only marginal meaning.

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 concrete verb (write out) and resource (the canvas file), enumerates the exact output formats, and implicitly distinguishes itself from paint_import. An agent knows immediately this is the persistence/export step of the paint family.

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 conditional guidance: which formats are available, what svg preserves vs drops, and the embed_raster_fallback workaround for raster-only steps. It stops short of naming sibling alternatives (e.g. paint_import or paint_preview) or stating when to prefer export over them, so it is context-rich but not fully routing.

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