Skip to main content
Glama

Export web-ready files

canvas_export
Read-only

Get finished, web-ready files from a canvas to put in a website's code: give it a canvas link or id (your user's, or one shared with them). Formats:

  • svg: one optimised, self-contained SVG file (returned inline, and as a link). text: "outlined" turns letters into paths (needs Studio Plus), "fonts" (default without it) carries the canvas's faces inside the file, "live" names the faces and leaves loading them to the page.

  • react: the same SVG as a React component (JSX, no dependencies; props pass to the , title sets its label). Inline, and as a link. With prototype:true, a React prototype with all artboards, board links, hover and click actions, states, overlays and inputs: the art and fonts are embedded, the kit CSS variables can be set by the host page, and the onAudioEffect prop handles audio effects.

  • png / webp: a picture, width and/or height up to 2048 px (one alone keeps the canvas's shape; both: fit "contain" pads with the background or pad color, "cover" crops about the centre). webp takes quality 1-100 or lossless.

  • favicon: favicon.svg, favicon.ico (16, 32, 48), apple-touch-icon.png (180), icon-192.png and icon-512.png, with the tags and a web manifest.

  • og: an Open Graph and social card, 1200×630 (fit cover by default), with its tags. css_vars (svg and react, text "live"): the canvas's brand kit colors and fonts are written var(--brand, #0a7cff), so the graphic placed inline in a page follows the page's CSS variables (its theme, dark mode); a string prefixes the names ("acme-" gives --acme-brand). Without the variables on the page it draws as the canvas. frame: one of the design's artboards (canvas_edit frames), at its own size: a hero, a card and an icon from one design, each its own file. region {x, y, w, h}: any box of the surface instead. With neither: the design's first artboard, else everything drawn, fitted. Every format takes them; a picture is the artboard's file size unless width or height is given, and comes scaled down to your user's plan's longest side when it is bigger. A canvas that moves (anim): svg and react play its motion with CSS keyframes inside the file (no script; still, at rest, for people who ask for reduced motion), text "live" or "fonts" (outlined is always still); animated: false makes them still. Files that move come with Studio Plus (your person's plan or the canvas owner's); otherwise they are drawn still. Pictures are drawn at rest; time (seconds) draws any of them at that moment. revision (a number from canvas_undo history) or version (a review version) exports the canvas as it was then; otherwise as it is now. Either way the links give the drawing this call made, even if the canvas changes before they are fetched. Variants without editing: layers (show only these), hide (leave these out) and kit ({colors, fonts}: other values for the brand kit's names) change this file alone; nothing is saved and people watching see nothing. Handing over (no other options but those named):

  • bundle: every finished file of the design at once, for the repo: per named frame an SVG and a WebP (a social card also as its 1200×630 PNG, a frame named favicon as a favicon set, a frame named icon-… as SVG alone, and where a frame holds words in slots the artwork alone, "-art.webp", for the page to set the words in HTML), with manifest.json (each file's frame, size, crop, where it goes, alt text, whether it changed since the last bundle; the words in slots with their style; the brand's variables and fonts; contrast; the review; open job log entries) and HANDOFF.md, the same facts to read. From a review version (version; default the newest approved one, else the design as it is now) or a revision. targets {file: "path in the repo"} or {file: {path, alt}} keeps where each file goes, so the next bundle names the same places; write only the files marked new or changed. Studio Plus and Teams: canvas_status says which plan your person is on (call it if you are unsure; a Free plan is told what works instead).

  • strings: every word drawn on the design, by artboard (then what is on no artboard, by layer), each with the object that holds it and its part, copies with their own words; in the reply, nothing to download. frame: one artboard only. Any plan. For checking copy: the same label with two values, a placeholder left in.

  • pickup: PICKUP.md, the job as it stands for whoever picks it up (frames, masters and slots, brand, review, open pins, job log). Any plan.

  • brand: BRAND.md from the design's brand (or brand: a name), its colors by role, fonts, text styles, logos, do and don't, and tokens.css: to commit to the repo. Studio Plus and Teams: canvas_status says which plan your person is on (call it if you are unsure; a Free plan is told what works instead). Several files in one call: files [{frame or region, format (svg, react, png, webp, og), width?, height?, quality?, lossless?, fit?, pad?, text?, path?}, ...], up to 16: each made as its own call would make it (the other options apply to all), path the exact file to write in the repo; the reply is one block of downloads to run. transparent: true leaves the background out (needs Studio Plus). Pictures come back as links signed for an hour: download each to the path given (curl -fsSL "" -o ), then use them. Hidden objects and layers are never in an export.

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

Input Schema

NameRequiredDescriptionDefault
dirNowhere the files go in the repo (default public/); for a bundle, one folder for every file (kept like targets; targets still names single files)
fitNo
kitNoother values for the names in the kit, for this file only: {colors: {accent: "#2f6fd1"}, fonts: {heading: "serif"}}
padNopng, webp, favicon, og: the color around a contained canvas, or "none"
hideNoleave these layers out of the file
nameNofile or component name (default from the canvas title)
textNosvg and react: how letters are carried
timeNoseconds: the canvas at that moment of its motion, still (default: at rest)
brandNoformat brand: a brand name (default the design's)
filesNoseveral files in one call: [{frame or region, format, width?, height?, quality?, lossless?, fit?, pad?, text?, path?}]
frameNoan artboard (named frame) of the design (default: its first artboard, else what is drawn, fitted)
widthNo
canvasNoa canvas link or id (default: the one you have open)
formatNo
heightNo
layersNoshow only these layers in the file (a layer hidden on the canvas, such as masters, is shown when named here)
regionNoinstead of frame: any box of the surface, in its units
qualityNo
targetsNobundle: {file: "path in the repo"} or {file: {path, alt}}, kept for the next bundle
versionNoa review version, as it was sent
animatedNosvg and react: play the canvas motion (default true when something moves)
css_varsNosvg and react: the brand kit as CSS variables (true, or a name prefix); text is then "live"
losslessNo
revisionNothe canvas as it was just after this revision (canvas_undo history lists them)
prototypeNoreact only: export the whole interactive prototype as one JSX file
request_idNobundle: your own id for this call (a UUID): sent again after a dropped reply, the first bundle comes back as it was, with the files it marked changed
transparentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint/destructiveHint/openWorldHint; the description adds substantial behaviour beyond them — plan requirements, reduced-motion handling, the snapshot semantics of revision/version, 'the links give the drawing this call made, even if the canvas changes', hour-signed URLs with the curl download step, and idempotency via request_id. It also discloses that variants (layers/hide/kit) are ephemeral and that writing files to the repo follows the given path.

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 core purpose is front-loaded, but the body is an extremely dense wall of run-on sentences with nested parentheticals (the bundle bullet in particular) that is slow to parse for a calling agent. Nearly every clause carries information, yet the format could be tightened with clearer per-format structure and shorter sentences.

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?

For a 27-parameter tool with no output schema, the description covers essentially everything an agent needs: per-format output shape (inline vs link vs file), file-writing and repo-path behaviour, plan prerequisites, caching/snapshot semantics, and multi-file batching limits. Nothing material is left for the agent to guess.

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?

With 27 parameters at 74% schema coverage, the description does real work: it defines the text enum semantics ('outlined' needs Studio Plus, 'fonts' embeds the faces, 'live' names them), the css_vars prefix behaviour, region vs frame precedence, revision vs version, targets persistence, and the sizing rules for width/height/fit that the schema leaves bare. A few params (lossless, transparent) are only half-explained, so it stops just short of fully compensating.

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?

The opening sentence states a specific verb and resource — 'Get finished, web-ready files from a canvas to put in a website's code' — and the format list makes explicit that this is the canvas-to-web-asset exporter, distinct from font_export or photo_export. An agent can identify the tool and its scope without opening the 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?

It routes between modes explicitly: 'bundle' for the whole repo handoff, 'files' for up to 16 individual exports, 'strings' for copy checking, 'pickup'/'brand' for docs, plus when to call canvas_status if unsure of the plan. Plan gating (Studio Plus, Teams, Free) and exclusions ('Any plan' for strings/pickup) are stated per format, so the choice is not left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.