Skip to main content
Glama
Brilliant MCP

Brilliant MCP

Official

export

Idempotent

Export design elements or canvases as PNG, SVG, PDF, HTML, React, MP4, or MOV files, returning inline data or writing to a specified path for handoff and publishing.

Instructions

Export elements in the specified format and return the data. Raster formats (png, jpeg, webp) return an inline image. SVG returns raw SVG markup as text. HTML returns an HTML/CSS snippet as text. PDF returns base64-encoded data as text. Video formats (mp4, mov) write a file (large binary is never inlined) and return its path; use duration (seconds, max 30) and fps to control length. MOV supports a transparent background; MP4 does not. With motion (mp4/mov) it renders a FILM, Motion/<film>.bm beside the canvas or at the project root: STATE frames tweened by element name, per-frame blueprint patch lines for the procedural rest (knowledge motion/core and motion/grammar, runner tool/motion/render.mjs). "replay" (animated reveal) needs an interactive recording session and is not available headlessly: it returns a clear error. When outputPath is provided, writes to that file path instead and returns a confirmation. In the web editor there is no local filesystem: outputPath is not available (omit it and the data returns inline), and video export (mp4/mov) is not available at all (use png/jpeg/webp/svg/pdf/html, or export from the desktop app). (External MCP clients: call init first for usage docs. Hosted-CLI and sub-agents have docs pre-loaded.)

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

Input Schema

NameRequiredDescriptionDefault
fpsNoVideo frames per second (default 30, clamped 1-60). Only used for mp4/mov.
idsNoElement IDs (or #refs) to export. REQUIRED, except with `motion` (a film names its own canvases) or `pages`. `elementIds` is accepted as an alias.
pagesNopdf: one page per item, in order: an element id or #ref (the element, a frame exactly its frame) or a canvas path (the whole canvas), on any canvas. Replaces `ids`; the format defaults to pdf.
scaleNoScale factor for raster export. Defaults to 2.0. Ignored for svg/pdf. Mutually exclusive with width/height.
unionNopng/jpeg/webp: inline elements far apart on the canvas (their union mostly empty space) come back as one close-up per element; true keeps one image of the whole union.
widthNoTarget pixel width for raster export. If only width is provided, height is computed to maintain aspect ratio. Mutually exclusive with scale. Ignored for svg/pdf.
formatNoExport format: "png" (default), "jpeg", "webp", "svg", "pdf", "html" (snippet), "htmlDoc" (self-contained document), "htmlFlex" (snippet using semantic flexbox for auto-layout), "react" (JSX snippet pasteable into a .tsx file), or "mp4"/"mov" (video: writes a file, returns its path).
heightNoTarget pixel height for raster export. If only height is provided, width is computed to maintain aspect ratio. Mutually exclusive with scale. Ignored for svg/pdf.
motionNomp4/mov only: render a FILM through the engine evaluator (knowledge `motion/core`). Pass the film's name, "Launch" (or "Motion/Launch.bm"): `Motion/<film>.bm` in the folder of canvasId or at the project root, written by an edit whose ```bm fence opens with file("Motion/<film>.bm"). Or an object {film: "<name>" | bm: "<text>", patches: [[t, [lines]], ...], tracks: ["<track line>", ...] (a compiled track program the engine evaluates at any t), frames: [a, b], motionBlur: 1..8, frameHashes: true, dumpFrames: {dir, frames}}. A film's states live on the canvases its canvases[...] line names. `fps` defaults to the film's header.
fitModeNoHow to fit content when both width and height are specified: "fit" (letterbox, default), "fill" (crop), "stretch" (ignore aspect ratio).
projectNoOptional: run THIS call against a project other than the session's bound one: a name or key from list_projects (or an unambiguous name/handle substring), or the absolute path of a project folder (one holding .bl files, or an empty one), which opens in the background and is added to list_projects. Unknown/ambiguous is refused with candidates.
canvasIdNoCanvas ID to export from. REQUIRED, except with `pages` (each item names its canvas) and when every id or #ref lives on one canvas (that canvas is read).
durationNoVideo duration in seconds (default 3, max 30). Only used for mp4/mov.
sessionIdNoSession ID for per-session visual feedback. Optional.
backgroundNoBackground type: "clear" for transparent, "window" for window color. Defaults to "clear". Ignored for svg/pdf.
htmlImagesNoHTML/React only. Pictures are resampled to the size they are drawn at (1x and 2x, an image-set) and deduped. "files" (the default with outputPath) writes them under images/ beside the markup; "inline" embeds data URIs (always the case without outputPath).
outputPathNoFile path to write the exported data to. When provided, writes the file and returns a confirmation instead of inline data. A relative path is written under the project's Exports/ folder; a path ending in / names a folder. Works with all formats.
jpegQualityNoJPEG quality 0-100. Defaults to 90. Only used when format is "jpeg".
webpQualityNoWebP quality 0-100. Defaults to 90. Only used when format is "webp" and webpLossless is false.
videoQualityNomp4/mov: "low", "medium" or "high" (default high), the encoder bits per pixel per frame 0.04, 0.08 or 0.16 (VideoBitrate: 5, 10 or 20 Mbps at 1080p60, bounded 1 to 120 Mbps): a 29 s 1440x1440x60 clip asks about 20 Mbps at high, about 72 MB, half at medium, a quarter at low. The answer names the applied bitrate.
webpLosslessNoWhen true, uses WebP lossless encoding (quality is ignored). Defaults to false. Only used when format is "webp".
videoMaxBytesNomp4/mov: a size target in bytes (a 16 MB cap is 16000000). The encoder takes the bitrate that fits it over the clip when that is under the quality's ask, so one export lands under it, no second pass. Subtract the audio you will mux yourself. The answer names the applied bitrate and notes an overshoot.
htmlKeepInvisibleNoHTML/React only, for films: an element at opacity 0 is kept as markup at opacity 0 (it fades or cuts in later) instead of being dropped. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.10

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say this is a non-readonly, idempotent, non-destructive write; the description goes far beyond that by disclosing which formats return inline data versus write a file, that video binaries are never inlined, that a relative outputPath lands under Exports/, that MOV supports transparency while MP4 does not, and that replay fails with a clear error headlessly. These are exactly the side-effect and environment constraints an agent needs before calling.

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?

The format-by-format return contract is front-loaded in the first sentences and every clause about inlining vs file writes earns its place for a 23-parameter tool. The single dense paragraph does become hard to scan in the motion section, where knowledge-file and runner-script references sit alongside selection-critical information.

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 23-parameter tool with no output schema, the description covers what comes back in every format, when files are written, and which combinations are illegal or environment-dependent. An agent has enough to pick a format, predict the response shape, and avoid the headless and web-editor failure modes without further lookup.

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 100%, so the baseline is 3, and the description adds real meaning on top: duration/fps as the length controls for video, MOV transparency vs MP4, the motion film object's role, and the web-editor restriction on outputPath. It does not add much for the raster geometry params (scale vs width/height vs fitMode), which remain purely schema-documented.

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 gives a specific verb and resource ("Export elements in the specified format and return the data") and the rest of the description enumerates exactly what each format yields (inline image, raw SVG text, base64 PDF, file path for video). This clearly separates it from siblings like generate_image, generate_svg, capture_ui and render_ui, which produce rather than export existing elements.

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?

The description states concrete conditions and exclusions: video export is unavailable in the web editor, outputPath is unavailable there, `replay` errors headlessly, `motion` is mp4/mov only, and external MCP clients should call `init` first. It does not explicitly route against sibling tools (e.g. when to use export vs capture_ui or render_ui), which keeps it below a 5.

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