Skip to main content
Glama
Brilliant MCP

Brilliant MCP

Official

convert_html

Read-onlyIdempotent

Convert HTML with inline CSS into Brilliant blueprint lines per frame, optionally returning laid-out element boxes and design tokens, without creating anything on the canvas.

Instructions

Convert HTML with inline CSS to Brilliant blueprint lines WITHOUT creating anything: the exact lines edit (html) would write, per input string, plus the converter's notes. Batch many strings (the frames of a composition) in one call as frames. With layout: true each frame is also built into a throwaway world and the answer adds every element's laid-out box (x, y, w, h in canvas px, the unrotated box), its rotation, opacity, first solid fill, name, type and text, so the layout is the app's auto layout, never a guess. A data-id or data-key attribute is the element's NAME (stable identity across frames, the handle a motion patch line leads with as #name); id="x" is a #x ref as in edit (html). Give the outermost element an explicit px width and height so percentage sizes and offsets resolve. Same CSS support as edit (html), plus transform translate()/scale()/rotate() (fractional degrees) folded into p()/s()/rot().

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

Input Schema

NameRequiredDescriptionDefault
htmlNoOne HTML string (the one-frame form of `frames`).
framesNoHTML strings to convert, one per frame, in order. At most 1000 per call and 16 MiB in total.
layoutNotrue: build each frame into a throwaway world and answer the laid-out boxes (`elements` per frame). Default false.
tokensNotrue: add the project's design-system tokens resolved per mode as `tokens` (`{ modes, values: { base, light, dark: { key: hex or number } } }`), with or without frames. Default false.
projectNoOptional: with `layout` or `tokens`, resolve against a project other than the session's bound one (its fonts and design system), a name or key from list_projects.
sessionIdNoSession ID from init. Optional.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.10

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotent/non-destructive, and the description reinforces the no-side-effect claim with a concrete mechanism ('throwaway world') and the exact lines `edit (html)` would produce. It also discloses CSS support differences (transform translate/scale/rotate folded into p()/s()/rot()) and the explicit-px-size requirement, which annotations cannot convey. It does not cover failure modes or how ambiguous inputs are handled.

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 point is front-loaded, but the body is one dense run-on paragraph with stacked parentheticals that is hard to scan. Nearly every clause earns its place informationally, yet the lack of sentence breaks and structure costs readability.

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?

With no output schema, the description carries the return-value burden and does so well: lines plus converter notes, and under `layout` the per-element x/y/w/h, rotation, opacity, first solid fill, name, type and text. Only edge cases (both `html` and `frames` supplied, what happens on CSS it can't convert) are left unaddressed.

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 schema already documents all six parameters. The description still adds real meaning: `html` is 'the one-frame form of `frames`', `frames` correspond to composition frames, `layout: true` returns the app's auto layout (never a guess) with unrotated boxes, and `data-id`/`data-key` define the stable element NAME used by motion patch lines.

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 specific verb and resource ('Convert HTML with inline CSS to Brilliant blueprint lines') plus the crucial scope qualifier 'WITHOUT creating anything: the exact lines edit (html) would write'. It also names the sibling `edit (html)` it mirrors, so an agent can distinguish preview-from-write without opening a schema.

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 context: use `frames` to batch many strings (the frames of a composition), use `layout: true` when laid-out boxes are needed, and use `project` to resolve against a non-bound project. It implies but never states the inverse routing rule (use edit (html) when you actually want the lines written), so it stops just short of explicit when-not guidance.

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