ui_builder_render_design_matrix
See one design on several devices in ONE picture: a contact sheet with a captioned cell per device × theme × font scale, plus each cell's device, size and box on the sheet. Nothing is saved — the design's environment is swapped on a scratch copy for each cell. Name devices by preset (phone_small, phone, phone_landscape, foldable_folded, foldable_unfolded, tablet_portrait, tablet_landscape, wear_small_round, wear_large_round, wear_square, tv_1080p, widget_small_round, widget_small_squircle, widget_small_rectangular, widget_large_round, widget_large_squircle, widget_large_rectangular) or as {widthDp, heightDp, label?, round?}; or a formFactor (phone, foldable, tablet, wear, tv, widget, adaptive) for its default set; with neither you get the design's own form factor — phone, foldable and tablet for a mobile catalog, the round watches for Wear, and for a Wear widget (a widget-container-* root) its own container in each widget host: Samsung round, Pixel Watch squircle and rectangular, at the container's frame. Widget host cells are drawn natively in that host when the caller holds ui-builder-export and the host has a native lane (renderer: "native"); otherwise by the editor's export, masked to the host's outline. Add themes: ["light","dark"] and fontScales: [1, 2] to cross them; at most 16 cells. The sheet is a short-lived signed https link kept under 3.5 MB, so a chat surface can show it inline; inline: true puts the bytes in the reply as well.
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": {
"designId": "<designId>"
},
"name": "ui_builder_render_design_matrix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | No | A grant token from poll_access, when you cannot set the X-Compose-Preview-Token header yourself — an MCP client fixes its headers at connect time, so this is how a token approved during this session is used in it. Prefer the header where you control it. | |
| inline | No | Also return the PNG as an image block. Defaults to false; a host with no public origin always does. | |
| themes | No | Defaults to the design's own theme. | |
| devices | No | Devices to draw. Omit for the form factor's defaults. | |
| designId | Yes | ||
| revision | No | A past revision. Omit for the current one. | |
| agentName | No | Optional agent/client name shown to design viewers; self-reported. | |
| agentModel | No | Optional current model name shown to design viewers; self-reported. Omit when unknown. | |
| fontScales | No | Defaults to the design's own font scale. | |
| formFactor | No | A default device set, instead of `devices`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| cells | Yes | ||
| image | Yes | ||
| schema | Yes | ||
| columns | Yes | ||
| summary | Yes | ||
| designId | Yes | ||
| revision | Yes | ||
| imageBase64 | No |