Skip to main content
Glama
Brilliant MCP

Brilliant MCP

Official

render_ui

Render a Brilliant UI component in an exact declarative state offscreen and capture it to an image file without touching the live app.

Instructions

Render a Brilliant UI component into an EXACT declarative state and capture it to an image file, offscreen, without touching the live app. component is a stager id (call list_stagers to enumerate them and their state schemas); state is the component-specific declarative state. Optionally draw highlight boxes over sub-targets (the scene registers "ui-stage.*" ids) and override the stage size. Writes lossless WebP by default. Desktop-only: it writes an image file, so it is not available in the web editor.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "component": "<component>",
      "state": "<state>",
      "outputPath": "<outputPath>"
    },
    "name": "render_ui"
  }
}

Input Schema

NameRequiredDescriptionDefault
stateYesComponent-specific declarative state. REQUIRED. See the component's stateSchema from list_stagers.
widthNoLogical stage width override (defaults to the stager's defaultSize).
formatNoImage format: "webp" (default, lossless) or "png".
heightNoLogical stage height override (defaults to the stager's defaultSize).
componentYesStager id to render (e.g. "ai-chat-panel"). REQUIRED. Call list_stagers for the available ids and their schemas.
backgroundNoOptional. true answers a `job:` id at once and runs the call on; wait({job}) blocks until it ends and answers its result. An edit waits its turn behind other agents' writes instead of refusing. Use it for a call that may outlast your client's timeout.
highlightsNoBoxes to draw over the render. Each is either {target: "<ui-stage.* id>"} or {rect: [x, y, w, h]} in captured-image logical pixels.
outputPathYesAbsolute file path to write the image to. REQUIRED.
pixelRatioNoDevice-pixel scale for the capture (default 2).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.10

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false; the description adds context beyond them: the render is offscreen and does not mutate the live app, output is lossless WebP by default, and the tool is desktop-only. It does not disclose what is returned (path? bytes? dimensions) or whether overwriting an existing outputPath is allowed, which matters for a file-writing tool.

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?

Roughly four sentences, front-loaded with the core action and scope, then prerequisites, then the desktop-only caveat. Dense but every clause carries information; no filler or restatement of the title.

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 9-parameter, no-output-schema tool this covers the essentials: what is rendered, where it goes, how to discover valid components, highlight overlays, and platform limits. The gaps are the undocumented `background`/`pixelRatio`/`outputPath` semantics and the absence of any statement about the return value, which matters since no output schema exists.

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 coverage is 100%, so the baseline is 3. The description usefully reinforces `component` (stager id, ties to list_stagers), `state`, `highlights` (scene 'ui-stage.*' ids) and size overrides, but says nothing about `outputPath`, `pixelRatio`, or `background`, and the schema's own `background` description is unrelated boilerplate about `job:` ids and wait(), which the prose does nothing to correct.

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 precise verb chain (render + capture to file) against a specific resource (a Brilliant UI component), plus the crucial scoping detail 'offscreen, without touching the live app' which separates it from a live capture. An agent can tell immediately this is a headless deterministic render, not an interactive screenshot.

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 an explicit prerequisite/route ('component is a stager id; call list_stagers to enumerate them and their state schemas') and an explicit availability exclusion ('Desktop-only... not available in the web editor'). It does not name or exclude sibling capture tools such as capture_ui, so the alternative selection is left partly to inference.

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