Servidor MCP

Compose Preview Catalogs

io.github.yschimke/compose-preview

Qué hace este MCP

Browses, renders, compares, audits, and edits Jetpack Compose preview catalogs and associated UI designs.

catalog_diff_semantics
Compare two previews' semantics by testTag: which tags are only in one side, which moved, and which changed occupancy count. Identity is the authored testTag, not a positional ref, so a tag that stops resolving is reported rather than silently retargeted at different pixels. Requires live grant scope.
Esquema de entrada
{'type': 'object', 'anyOf': [{'required': ['uri']}, {'required': ['catalog', 'previewId']}], 'required': ['other'], 'properties': {'uri': {'type': 'string'}, 'other': {'type': 'object', 'properties': {'uri': {'type': 'string'}, 'catalog': {'type': 'string'}, 'previewId': {'type': 'string'}}}, 'token': {'type': 'string', 'description': '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.'}, 'catalog': {'type': 'string'}, 'overrides': {'type': 'object', 'additionalProperties': {'type': ['string', 'number', 'boolean']}}, 'previewId': {'type': 'string'}, 'otherOverrides': {'type': 'object', 'additionalProperties': {'type': ['string', 'number', 'boolean']}}}}
Esquema de salida
{'type': 'object'}
catalog_get_preview_data
Fetch the merged accessibility or annotation product for a preview. This lane requires live grant scope.
Esquema de entrada
{'type': 'object', 'anyOf': [{'required': ['uri']}, {'required': ['catalog', 'previewId']}], 'required': ['kind'], 'properties': {'uri': {'type': 'string'}, 'kind': {'type': 'string'}, 'token': {'type': 'string', 'description': '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.'}, 'catalog': {'type': 'string'}, 'overrides': {'type': 'object', 'additionalProperties': {'type': ['string', 'number', 'boolean']}}, 'previewId': {'type': 'string'}}}
Esquema de salida
{'type': 'object'}
catalog_history_diff
Compare two of a preview's recorded renders. Defaults to the two newest — did the last publish move this preview? A metadata comparison: the timeline's versions are already collapsed distinct renders, so whether the bytes changed is answered without fetching either image. Reports `unstable` so a difference on a nondeterministic preview is not mistaken for a real change.
Esquema de entrada
{'type': 'object', 'anyOf': [{'required': ['uri']}, {'required': ['catalog', 'previewId']}], 'properties': {'to': {'type': 'string'}, 'uri': {'type': 'string'}, 'from': {'type': 'string'}, 'token': {'type': 'string', 'description': '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.'}, 'catalog': {'type': 'string'}, 'previewId': {'type': 'string'}}}
Esquema de salida
{'type': 'object'}
catalog_history_list
The render timeline for one preview: which versions of its rendered bytes exist, when each appeared, and whether the preview is unstable (re-renders differently on every publish) rather than genuinely changing. Where this server holds the timeline it is returned inline; where the catalog is published from a delivery branch the manifest lives on that branch and this reports where to fetch it.
Esquema de entrada
{'type': 'object', 'anyOf': [{'required': ['uri']}, {'required': ['catalog', 'previewId']}], 'properties': {'uri': {'type': 'string'}, 'token': {'type': 'string', 'description': '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.'}, 'catalog': {'type': 'string'}, 'previewId': {'type': 'string'}}}
Esquema de salida
{'type': 'object'}
catalog_history_read
Fetch one historical render's pixels through this server, by `commit` or `blob` (a prefix is enough). Use when an agent cannot reach the delivery branch itself, or wants the bytes rather than the timeline.
Esquema de entrada
{'type': 'object', 'anyOf': [{'required': ['uri']}, {'required': ['catalog', 'previewId']}], 'properties': {'uri': {'type': 'string'}, 'blob': {'type': 'string'}, 'token': {'type': 'string', 'description': '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.'}, 'commit': {'type': 'string'}, 'catalog': {'type': 'string'}, 'previewId': {'type': 'string'}}}
Esquema de salida
{'type': 'object'}
catalog_library
Preview Catalogs
Open the hosted preview catalog browser app. With no arguments it lists every catalog with its preview count only; pass projectId to list one catalog's previews. To find previews without the app, call catalog_list_projects, then catalog_list_previews with a catalog id. Also opens from the ChatGPT/Codex sidebar.
Esquema de entrada
{'type': 'object', 'properties': {'token': {'type': 'string', 'description': '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.'}, 'projectId': {'type': 'string', 'description': 'A catalog id from catalog_list_projects whose previews to list.'}}}
Esquema de salida
{'type': 'object'}
catalog_list_data_products
List the structured data-product kinds of one catalog, optionally one preview. Name the catalog with 'catalog' (ids from catalog_list_projects) or a preview 'uri'.
Esquema de entrada
{'type': 'object', 'anyOf': [{'required': ['catalog']}, {'required': ['uri']}], 'properties': {'uri': {'type': 'string'}, 'token': {'type': 'string', 'description': '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.'}, 'catalog': {'type': 'string'}, 'previewId': {'type': 'string'}}}
Esquema de salida
{'type': 'object', 'required': ['dataProducts'], 'properties': {'dataProducts': {'type': 'array', 'items': {'type': 'object'}}}, 'additionalProperties': False}
catalog_list_devices
List the `@Preview(device = ...)` ids this server's render lane recognises, with each one's dp size and density. The `device` override takes one of these ids; an unrecognised name renders the default frame rather than failing, so check here instead of guessing.
Esquema de entrada
{'type': 'object', 'properties': {'token': {'type': 'string', 'description': '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.'}}}
Esquema de salida
{'type': 'object'}
catalog_list_previews
List the Compose previews and published metadata of one hosted catalog. 'catalog' is required (ids from catalog_list_projects). Pass 'query' (a component name such as EdgeButton) to narrow by id or label; results are paged (100 by default, 'offset'/'limit' for more). This server holds published library catalogs only: previews of the project you are editing come from the local compose-preview-mcp server, not from here.
Esquema de entrada
{'type': 'object', 'required': ['catalog'], 'properties': {'limit': {'type': 'integer', 'maximum': 500, 'minimum': 1}, 'query': {'type': 'string', 'description': 'Case-insensitive substring of a preview id or label, such as a component name.'}, 'token': {'type': 'string', 'description': '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.'}, 'offset': {'type': 'integer', 'minimum': 0}, 'catalog': {'type': 'string', 'description': 'A catalog id from catalog_list_projects.'}}}
Esquema de salida
{'type': 'object'}
catalog_list_projects
List every remote catalog with its stable id and preview count. Call this first: catalog_list_previews and catalog_list_data_products take one of these ids as 'catalog'.
Esquema de entrada
{'type': 'object', 'properties': {'token': {'type': 'string', 'description': '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.'}}}
Esquema de salida
{'type': 'object'}
catalog_render_matrix
Render one preview across the cross-product of the given override axes in a single call, returning a hash/size observation per cell (observe=png adds the pixels). Prefer this over a catalog_render_preview per combination: the cells share one catalog lease and are reported together, so comparing axes costs one round trip instead of N. Capped at 24 cells. Requires live grant scope.
Esquema de entrada
{'type': 'object', 'anyOf': [{'required': ['uri']}, {'required': ['catalog', 'previewId']}], 'required': ['axes'], 'properties': {'uri': {'type': 'string'}, 'axes': {'type': 'object', 'additionalProperties': {'type': 'array', 'items': {'type': ['string', 'number', 'boolean']}, 'minItems': 1}}, 'token': {'type': 'string', 'description': '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.'}, 'catalog': {'type': 'string'}, 'observe': {'enum': ['png', 'hash'], 'type': 'string'}, 'overrides': {'type': 'object', 'additionalProperties': {'type': ['string', 'number', 'boolean']}}, 'previewId': {'type': 'string'}}}
Esquema de salida
{'type': 'object'}
catalog_render_preview
Render one preview. Like local compose-ai-tools, the default semantics observation is token-frugal; request observe=png for pixels, observe=svg for the compose/figma-svg vector export as SVG source, or observe=scroll-png / observe=scroll-svg for the full-page capture of a scrollable screen rather than the viewport crop. Overrides, other observations and fresh renders require live grant scope; without it, a call with no overrides returns the published snapshot (as resources/read does).
Esquema de entrada
{'type': 'object', 'anyOf': [{'required': ['uri']}, {'required': ['catalog', 'previewId']}], 'properties': {'uri': {'type': 'string'}, 'token': {'type': 'string', 'description': '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.'}, 'catalog': {'type': 'string'}, 'observe': {'enum': ['png', 'svg', 'scroll-png', 'scroll-svg', 'semantics', 'hash'], 'type': 'string'}, 'overrides': {'type': 'object', 'additionalProperties': {'type': ['string', 'number', 'boolean']}}, 'previewId': {'type': 'string'}}}
Esquema de salida
{'type': 'object', 'properties': {'imageUrl': {'type': 'string', 'description': 'Short-lived signed https URL of the rendered PNG, on a host with a public origin.'}}}
get-documentation-for-story
Storybook-MCP-compatible preview metadata lookup.
Esquema de entrada
{'type': 'object', 'anyOf': [{'required': ['storyId']}, {'required': ['id']}], 'properties': {'id': {'type': 'string'}, 'token': {'type': 'string', 'description': '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.'}, 'storyId': {'type': 'string'}}}
Esquema de salida
{'type': 'object'}
list-all-documentation
Storybook-MCP-compatible alias that lists every preview as a story.
Esquema de entrada
{'type': 'object', 'properties': {'token': {'type': 'string', 'description': '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.'}}}
Esquema de salida
{'type': 'object'}
poll_access
Collect the outcome of a request_access, proving possession of its deviceSecret. It HOLDS THE CALL OPEN and answers the moment the human decides — one call instead of a dozen, since each poll here costs a whole round trip through you. It waits 8 seconds by default; pass waitSeconds (up to 30) if your client tolerates a longer call. Pass urlMode=true when the client supports URL elicitation: while the request is pending this returns the standard -32042 URL-elicitation-required error, and retrying the same call after the browser decision returns the outcome. A wait that times out answers status=pending, and you simply call again. Then approved (with the token) or denied/expired. Use the token on every later call: as the X-Compose-Preview-Token header where you control headers, and otherwise as each gated tool's 'token' argument — which is what an MCP client reaching this flow mid-session needs, since its headers were fixed when it connected.
Esquema de entrada
{'type': 'object', 'required': ['requestId', 'deviceSecret'], 'properties': {'urlMode': {'type': 'boolean', 'description': 'Use the protocol-standard URL elicitation UI while this request is pending.'}, 'requestId': {'type': 'string'}, 'waitSeconds': {'type': 'integer', 'maximum': 30, 'minimum': 0}, 'deviceSecret': {'type': 'string'}}}
Esquema de salida
{'type': 'object'}
preview-stories
Storybook-MCP-compatible rendering of one or more story ids. Requires live scope.
Esquema de entrada
{'type': 'object', 'anyOf': [{'required': ['storyIds']}, {'required': ['storyId']}, {'required': ['ids']}, {'required': ['id']}], 'properties': {'id': {'type': 'string'}, 'ids': {'type': 'array', 'items': {'type': 'string'}}, 'token': {'type': 'string', 'description': '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.'}, 'observe': {'enum': ['png', 'svg', 'scroll-png', 'scroll-svg', 'semantics', 'hash'], 'type': 'string'}, 'storyId': {'type': 'string'}, 'storyIds': {'type': 'array', 'items': {'type': 'string'}}, 'overrides': {'type': 'object', 'additionalProperties': {'type': ['string', 'number', 'boolean']}}}}
Esquema de salida
{'type': 'object', 'required': ['observations'], 'properties': {'observations': {'type': 'array', 'items': {'type': 'object'}}}, 'additionalProperties': False}
request_access
Ask a human for access to this server. Returns an approveUrl and a userCode: show BOTH to the person you are working with, ask them to open the link and check that the code on the page matches, then call poll_access. When the client supports URL elicitation, call poll_access with urlMode=true instead of pasting the link into chat; clients without it keep this complete text fallback. The link grants nothing by itself — keep the deviceSecret this returns, it is what collects the token. Use this when a call answered 'authorization_required', or when your token stopped working (a server restart drops every grant).
Esquema de entrada
{'type': 'object', 'properties': {'label': {'type': 'string'}, 'scope': {'enum': ['preview', 'live', 'playground'], 'type': 'string'}, 'ttlSeconds': {'type': 'integer'}, 'capabilities': {'type': 'array', 'items': {'type': 'string'}}}}
Esquema de salida
{'type': 'object'}
status
Report readiness and the aggregate catalog set.
Esquema de entrada
{'type': 'object', 'properties': {'token': {'type': 'string', 'description': '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.'}}}
Esquema de salida
{'type': 'object'}
ui_builder_acknowledge_comment
Say that you have read a comment thread — which is **not** the same as resolving it. Resolving claims the question is settled; acknowledging claims only that you have seen it, which is the honest thing to say while you are still working on what it asked for. Omit `threadId` to acknowledge the whole discussion, which is what you mean after reading it with ui_builder_list_comments. Acknowledgement is per actor, so a thread you have read is still waiting for the other people in the design, and it is what clears the `comments` block the server puts on your ui_builder_apply, ui_builder_get_design, ui_builder_export and ui_builder_put_asset replies.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}, 'threadId': {'type': 'string', 'description': 'One thread. Omit for every thread on the design.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_apply
Apply design mutations — insertNode, setProperty, deleteNode, moveNode and the rest of DesignMutationV1 — as one operation. `baseRevision` is the revision you read; the outcome reports conflicts or rejected edits. This is how an agent adds a scaffold, fills its slots and sets modifiers. Use `setStateVariable` with `name` and `declaration` to add or edit state, `removeStateVariable` with `name` to remove unused state, and `setEventBinding` with `nodeId`, `event` and an ordered `actions` array to edit behavior. An empty actions array removes the event handler. `removeNodeProperty` (or a setProperty whose value is `{"type":"null"}`) unsets the property — the way back after trying one — and is refused, naming the node and the field, when the catalog requires it. When somebody has commented on the design and you have not acknowledged it, the outcome carries a `comments` block naming the threads waiting on you; read it, because it is somebody talking about what you are editing.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'operationId', 'baseRevision', 'operations'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'clientId': {'type': 'string'}, 'designId': {'type': 'string'}, 'operations': {'type': 'array', 'items': {'type': 'object'}, 'description': 'DesignMutationV1 objects. State example: {"type":"setStateVariable","name":"expanded","declaration":{"type":"value","valueType":"bool","initialValue":false,"nullable":false,"persistence":"preview"}}. Event example: {"type":"setEventBinding","nodeId":"button","event":"click","actions":[{"type":"toggle","variable":"expanded"}]}. Declare state before binding it in the batch.'}, 'operationId': {'type': 'string', 'description': 'Your id for this operation; makes a retry idempotent.'}, 'baseRevision': {'type': 'integer', 'description': 'The revision these mutations were written against.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_archive_branch
Close a branch without merging it: it stays readable and listed, and can no longer be edited or merged. Needs write access to the parent, or to have made the branch.
Esquema de entrada
{'type': 'object', 'required': ['branchId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'branchId': {'type': 'string'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'branch', 'summary'], 'properties': {'branch': {'type': 'object', 'required': ['branchId', 'parentDesignId', 'name', 'ownerActorId', 'status', 'forkRevision', 'forkDocumentHash', 'headRevision', 'commandCount', 'createdAtEpochMillis', 'summary'], 'properties': {'name': {'type': 'string'}, 'status': {'type': 'string'}, 'summary': {'type': 'string'}, 'branchId': {'type': 'string'}, 'commandCount': {'type': 'integer'}, 'forkRevision': {'type': 'integer'}, 'headRevision': {'type': 'integer'}, 'ownerActorId': {'type': 'string'}, 'parentDesignId': {'type': 'string'}, 'closedByActorId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'forkDocumentHash': {'type': 'string'}, 'closedAtEpochMillis': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}, 'createdAtEpochMillis': {'type': 'integer'}, 'supersededByBranchId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'mergedAtParentRevision': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-branch/v1'}, 'summary': {'type': 'string'}}, 'additionalProperties': False}
ui_builder_await_comments
Wait for the discussion to move past `afterSequence` and return it, rather than polling for it. Returns as soon as anybody — a designer in the browser or another agent — posts, resolves or deletes; returns a `timedOut` reply if nothing happens within `waitSeconds`, which you answer by calling again with the same cursor. This is how you hold a conversation about a design: post, wait, read, act.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'afterSequence'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}, 'waitSeconds': {'type': 'integer', 'description': 'Up to 120. Defaults to 25.'}, 'afterSequence': {'type': 'integer', 'description': 'The `sequence` you last saw. 0 for anything at all.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_await_decision
Wait for somebody to approve or reject a design, rather than asking again whether they have. Returns as soon as a decision lands after `afterSequence` — by default only a person's (`from: "human"`), on any revision unless you name one — or a `timedOut` reply after `waitSeconds`. Every reply carries `latest` (the newest matching verdict, new or not) and `approved`, so `waitSeconds: 0` is a cheap, idempotent poll for a routine that can only check back later; quote the reply's `sequence` as the next `afterSequence`. People record theirs over the design's `decisions` HTTP route.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'from': {'enum': ['human', 'anyone'], 'type': 'string', 'description': 'Whose decisions count. Defaults to human.'}, 'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer', 'description': 'Only decisions on this revision.'}, 'waitSeconds': {'type': 'integer', 'description': 'Up to 120. Defaults to 25; 0 checks without blocking.'}, 'afterSequence': {'type': 'integer', 'description': 'The `sequence` you last saw. 0 for anything at all.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'summary', 'designId', 'timedOut', 'sequence', 'approved'], 'properties': {'latest': {'anyOf': [{'type': 'object', 'required': ['decisionId', 'sequence', 'revision', 'verdict', 'decidedBy', 'deciderKind', 'decidedAtEpochMillis'], 'properties': {'note': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'verdict': {'type': 'string'}, 'revision': {'type': 'integer'}, 'sequence': {'type': 'integer'}, 'decidedBy': {'type': 'string'}, 'decisionId': {'type': 'string'}, 'deciderKind': {'type': 'string'}, 'displayName': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'decidedAtEpochMillis': {'type': 'integer'}}, 'additionalProperties': False}, {'type': 'null'}]}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-decision/v1'}, 'summary': {'type': 'string'}, 'approved': {'type': 'boolean'}, 'designId': {'type': 'string'}, 'sequence': {'type': 'integer'}, 'timedOut': {'type': 'boolean'}, 'decisions': {'type': 'array', 'items': {'type': 'object', 'required': ['decisionId', 'sequence', 'revision', 'verdict', 'decidedBy', 'deciderKind', 'decidedAtEpochMillis'], 'properties': {'note': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'verdict': {'type': 'string'}, 'revision': {'type': 'integer'}, 'sequence': {'type': 'integer'}, 'decidedBy': {'type': 'string'}, 'decisionId': {'type': 'string'}, 'deciderKind': {'type': 'string'}, 'displayName': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'decidedAtEpochMillis': {'type': 'integer'}}, 'additionalProperties': False}}}, 'additionalProperties': False}
ui_builder_await_design
Wait for somebody else to change a design and return what they changed, rather than asking again whether they have. Returns the moment a designer in the browser or another agent commits an edit, as the same update frame the browser's own live socket receives; returns a `timedOut` reply if nothing happens within `waitSeconds`, which you answer by calling again with the same cursor. Quote as `afterSequence` the `throughSequence` of the delta you last received, or the `lastSequence` of the last snapshot; a cursor the server no longer retains is answered with a whole snapshot instead of the operations you missed. `waitSeconds: 0` checks without blocking. Nothing is lost between calls — the cursor is replayed when you call again — so somebody merely looking at the design does not wake you, and only a committed change does.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'afterSequence'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}, 'waitSeconds': {'type': 'integer', 'description': 'Up to 120. Defaults to 25.'}, 'afterSequence': {'type': 'integer', 'description': 'The `lastSequence` you last saw, from ui_builder_get_design or a previous wait.'}, 'includeCatalog': {'type': 'boolean', 'description': 'When the reply is a whole snapshot, embed the pinned catalog in it. Defaults to false.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_branch_design
Fork a design at a revision into a **branch** to explore an alternative, or to change it without trampling somebody editing it live. A branch is a design with its own id: edit it with ui_builder_apply, look at it with ui_builder_view or ui_builder_get_design, compare it with ui_builder_diff_designs, then bring it back with ui_builder_merge_branch or drop it with ui_builder_archive_branch. Branch N times from the same revision to try N alternatives: merging one archives the others. Branches of a branch are refused; so are asset uploads, restores and document replacements on a branch. Needs write access to the design.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'name'], 'properties': {'name': {'type': 'string', 'description': 'What this alternative is, e.g. `compact header`.'}, 'token': {'type': 'string', 'description': '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.'}, 'branchId': {'type': 'string', 'description': "The branch's design id. Defaults to one minted from the parent's; naming one makes a retry idempotent."}, 'designId': {'type': 'string', 'description': 'The design to branch.'}, 'revision': {'type': 'integer', 'description': 'A retained revision to fork at. Omit for the current one.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'branch', 'summary'], 'properties': {'branch': {'type': 'object', 'required': ['branchId', 'parentDesignId', 'name', 'ownerActorId', 'status', 'forkRevision', 'forkDocumentHash', 'headRevision', 'commandCount', 'createdAtEpochMillis', 'summary'], 'properties': {'name': {'type': 'string'}, 'status': {'type': 'string'}, 'summary': {'type': 'string'}, 'branchId': {'type': 'string'}, 'commandCount': {'type': 'integer'}, 'forkRevision': {'type': 'integer'}, 'headRevision': {'type': 'integer'}, 'ownerActorId': {'type': 'string'}, 'parentDesignId': {'type': 'string'}, 'closedByActorId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'forkDocumentHash': {'type': 'string'}, 'closedAtEpochMillis': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}, 'createdAtEpochMillis': {'type': 'integer'}, 'supersededByBranchId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'mergedAtParentRevision': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-branch/v1'}, 'summary': {'type': 'string'}}, 'additionalProperties': False}
ui_builder_check_design
Check a design before you show it to anybody — one call instead of validate, view and an accessibility pass. Runs `schema` (document shape), `catalog` (the pinned catalog's validation, the mutation reducer and the Compose export gate — what ui_builder_validate runs) and `a11y`: controls with no label, icons and pictures with no `contentDescription`, touch targets under 48dp, text and icon contrast under WCAG 4.5:1 / 3:1, and text in a fixed height that clips at 200% font scale. Check a stored design (`designId`, optionally a past `revision`), a whole `document`, or `operations` applied to a scratch copy of `designId` exactly as ui_builder_apply would — nothing is saved. Returns `summary` first, then `ok`, the counts, and `findings` with the `nodeId` each is about, so you can fix them with ui_builder_apply and check again. `rendered: true` measures touch targets on a native render where the host has one (needs the ui-builder-export capability). Contrast against theme roles is resolved with the Material 3 baseline scheme and reported as a warning, never an error.
Esquema de entrada
{'type': 'object', 'properties': {'token': {'type': 'string', 'description': '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.'}, 'checks': {'type': 'array', 'items': {'enum': ['schema', 'catalog', 'a11y'], 'type': 'string'}, 'description': 'Which checks to run. Defaults to all three.'}, 'designId': {'type': 'string', 'description': 'A stored design to check, or to check `operations` against.'}, 'document': {'type': 'object', 'description': 'A whole DesignDocumentV1 to check instead of a stored design.'}, 'rendered': {'type': 'boolean', 'description': 'Measure touch targets on a native render. Defaults to false.'}, 'revision': {'type': 'integer', 'description': 'A past revision of `designId`. Omit for the current one.'}, 'operations': {'type': 'array', 'items': {'type': 'object'}, 'description': 'DesignMutationV1 objects to apply to a scratch copy of `designId` and check — a dry run.'}, 'baseRevision': {'type': 'integer', 'description': 'The revision `operations` were written against; a stale one is a warning.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'ok', 'summary', 'checks', 'errors', 'warnings', 'findings'], 'properties': {'ok': {'type': 'boolean'}, 'checks': {'type': 'array', 'items': {'type': 'string'}}, 'dryRun': {'type': 'boolean'}, 'errors': {'type': 'integer'}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-design-check/v1'}, 'skipped': {'type': 'array', 'items': {'type': 'object', 'required': ['check', 'reason'], 'properties': {'check': {'type': 'string'}, 'reason': {'type': 'string'}}, 'additionalProperties': False}}, 'summary': {'type': 'string'}, 'designId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'findings': {'type': 'array', 'items': {'type': 'object', 'required': ['severity', 'check', 'code', 'message'], 'properties': {'code': {'type': 'string'}, 'check': {'type': 'string'}, 'field': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'nodeId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'message': {'type': 'string'}, 'measured': {'anyOf': [{'type': 'object', 'properties': {'unit': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'ratio': {'anyOf': [{'type': 'number'}, {'type': 'null'}]}, 'width': {'anyOf': [{'type': 'number'}, {'type': 'null'}]}, 'height': {'anyOf': [{'type': 'number'}, {'type': 'null'}]}, 'required': {'anyOf': [{'type': 'number'}, {'type': 'null'}]}}, 'additionalProperties': False}, {'type': 'null'}]}, 'severity': {'type': 'string'}, 'operationIndex': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'revision': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}, 'warnings': {'type': 'integer'}, 'truncated': {'type': 'integer'}}, 'additionalProperties': False}
ui_builder_compare_reference
Measure a design against its reference overlay (attach one with ui_builder_set_reference). Returns what the picture is against the frame and whether a pixel comparison means anything (`facts.pixelComparable` — a 328×56 dp crop stretched over a screen is not comparable until measured at its `actual` size); with `differences`, the share of pixels that differ and up to eight regions in dp, each with the layer it falls in; and for each of `nodeIds`, where that layer sits in the reference — from a box drawn over it in the editor, or a search of the reference's pixels, which for text also reads the font size — with the `alignment` that would make it agree (move, size, font size) and the exact `operations` to pass to ui_builder_apply. Nothing is written: apply the operations you agree with, then compare again and look with ui_builder_view. Layer matching needs node boxes, so `nodeIds` measures the native render (an export grant); differences alone use the PNG export. Treat `confident: false` as a hint to check, not an edit to make.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'fit': {'enum': ['contain', 'width', 'actual'], 'type': 'string', 'description': 'How the picture is placed: contained and centred, across the width from the top, or at its own size from the top-left. Defaults to the fit the picture calls for (facts.recommendedFit).'}, 'token': {'type': 'string', 'description': '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.'}, 'nodeIds': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Layers to match against the reference, each with a proposed alignment.'}, 'designId': {'type': 'string'}, 'renderer': {'enum': ['export', 'native'], 'type': 'string', 'description': 'Which render to measure. Defaults to native when nodeIds is given, export otherwise.'}, 'revision': {'type': 'integer', 'description': 'Measure this revision. Defaults to the current one.'}, 'differences': {'type': 'boolean', 'description': 'Measure where the frame differs. Defaults to true.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'designId', 'revision', 'renderer', 'reference', 'facts'], 'properties': {'facts': {'type': 'object', 'required': ['widthPx', 'heightPx', 'density', 'densitySource', 'widthDp', 'heightDp', 'frameWidthDp', 'frameHeightDp', 'designDensity', 'kind', 'fit', 'pixelComparable', 'advice'], 'properties': {'fit': {'type': 'string'}, 'kind': {'type': 'string'}, 'advice': {'type': 'string'}, 'density': {'type': 'number'}, 'widthDp': {'type': 'integer'}, 'widthPx': {'type': 'integer'}, 'heightDp': {'type': 'integer'}, 'heightPx': {'type': 'integer'}, 'frameWidthDp': {'type': 'integer'}, 'densityBucket': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'densitySource': {'type': 'string'}, 'designDensity': {'type': 'number'}, 'frameHeightDp': {'type': 'integer'}, 'recommendedFit': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'pixelComparable': {'type': 'boolean'}}, 'additionalProperties': False}, 'notes': {'type': 'array', 'items': {'type': 'string'}}, 'layers': {'type': 'array', 'items': {'type': 'object', 'required': ['nodeId'], 'properties': {'nodeId': {'type': 'string'}, 'source': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'target': {'anyOf': [{'type': 'object', 'required': ['xDp', 'yDp', 'widthDp', 'heightDp'], 'properties': {'xDp': {'type': 'number'}, 'yDp': {'type': 'number'}, 'widthDp': {'type': 'number'}, 'heightDp': {'type': 'number'}}, 'additionalProperties': False}, {'type': 'null'}]}, 'current': {'anyOf': [{'type': 'object', 'required': ['xDp', 'yDp', 'widthDp', 'heightDp'], 'properties': {'xDp': {'type': 'number'}, 'yDp': {'type': 'number'}, 'widthDp': {'type': 'number'}, 'heightDp': {'type': 'number'}}, 'additionalProperties': False}, {'type': 'null'}]}, 'message': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'alignment': {'anyOf': [{'type': 'object', 'required': ['summary'], 'properties': {'moveXDp': {'type': 'integer'}, 'moveYDp': {'type': 'integer'}, 'summary': {'type': 'string'}, 'widthDp': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}, 'heightDp': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}, 'fontSizeSp': {'anyOf': [{'type': 'number'}, {'type': 'null'}]}}, 'additionalProperties': False}, {'type': 'null'}]}, 'confident': {'anyOf': [{'type': 'boolean'}, {'type': 'null'}]}, 'textScale': {'anyOf': [{'type': 'number'}, {'type': 'null'}]}, 'operations': {'type': 'array', 'items': {'type': 'object'}}, 'alreadyAligned': {'type': 'boolean'}, 'fontSizeSource': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'schema': {'type': 'string', 'const': 'compose-ui-builder-reference-comparison/v1'}, 'designId': {'type': 'string'}, 'renderer': {'type': 'string'}, 'revision': {'type': 'integer'}, 'reference': {'type': 'object', 'required': ['name', 'mediaType', 'widthPx', 'heightPx'], 'properties': {'name': {'type': 'string'}, 'widthPx': {'type': 'integer'}, 'heightPx': {'type': 'integer'}, 'mediaType': {'type': 'string'}, 'sourceUrl': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'additionalProperties': False}, 'differences': {'anyOf': [{'type': 'object', 'required': ['mismatch', 'coverage', 'regions'], 'properties': {'regions': {'type': 'array', 'items': {'type': 'object', 'required': ['xDp', 'yDp', 'widthDp', 'heightDp', 'mismatch'], 'properties': {'xDp': {'type': 'integer'}, 'yDp': {'type': 'integer'}, 'nodeId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'widthDp': {'type': 'integer'}, 'heightDp': {'type': 'integer'}, 'mismatch': {'type': 'number'}}, 'additionalProperties': False}}, 'coverage': {'type': 'number'}, 'mismatch': {'type': 'number'}}, 'additionalProperties': False}, {'type': 'null'}]}, 'differencesMessage': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'additionalProperties': False}
ui_builder_create_design
Create a design, either from a whole `document` you supply or by copying an existing design named by `fromDesignId`. Copying is usually right: a document's `catalogPin` must match a catalog revision this server serves, and a copy carries one that does. A `document` whose `home` is an existing design on this server is refused with a `compose-preview-decision/v1` choice to put to the person — or, when your client supports form elicitation on this connection, the person is asked in a form and the call acts on their answer.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'title': {'type': 'string'}, 'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string', 'description': 'The id for the new design.'}, 'document': {'type': 'object', 'description': 'A whole DesignDocumentV1.'}, 'fromDesignId': {'type': 'string', 'description': "Copy this design's document instead."}, 'includeCatalog': {'type': 'boolean', 'description': 'Embed the pinned catalog in the returned snapshot. Defaults to false.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_delete_design
Delete a design you own, with its history, access list, overlay and discussion. Only the owner may — not an editor, not a viewer, and not anybody merely holding a write grant on this server — so a session can clean up the designs it made and cannot reach anybody else's; an agent acting under an approved grant owns what it created as the person who approved it. There is no undo. Not the released envelope: the contract has no delete, so the reply names the design that is gone.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_design_access
Read who can open a design: its owner, and every actor it has been shared with, each with the role and the actions that grant carries. Only the owner may ask — this is the answer to "who else is in here" and to "what is the id I must name when sharing".
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_diff_designs
Compare two designs, or two retained revisions of one: nodes added, removed and moved, and properties, modifiers and other fields changed, each with its node id and path (`root/slot[index]/node`), plus changed document fields (title, environment, state). Works across a design and its fork. `b` defaults to the current revision of `a`'s design. Values are the protocol's own JSON, ready to send back through ui_builder_apply. Read access to both.
Esquema de entrada
{'type': 'object', 'required': ['a'], 'properties': {'a': {'type': 'object', 'required': ['designId'], 'properties': {'designId': {'type': 'string'}, 'revision': {'type': 'integer', 'description': 'A retained revision. Omit for the current one.'}}, 'additionalProperties': False}, 'b': {'type': 'object', 'required': ['designId'], 'properties': {'designId': {'type': 'string'}, 'revision': {'type': 'integer', 'description': 'A retained revision. Omit for the current one.'}}, 'additionalProperties': False}, 'token': {'type': 'string', 'description': '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.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'a', 'b', 'identical', 'summary', 'counts'], 'properties': {'a': {'type': 'object', 'required': ['designId', 'revision', 'title', 'documentDigest'], 'properties': {'title': {'type': 'string'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer'}, 'documentDigest': {'type': 'string'}}, 'additionalProperties': False}, 'b': {'type': 'object', 'required': ['designId', 'revision', 'title', 'documentDigest'], 'properties': {'title': {'type': 'string'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer'}, 'documentDigest': {'type': 'string'}}, 'additionalProperties': False}, 'nodes': {'type': 'array', 'items': {'type': 'object', 'required': ['nodeId', 'change', 'componentId', 'path'], 'properties': {'to': {'anyOf': [{'type': 'object', 'required': ['index'], 'properties': {'slot': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'index': {'type': 'integer'}, 'parentId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'additionalProperties': False}, {'type': 'null'}]}, 'from': {'anyOf': [{'type': 'object', 'required': ['index'], 'properties': {'slot': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'index': {'type': 'integer'}, 'parentId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'additionalProperties': False}, {'type': 'null'}]}, 'path': {'type': 'string'}, 'change': {'type': 'string'}, 'fields': {'type': 'array', 'items': {'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'after': {'anyOf': [{}, {'type': 'null'}]}, 'before': {'anyOf': [{}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'nodeId': {'type': 'string'}, 'modifiers': {'anyOf': [{'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'after': {'anyOf': [{}, {'type': 'null'}]}, 'before': {'anyOf': [{}, {'type': 'null'}]}}, 'additionalProperties': False}, {'type': 'null'}]}, 'beforePath': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'properties': {'type': 'array', 'items': {'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'after': {'anyOf': [{}, {'type': 'null'}]}, 'before': {'anyOf': [{}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'componentId': {'type': 'string'}}, 'additionalProperties': False}}, 'counts': {'type': 'object', 'required': ['added', 'removed', 'moved', 'changed', 'document'], 'properties': {'added': {'type': 'integer'}, 'moved': {'type': 'integer'}, 'changed': {'type': 'integer'}, 'removed': {'type': 'integer'}, 'document': {'type': 'integer'}}, 'additionalProperties': False}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-design-diff/v1'}, 'summary': {'type': 'string'}, 'document': {'type': 'array', 'items': {'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'after': {'anyOf': [{}, {'type': 'null'}]}, 'before': {'anyOf': [{}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'identical': {'type': 'boolean'}, 'truncated': {'type': 'boolean'}}, 'additionalProperties': False}
ui_builder_export
Export a design. `compose` returns the Kotlin the generator writes, or — when the design holds something it cannot express — diagnostics naming each reason. This is the same gate the browser's code pane shows, so an agent and a designer get the same answer about the same design.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'format': {'type': 'string', 'description': 'Defaults to compose. Available formats: compose, svg, png, bundle. Check the catalog exportCapabilities.'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_find_design_for_pr
From a pull request back to the design(s) it implements: every design you can read whose implementation record or links name `pr`, with the implementation status and revision. Then call ui_builder_implementation_status for what the design expects.
Esquema de entrada
{'type': 'object', 'required': ['pr'], 'properties': {'pr': {'type': 'string', 'description': 'The pull request URL, exactly as recorded.'}, 'token': {'type': 'string', 'description': '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.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'summary', 'pr', 'designs'], 'properties': {'pr': {'type': 'string'}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-pr-designs/v1'}, 'designs': {'type': 'array', 'items': {'type': 'object', 'required': ['designId'], 'properties': {'status': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'designId': {'type': 'string'}, 'revision': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'summary': {'type': 'string'}}, 'additionalProperties': False}
ui_builder_fork_design
Make a new design from one revision of another — yours to edit, owned by you, with its parent recorded: the fork's `forkedFrom` (design, revision, document digest) and the parent's `forks` both show in ui_builder_get_links. A fork is not a branch: it never inherits the parent's canonical home and nothing flows back on its own, so tell the person it exists and bring a chosen change back with ui_builder_apply on the parent. Needs write access on this server and read access to the parent.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'title': {'type': 'string', 'description': "The fork's title. Defaults to the parent's, marked with the revision."}, 'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string', 'description': 'The design to fork.'}, 'revision': {'type': 'integer', 'description': 'A retained revision. Omit for the current one.'}, 'newDesignId': {'type': 'string', 'description': "The fork's id. Defaults to one derived from the parent; an id already taken is refused."}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'designId', 'title', 'revision', 'forkedFrom', 'ancestryRecorded', 'summary'], 'properties': {'home': {'anyOf': [{'oneOf': [{'type': 'object', 'required': ['kind', 'path'], 'properties': {'kind': {'const': 'repo'}, 'path': {'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'url', 'designId'], 'properties': {'url': {'type': 'string'}, 'kind': {'const': 'server'}, 'designId': {'type': 'string'}}, 'additionalProperties': False}]}, {'type': 'null'}]}, 'title': {'type': 'string'}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-forked/v1'}, 'summary': {'type': 'string'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer'}, 'forkedFrom': {'type': 'object', 'required': ['designId', 'revision', 'documentDigest'], 'properties': {'designId': {'type': 'string'}, 'revision': {'type': 'integer'}, 'documentDigest': {'type': 'string'}}, 'additionalProperties': False}, 'ancestryRecorded': {'type': 'boolean'}}, 'additionalProperties': False}
ui_builder_get_design
Read one design: its whole document — nodes, slots, properties, modifiers, state variables and catalog pin — plus the revision to quote as `baseRevision` when editing it. The catalog the design pins is left out unless `includeCatalog` is true: it is the same for every design on the pin, ui_builder_list_catalogs serves it, and it is most of the bytes. On hosts with design discussions, `unacknowledgedComments` is the number of comment threads this actor has not acknowledged; a nonzero count also carries the bounded `comments` notice.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer', 'description': 'A past revision. Omit for the current one.'}, 'includeCatalog': {'type': 'boolean', 'description': "Embed the pinned catalog's whole CatalogCapabilityV1 in the snapshot, as the released shape does. Defaults to false."}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_get_links
Read what a design is **for**: the `issue` it was drawn for, the `reference` frame in the design tool it reproduces, the `pr` that implemented it, the `thread` it is being discussed in, and the `previous` design it continues. Start a session on somebody else's design here — it is the brief, and it is what ui_builder_get_design cannot tell you. Every field is optional; a reply with none of them means nobody has said yet. The record is kept beside the design and is never part of it: no node holds it, no export sees it, and writing one does not move the revision. Ancestry rides along where there is some: `forkedFrom` / `forks` for a fork made with ui_builder_fork_design, and `branchOf` / `branches` for a design branch and its parent.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_implementation_status
Everything the code side needs to implement a design, in one call: the revision, its links (issue, reference, PR, thread), the implementation PR with its status and whether its previews were found to match, the latest verdict on this revision, and the Compose export with the generator's diagnostics. `summary` says in one line whether the PR implements this revision and whether it was approved. `includeExport: false` leaves the Kotlin out and needs only read access; with it the call needs the ui-builder-export capability.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer', 'description': 'A past revision. Omit for the current one.'}, 'includeExport': {'type': 'boolean', 'description': 'Include the Compose export. Defaults to true.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'summary', 'designId', 'revision', 'implementsRevision'], 'properties': {'links': {'anyOf': [{'type': 'object', 'properties': {'pr': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'issue': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'thread': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'designId': {'type': 'string'}, 'previous': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'reference': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'schemaVersion': {'type': 'integer'}, 'updatedAtEpochMillis': {'type': 'integer'}}, 'additionalProperties': False}, {'type': 'null'}]}, 'export': {'anyOf': [{'type': 'object', 'required': ['format', 'ok'], 'properties': {'ok': {'type': 'boolean'}, 'format': {'type': 'string'}, 'source': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'diagnostics': {'type': 'array', 'items': {'type': 'string'}}}, 'additionalProperties': False}, {'type': 'null'}]}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-implementation/v1'}, 'summary': {'type': 'string'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer'}, 'implementation': {'anyOf': [{'type': 'object', 'required': ['pr', 'status', 'updatedBy'], 'properties': {'pr': {'type': 'string'}, 'status': {'type': 'string'}, 'revision': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}, 'updatedBy': {'type': 'string'}, 'previewMatch': {'anyOf': [{'type': 'object', 'required': ['status'], 'properties': {'note': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'status': {'type': 'string'}, 'evidence': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'additionalProperties': False}, {'type': 'null'}]}, 'updatedAtEpochMillis': {'type': 'integer'}}, 'additionalProperties': False}, {'type': 'null'}]}, 'latestDecision': {'anyOf': [{'type': 'object', 'required': ['decisionId', 'sequence', 'revision', 'verdict', 'decidedBy', 'deciderKind', 'decidedAtEpochMillis'], 'properties': {'note': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'verdict': {'type': 'string'}, 'revision': {'type': 'integer'}, 'sequence': {'type': 'integer'}, 'decidedBy': {'type': 'string'}, 'decisionId': {'type': 'string'}, 'deciderKind': {'type': 'string'}, 'displayName': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'decidedAtEpochMillis': {'type': 'integer'}}, 'additionalProperties': False}, {'type': 'null'}]}, 'implementsRevision': {'type': 'boolean'}}, 'additionalProperties': False}
ui_builder_list_branches
A design's branches, newest first: each one's id, name, owner, status (open, merged, archived), fork revision, head revision and the number of commands a merge would replay; for a merged one the parent revision it landed at, for an archived sibling the branch whose merge superseded it. Read access to the design.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'status': {'enum': ['open', 'merged', 'archived', 'all'], 'type': 'string', 'description': 'Only branches in this state. Defaults to all.'}, 'designId': {'type': 'string', 'description': 'The parent design.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'designId', 'status', 'branches', 'summary'], 'properties': {'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-branches/v1'}, 'status': {'type': 'string'}, 'summary': {'type': 'string'}, 'branches': {'type': 'array', 'items': {'type': 'object', 'required': ['branchId', 'parentDesignId', 'name', 'ownerActorId', 'status', 'forkRevision', 'forkDocumentHash', 'headRevision', 'commandCount', 'createdAtEpochMillis', 'summary'], 'properties': {'name': {'type': 'string'}, 'status': {'type': 'string'}, 'summary': {'type': 'string'}, 'branchId': {'type': 'string'}, 'commandCount': {'type': 'integer'}, 'forkRevision': {'type': 'integer'}, 'headRevision': {'type': 'integer'}, 'ownerActorId': {'type': 'string'}, 'parentDesignId': {'type': 'string'}, 'closedByActorId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'forkDocumentHash': {'type': 'string'}, 'closedAtEpochMillis': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}, 'createdAtEpochMillis': {'type': 'integer'}, 'supersededByBranchId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'mergedAtParentRevision': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'designId': {'type': 'string'}}, 'additionalProperties': False}
ui_builder_list_catalogs
List the component catalogs a UI-builder design can pin to. Start here: a design's `catalogPin` must name a revision this server actually serves, and each catalog's `catalogPin` here is exactly that. By default a summary of what authoring needs, a few KB rather than the whole capability: per component its id, role, traits, `slots` as `name[min..max]:accepted|roles` and `properties` as `name:type`, with `!` when required and `=a|b` listing the allowed values; per catalog its export formats and the modifier vocabulary. `full: true` returns the released CatalogsResponseV1 envelope with adapter status, parity and export notes per component; `componentIds` narrows either to the components you are about to use.
Esquema de entrada
{'type': 'object', 'properties': {'full': {'type': 'boolean', 'description': 'The whole CatalogCapabilityV1 per catalog, as the released envelope. Defaults to false.'}, 'token': {'type': 'string', 'description': '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.'}, 'componentIds': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Only these components. Omit for all of them.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_list_comments
Read the discussion on a design: every thread, where each is pinned — a markup stroke, a design node, or a point on the frame — whether it is resolved, and every reply under it. `sequence` rises on each change and is the cursor to quote to ui_builder_await_comments. Comments are kept beside the design and are never part of it: no node holds them and no export sees them. Each thread carries `acknowledgedBy`, so you can see what you have already caught up with; say you have read the rest with ui_builder_acknowledge_comment.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_list_designs
List the UI-builder designs on this server, newest first, with the cursor to continue.
Esquema de entrada
{'type': 'object', 'properties': {'limit': {'type': 'integer', 'description': 'Designs per page. Defaults to 50.'}, 'token': {'type': 'string', 'description': '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.'}, 'cursor': {'type': 'string', 'description': 'Continue a previous page.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_list_revisions
A design's retained revisions, newest first: each one's number, who made it, when, the operation that produced it (`setProperty ×2, insertNode`, `undo`, `restored r3`) and its document digest. `retention` says how far back the history still reaches — older revisions are gone, and get, diff, restore and fork stop at that floor. Page with `before`. Read access.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'limit': {'type': 'integer', 'maximum': 128, 'minimum': 1, 'description': 'Revisions per page. Defaults to 20.'}, 'token': {'type': 'string', 'description': '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.'}, 'before': {'type': 'integer', 'description': "Only revisions older than this one; pass the previous reply's `nextBefore`."}, 'designId': {'type': 'string'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'designId', 'currentRevision', 'revisions', 'retention', 'summary'], 'properties': {'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-revisions/v1'}, 'summary': {'type': 'string'}, 'designId': {'type': 'string'}, 'retention': {'type': 'object', 'required': ['retainedRevisions', 'maximumRevisions', 'minimumRevisions', 'maximumRevisionBytes', 'retainedOperations', 'note'], 'properties': {'note': {'type': 'string'}, 'maximumRevisions': {'type': 'integer'}, 'minimumRevisions': {'type': 'integer'}, 'retainedRevisions': {'type': 'integer'}, 'retainedOperations': {'type': 'integer'}, 'maximumRevisionBytes': {'type': 'integer'}, 'oldestRetainedRevision': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}, 'revisions': {'type': 'array', 'items': {'type': 'object', 'required': ['revision', 'sequence', 'current', 'documentDigest', 'nodes', 'summary'], 'properties': {'nodes': {'type': 'integer'}, 'actorId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'current': {'type': 'boolean'}, 'summary': {'type': 'string'}, 'revision': {'type': 'integer'}, 'sequence': {'type': 'integer'}, 'operation': {'anyOf': [{'type': 'object', 'required': ['operationId', 'kind', 'summary'], 'properties': {'kind': {'type': 'string'}, 'summary': {'type': 'string'}, 'clientId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'mutations': {'type': 'array', 'items': {'type': 'string'}}, 'operationId': {'type': 'string'}, 'restoredRevision': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}, {'type': 'null'}]}, 'documentDigest': {'type': 'string'}, 'updatedAtEpochMillis': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'nextBefore': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}, 'currentRevision': {'type': 'integer'}}, 'additionalProperties': False}
ui_builder_merge_branch
Replay a branch's edits onto its parent's current revision through the same reducer every edit goes through — all or nothing. The reply reports every command: `applied` with the revision it landed at and any `STALE_*` notice of what it overwrote, or `refused` with the rejection code that stopped the run (nothing is then written), plus `skippedOperationIds` and how many were never tried. Run `dryRun: true` first. Resolve a refusal by passing that command's id in `skipOperationIds` (skip an undo with what it undoes), or branch again from the parent. On success the branch is merged and its open siblings — branches forked at the same revision — are archived. Needs write access to the parent.
Esquema de entrada
{'type': 'object', 'required': ['branchId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'dryRun': {'type': 'boolean', 'description': 'Replay and report without writing anything. Defaults to false.'}, 'branchId': {'type': 'string'}, 'skipOperationIds': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Logged commands to leave out of the replay.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'branchId', 'parentDesignId', 'dryRun', 'merged', 'forkRevision', 'parentRevisionBefore', 'parentRevisionAfter', 'commands', 'remaining', 'summary'], 'properties': {'dryRun': {'type': 'boolean'}, 'merged': {'type': 'boolean'}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-branch-merge/v1'}, 'summary': {'type': 'string'}, 'branchId': {'type': 'string'}, 'commands': {'type': 'array', 'items': {'type': 'object', 'required': ['operationId', 'actorId', 'status', 'baseRevision'], 'properties': {'code': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'field': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'nodeId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'status': {'type': 'string'}, 'actorId': {'type': 'string'}, 'message': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'conflicts': {'type': 'array', 'items': {'type': 'object', 'required': ['code', 'overwrittenRevision'], 'properties': {'code': {'type': 'string'}, 'field': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'nodeId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'explanation': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'overwrittenRevision': {'type': 'integer'}}, 'additionalProperties': False}}, 'operationId': {'type': 'string'}, 'baseRevision': {'type': 'integer'}, 'committedRevision': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'remaining': {'type': 'integer'}, 'forkRevision': {'type': 'integer'}, 'parentDesignId': {'type': 'string'}, 'archivedSiblingIds': {'type': 'array', 'items': {'type': 'string'}}, 'parentRevisionAfter': {'type': 'integer'}, 'skippedOperationIds': {'type': 'array', 'items': {'type': 'string'}}, 'parentRevisionBefore': {'type': 'integer'}}, 'additionalProperties': False}
ui_builder_move_design_home
Move a design's canonical home between this server and a repository checkout. This changes real authoritative state: quote the exact `baseRevision` and current `sourceHome` from ui_builder_get_design, provide a stable `operationId`, and name the new `targetHome`. The old server record remains as a retained copy pointing at the new home. The reply is an idempotent operation outcome with the new revision; a stale revision or changed source home is refused rather than overwriting a concurrent move. Unless the person already chose this move, call first with `dryRun: true`: it changes nothing and returns the choices to put to them — or, when your client supports form elicitation on this connection, asks them in a form and, if they choose to move, returns this move's outcome.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'operationId', 'baseRevision', 'sourceHome', 'targetHome'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'dryRun': {'type': 'boolean', 'description': "Validate and return the person's choices without changing anything."}, 'designId': {'type': 'string'}, 'sourceHome': {'anyOf': [{'type': 'null'}, {'oneOf': [{'type': 'object', 'required': ['kind', 'url', 'designId'], 'properties': {'url': {'type': 'string', 'minLength': 1}, 'kind': {'const': 'server'}, 'designId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'path'], 'properties': {'kind': {'const': 'repo'}, 'path': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}]}], 'description': 'The exact current DesignHomeV1, or null when the design is unhomed.'}, 'targetHome': {'oneOf': [{'type': 'object', 'required': ['kind', 'url', 'designId'], 'properties': {'url': {'type': 'string', 'minLength': 1}, 'kind': {'const': 'server'}, 'designId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'path'], 'properties': {'kind': {'const': 'repo'}, 'path': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}]}, 'operationId': {'type': 'string', 'description': 'Your stable id; makes a retry idempotent.'}, 'baseRevision': {'type': 'integer', 'description': 'The exact current revision read from the design.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_open
UI Builder
Open the UI Builder's design list: pick a design to see it as the editor draws it. Takes no arguments. Also opens from the ChatGPT/Codex sidebar, and a deep link to /design/<id> opens one design.
Esquema de entrada
{'type': 'object', 'properties': {'token': {'type': 'string', 'description': '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.'}}}
Esquema de salida
{'type': 'object'}
ui_builder_post_comment
Say something on a design — a reply into `threadId`, or a new thread when it is omitted. Pin a new thread with `markId` (a stroke on the reference overlay), `nodeId` (a node in the design), or `x`/`y` in frame fractions, so the person reading it can see what you meant. The comment is attributed to your own grant; you cannot post as somebody else.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'body'], 'properties': {'x': {'type': 'number', 'description': 'Pin to a point on the frame, 0..1 across.'}, 'y': {'type': 'number', 'description': 'Pin to a point on the frame, 0..1 down.'}, 'body': {'type': 'string'}, 'token': {'type': 'string', 'description': '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.'}, 'markId': {'type': 'string', 'description': 'Pin to a markup stroke on the reference.'}, 'nodeId': {'type': 'string', 'description': 'Pin to a design node.'}, 'designId': {'type': 'string'}, 'threadId': {'type': 'string', 'description': 'Reply into this thread. Omit to start one.'}, 'displayName': {'type': 'string', 'description': 'The name to show beside your actor id.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_preview_catalog_recovery
Dry-run recovery of a design whose stored catalog pin no longer resolves. The server selects the exact currently served pin for the same catalog system and returns a CatalogUpgradePreviewV1 with changes, issues and the hashes required by a later `upgradeCatalog` mutation through ui_builder_apply. This call never writes.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_put_asset
Put a picture behind an `assetKey`, so an `asset/image` node naming that key draws it instead of a placeholder. Send the PNG, JPEG, GIF or WebP bytes base64-encoded in `imageBase64`; the server stores them by content digest and pins {mediaType, contentDigest, source: uploaded} into the design's `assets` map under the key. This moves the design's revision, and the reply carries the new one to quote as `baseRevision`. Idempotent by content — the same bytes under the same key change nothing. Put the picture first, then insert the `asset/image` node with ui_builder_apply: the reducer refuses a key that is neither pinned in the design nor in the catalog's own registry. A pinned key whose bytes a lane cannot show renders as a visible placeholder, never as an error.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'assetKey', 'imageBase64'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'assetKey': {'type': 'string', 'description': "1 to 64 characters of letters, digits, '.', '_' or '-'; what the node's assetKey property names."}, 'designId': {'type': 'string'}, 'imageBase64': {'type': 'string', 'description': 'The image bytes, base64. At most 1 MiB decoded.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_react_to_comment
React to one comment with an emoji, or take the reaction back with `on: false`. The lightest thing you can say: 👀 on a comment you have just picked up, 👍 on a fix somebody made, where a reply would be noise in a thread a person has to read. `commentId` is the `id` of a comment inside a thread, from ui_builder_list_comments. Reacting also acknowledges that thread for you, so it counts as the lightest acknowledgement; it says nothing about whether the question is settled.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'commentId', 'reaction'], 'properties': {'on': {'type': 'boolean', 'description': 'False takes your reaction back. Defaults to true.'}, 'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}, 'reaction': {'type': 'string', 'description': 'One emoji, at most 24 characters.'}, 'commentId': {'type': 'string', 'description': "The comment to react to, from its thread's `comments`."}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_record_decision
Record a review verdict — `approve` or `reject` — on one revision of a design, with an optional note. Kept beside the design, like comments: it never moves the revision. Recorded as an agent's decision, so a person waiting with ui_builder_await_decision's default `from: "human"` is not answered by it. Pass your own `decisionId` to make a retry idempotent.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'revision', 'verdict'], 'properties': {'note': {'type': 'string', 'description': 'Why, in a sentence or two.'}, 'token': {'type': 'string', 'description': '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.'}, 'verdict': {'enum': ['approve', 'reject'], 'type': 'string'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer', 'description': 'The revision the verdict is about.'}, 'decisionId': {'type': 'string', 'description': 'Your id for this decision; makes a retry idempotent.'}, 'displayName': {'type': 'string'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'summary', 'designId', 'timedOut', 'sequence', 'approved'], 'properties': {'latest': {'anyOf': [{'type': 'object', 'required': ['decisionId', 'sequence', 'revision', 'verdict', 'decidedBy', 'deciderKind', 'decidedAtEpochMillis'], 'properties': {'note': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'verdict': {'type': 'string'}, 'revision': {'type': 'integer'}, 'sequence': {'type': 'integer'}, 'decidedBy': {'type': 'string'}, 'decisionId': {'type': 'string'}, 'deciderKind': {'type': 'string'}, 'displayName': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'decidedAtEpochMillis': {'type': 'integer'}}, 'additionalProperties': False}, {'type': 'null'}]}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-decision/v1'}, 'summary': {'type': 'string'}, 'approved': {'type': 'boolean'}, 'designId': {'type': 'string'}, 'sequence': {'type': 'integer'}, 'timedOut': {'type': 'boolean'}, 'decisions': {'type': 'array', 'items': {'type': 'object', 'required': ['decisionId', 'sequence', 'revision', 'verdict', 'decidedBy', 'deciderKind', 'decidedAtEpochMillis'], 'properties': {'note': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'verdict': {'type': 'string'}, 'revision': {'type': 'integer'}, 'sequence': {'type': 'integer'}, 'decidedBy': {'type': 'string'}, 'decisionId': {'type': 'string'}, 'deciderKind': {'type': 'string'}, 'displayName': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'decidedAtEpochMillis': {'type': 'integer'}}, 'additionalProperties': False}}}, 'additionalProperties': False}
ui_builder_rename_design
Give a design a new title. The title is the one thing about a design nothing else could change: it is set at creation, shown in every listing and the editor, and not part of any mutation. Anybody who may write the design may rename it. The revision does not move — a title is not design content — so `baseRevision` is not needed and an edit in flight is unaffected. Not the released envelope: the contract has no rename, so the reply is the design's listing entry with its new title.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'title'], 'properties': {'title': {'type': 'string'}, 'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
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) or as {widthDp, heightDp, label?, round?}; or a `formFactor` (phone, foldable, tablet, wear, tv, 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. 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.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'token': {'type': 'string', 'description': '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': {'type': 'boolean', 'description': 'Also return the PNG as an image block. Defaults to false; a host with no public origin always does.'}, 'themes': {'type': 'array', 'items': {'enum': ['light', 'dark'], 'type': 'string'}, 'description': "Defaults to the design's own theme."}, 'devices': {'type': 'array', 'items': {'anyOf': [{'enum': ['phone_small', 'phone', 'phone_landscape', 'foldable_folded', 'foldable_unfolded', 'tablet_portrait', 'tablet_landscape', 'wear_small_round', 'wear_large_round', 'wear_square', 'tv_1080p'], 'type': 'string'}, {'type': 'object', 'required': ['widthDp', 'heightDp'], 'properties': {'id': {'type': 'string'}, 'label': {'type': 'string'}, 'round': {'type': 'boolean'}, 'widthDp': {'type': 'integer', 'maximum': 4096, 'minimum': 1}, 'heightDp': {'type': 'integer', 'maximum': 4096, 'minimum': 1}, 'formFactor': {'type': 'string'}}, 'additionalProperties': False}]}, 'description': "Devices to draw. Omit for the form factor's defaults."}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer', 'description': 'A past revision. Omit for the current one.'}, 'fontScales': {'type': 'array', 'items': {'type': 'number', 'maximum': 3.0, 'minimum': 0.5}, 'description': "Defaults to the design's own font scale."}, 'formFactor': {'enum': ['phone', 'foldable', 'tablet', 'wear', 'tv', 'adaptive'], 'type': 'string', 'description': 'A default device set, instead of `devices`.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'summary', 'designId', 'revision', 'columns', 'rows', 'image', 'cells'], 'properties': {'rows': {'type': 'integer'}, 'cells': {'type': 'array', 'items': {'type': 'object', 'required': ['index', 'device', 'label', 'formFactor', 'widthDp', 'heightDp', 'theme', 'fontScale', 'x', 'y', 'width', 'height', 'rendered'], 'properties': {'x': {'type': 'integer'}, 'y': {'type': 'integer'}, 'index': {'type': 'integer'}, 'label': {'type': 'string'}, 'round': {'type': 'boolean'}, 'theme': {'type': 'string'}, 'width': {'type': 'integer'}, 'device': {'type': 'string'}, 'height': {'type': 'integer'}, 'problem': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'widthDp': {'type': 'integer'}, 'heightDp': {'type': 'integer'}, 'rendered': {'type': 'boolean'}, 'fontScale': {'type': 'number'}, 'formFactor': {'type': 'string'}}, 'additionalProperties': False}}, 'image': {'type': 'object', 'required': ['widthPx', 'heightPx', 'scale', 'sha256'], 'properties': {'url': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'scale': {'type': 'number'}, 'sha256': {'type': 'string'}, 'widthPx': {'type': 'integer'}, 'heightPx': {'type': 'integer'}, 'mediaType': {'type': 'string'}, 'expiresAtEpochSeconds': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-design-matrix/v1'}, 'columns': {'type': 'integer'}, 'summary': {'type': 'string'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer'}, 'imageBase64': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'additionalProperties': False}
ui_builder_render_native
Compile a design and render it with real Compose on this host, rather than in the browser's Wasm canvas — the way to see what a design looks like on Android. Returns the first frame, the token the live frame stream is opened with, and the design node ids the render is tagged with, so `catalog_get_preview_data` can report each node's bounds and a client can put selectable regions over the image. This host has a native render lane. The reply is not an McpResponseEnvelopeV1: the released contract defines no request type for a native render.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer', 'description': 'A past revision. Omit for the current one.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_replace_design_document
Replace one stored design from a complete DesignDocumentV1 copy — the authoritative save-back and re-import operation. The document must name the same design and the same canonical home you read from ui_builder_get_design; `baseRevision` must still be current. The runtime validates the complete document and quotas, preserves server-owned identity, access and creation time, retains the old revision, and broadcasts a whole snapshot. Retry with the same `operationId`; never invent a new id after a lost response. Unless the person already chose to save back or re-import onto this home, call first with `dryRun: true`: it changes nothing and returns the choices to put to them — or, when your client supports form elicitation on this connection, asks them in a form and returns the outcome of the write they chose.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'operationId', 'baseRevision', 'document'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'dryRun': {'type': 'boolean', 'description': "Validate and return the person's choices without changing anything."}, 'designId': {'type': 'string'}, 'document': {'type': 'object', 'description': 'The complete replacement DesignDocumentV1, including the existing home.'}, 'operationId': {'type': 'string', 'description': 'Your stable id; makes a retry idempotent.'}, 'baseRevision': {'type': 'integer', 'description': 'The exact current revision being replaced.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_resolve_comment_thread
Close a comment thread once it is answered, or reopen one by passing `resolved: false`. The resolution is attributed to you and is reversible.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'threadId'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string'}, 'resolved': {'type': 'boolean', 'description': 'Defaults to true.'}, 'threadId': {'type': 'string'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_restore_revision
Make a retained revision the design's current content again, **forward**: it is committed as a new revision and nothing after it is lost, so a restore is undone by restoring again. `baseRevision` must be the current revision (a restore that raced an edit is refused as stale). `dryRun: true` writes nothing and returns the diff the restore would apply. Needs write access to the design.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'revision', 'baseRevision'], 'properties': {'token': {'type': 'string', 'description': '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.'}, 'dryRun': {'type': 'boolean', 'description': 'Return the diff without restoring. Defaults to false.'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer', 'description': 'The retained revision to restore.'}, 'operationId': {'type': 'string', 'description': 'Makes a retry idempotent. Defaults to a fresh id.'}, 'baseRevision': {'type': 'integer', 'description': "The design's current revision, from ui_builder_get_design or ui_builder_list_revisions."}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'designId', 'revision', 'baseRevision', 'currentRevision', 'dryRun', 'applied', 'stale', 'diff', 'summary'], 'properties': {'diff': {'type': 'object', 'required': ['a', 'b', 'identical', 'summary', 'counts'], 'properties': {'a': {'type': 'object', 'required': ['designId', 'revision', 'title', 'documentDigest'], 'properties': {'title': {'type': 'string'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer'}, 'documentDigest': {'type': 'string'}}, 'additionalProperties': False}, 'b': {'type': 'object', 'required': ['designId', 'revision', 'title', 'documentDigest'], 'properties': {'title': {'type': 'string'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer'}, 'documentDigest': {'type': 'string'}}, 'additionalProperties': False}, 'nodes': {'type': 'array', 'items': {'type': 'object', 'required': ['nodeId', 'change', 'componentId', 'path'], 'properties': {'to': {'anyOf': [{'type': 'object', 'required': ['index'], 'properties': {'slot': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'index': {'type': 'integer'}, 'parentId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'additionalProperties': False}, {'type': 'null'}]}, 'from': {'anyOf': [{'type': 'object', 'required': ['index'], 'properties': {'slot': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'index': {'type': 'integer'}, 'parentId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'additionalProperties': False}, {'type': 'null'}]}, 'path': {'type': 'string'}, 'change': {'type': 'string'}, 'fields': {'type': 'array', 'items': {'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'after': {'anyOf': [{}, {'type': 'null'}]}, 'before': {'anyOf': [{}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'nodeId': {'type': 'string'}, 'modifiers': {'anyOf': [{'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'after': {'anyOf': [{}, {'type': 'null'}]}, 'before': {'anyOf': [{}, {'type': 'null'}]}}, 'additionalProperties': False}, {'type': 'null'}]}, 'beforePath': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'properties': {'type': 'array', 'items': {'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'after': {'anyOf': [{}, {'type': 'null'}]}, 'before': {'anyOf': [{}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'componentId': {'type': 'string'}}, 'additionalProperties': False}}, 'counts': {'type': 'object', 'required': ['added', 'removed', 'moved', 'changed', 'document'], 'properties': {'added': {'type': 'integer'}, 'moved': {'type': 'integer'}, 'changed': {'type': 'integer'}, 'removed': {'type': 'integer'}, 'document': {'type': 'integer'}}, 'additionalProperties': False}, 'schema': {'type': 'string'}, 'summary': {'type': 'string'}, 'document': {'type': 'array', 'items': {'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'after': {'anyOf': [{}, {'type': 'null'}]}, 'before': {'anyOf': [{}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'identical': {'type': 'boolean'}, 'truncated': {'type': 'boolean'}}, 'additionalProperties': False}, 'stale': {'type': 'boolean'}, 'dryRun': {'type': 'boolean'}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-restore/v1'}, 'applied': {'type': 'boolean'}, 'summary': {'type': 'string'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer'}, 'operationId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'baseRevision': {'type': 'integer'}, 'documentDigest': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'currentRevision': {'type': 'integer'}, 'committedRevision': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}
ui_builder_search_components
Find catalog components by name, role or trait (case-insensitive substring), e.g. `TextField`, `Button`, `Card`. Returns the same summary as ui_builder_list_catalogs (id, role, traits, slots, properties, and the catalog pin) for only the matches, so you don't pay for the whole catalog.
Esquema de entrada
{'type': 'object', 'required': ['query'], 'properties': {'query': {'type': 'string', 'description': "Text to look for in a component's id, role or traits."}, 'token': {'type': 'string', 'description': '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.'}, 'catalog': {'type': 'string', 'description': 'Only this catalog system id. Omit to search every catalog.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_set_implementation
Record the pull request that implements a design: its URL, its `status` (draft, open, merged, closed), the design `revision` it implements, and — once you have compared the PR's rendered previews with the design — `previewMatch` {status: match|mismatch|unknown, evidence: a URL to the comparison, note}. Replaces the whole record; pass only `designId` to clear it. Writing the same record again changes nothing and wakes nobody. Needs write access to the design.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'pr': {'type': 'string', 'description': 'The pull request URL.'}, 'token': {'type': 'string', 'description': '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.'}, 'status': {'enum': ['draft', 'open', 'merged', 'closed'], 'type': 'string', 'description': 'Defaults to open.'}, 'designId': {'type': 'string'}, 'revision': {'type': 'integer', 'description': 'The design revision the PR implements.'}, 'previewMatch': {'type': 'object', 'required': ['status'], 'properties': {'note': {'type': 'string'}, 'status': {'enum': ['match', 'mismatch', 'unknown'], 'type': 'string'}, 'evidence': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_set_links
Say what a design is for. **Replaces the whole record**: send every link you want kept, and omit one to clear it — so read ui_builder_get_links first if you are adding to what is already there. `issue`, `reference`, `pr` and `thread` are absolute http or https URLs, at most 2 KB each; `previous` is a design id on this host, not a URL. Anything else is refused with the reason. Sending an empty record clears it. Record the `pr` when you open one for a design you built here: it is what lets the next session, and the person who filed the issue, find one from the other.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'pr': {'type': 'string', 'description': 'The pull request that implemented it.'}, 'issue': {'type': 'string', 'description': 'The tracker issue this design is for.'}, 'token': {'type': 'string', 'description': '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.'}, 'thread': {'type': 'string', 'description': "A permalink to a discussion held elsewhere, such as a chat thread. It does not replace this server's comments for a server-homed design: keep that discussion on the design."}, 'designId': {'type': 'string'}, 'previous': {'type': 'string', 'description': 'The design id on this host that this one continues.'}, 'reference': {'type': 'string', 'description': 'The frame in the design tool it reproduces.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_set_reference
Attach the picture a design is being built against — a Figma frame, a screenshot of a shipped screen, a mock — as its reference overlay, or `clear` it. The same overlay the browser editor's Frame, density and reference panel shows, so a person opening the design sees what you attached. Kept beside the design and never part of it: no node holds it, no export sees it, the revision does not move. Send PNG, JPEG, WebP or SVG bytes in `imageBase64`. For a Figma frame, fetch the picture with your Figma tools (a screenshot of the node) and pass the frame's URL as `sourceUrl`; this host fetches nothing itself. State the export scale as `density` (2 for a Figma 2x export) or in the name (`card@2x.png`): without it a screen-shaped picture is read across the frame's width and anything else at the design's own density. The reply says what the picture is against the frame — size in dp, density, whether it is a screen or a region — and whether pixel comparison means anything. Marks drawn in the editor are kept; the alignment is reset, as a new picture in the editor does. A user-supplied image is stored on this host: say so, and attach it only with their permission.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'name': {'type': 'string', 'description': 'What the editor calls it. An `@2x` suffix declares the density.'}, 'clear': {'type': 'boolean', 'description': 'Remove the reference, its marks and pieces instead.'}, 'token': {'type': 'string', 'description': '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.'}, 'density': {'type': 'number', 'description': "The picture's pixels per dp, e.g. 2 for a 2x export, 2.625 for a Pixel screenshot."}, 'designId': {'type': 'string'}, 'sourceUrl': {'type': 'string', 'description': 'Where it came from, such as the Figma frame URL. Provenance only; never fetched.'}, 'imageBase64': {'type': 'string', 'description': "The picture, base64. PNG, JPEG, WebP or SVG; at most the host's reference size limit."}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'designId', 'attached'], 'properties': {'facts': {'anyOf': [{'type': 'object', 'required': ['widthPx', 'heightPx', 'density', 'densitySource', 'widthDp', 'heightDp', 'frameWidthDp', 'frameHeightDp', 'designDensity', 'kind', 'fit', 'pixelComparable', 'advice'], 'properties': {'fit': {'type': 'string'}, 'kind': {'type': 'string'}, 'advice': {'type': 'string'}, 'density': {'type': 'number'}, 'widthDp': {'type': 'integer'}, 'widthPx': {'type': 'integer'}, 'heightDp': {'type': 'integer'}, 'heightPx': {'type': 'integer'}, 'frameWidthDp': {'type': 'integer'}, 'densityBucket': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'densitySource': {'type': 'string'}, 'designDensity': {'type': 'number'}, 'frameHeightDp': {'type': 'integer'}, 'recommendedFit': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'pixelComparable': {'type': 'boolean'}}, 'additionalProperties': False}, {'type': 'null'}]}, 'notes': {'type': 'array', 'items': {'type': 'string'}}, 'schema': {'type': 'string', 'const': 'compose-ui-builder-reference-attached/v1'}, 'attached': {'type': 'boolean'}, 'designId': {'type': 'string'}, 'reference': {'anyOf': [{'type': 'object', 'required': ['name', 'mediaType', 'widthPx', 'heightPx'], 'properties': {'name': {'type': 'string'}, 'widthPx': {'type': 'integer'}, 'heightPx': {'type': 'integer'}, 'mediaType': {'type': 'string'}, 'sourceUrl': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'additionalProperties': False}, {'type': 'null'}]}}, 'additionalProperties': False}
ui_builder_share_design
Share a design with somebody else, or take that sharing back. `actorId` is the other party's actor id as this server spells it — `github:<login>` for a signed-in person, `operator` for the token holder, `agent:<fingerprint>` for another agent's grant; ui_builder_design_access lists the ones a design already carries. A `viewer` may read and export, an `editor` may also change the design, and neither may share it on. Only the design's owner may share it, and an agent acting under an approved grant shares as the person who approved that grant.
Esquema de entrada
{'type': 'object', 'required': ['designId', 'actorId'], 'properties': {'role': {'type': 'string', 'description': 'editor or viewer. Defaults to viewer.'}, 'token': {'type': 'string', 'description': '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.'}, 'revoke': {'type': 'boolean', 'description': "Take this actor's access away instead."}, 'actorId': {'type': 'string', 'description': 'Who to share with, e.g. github:octocat.'}, 'designId': {'type': 'string'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object'}
ui_builder_validate
Check a design without saving it: a whole `document`, a stored design by `designId`, or `operations` against a stored design exactly as ui_builder_apply would apply them. Runs the same checks the real call does — document shape, catalog pin, the catalog's own validation, the mutation reducer — and then the Compose export gate, which is the list the editor's problems panel shows. Returns `{valid, problems:[{severity, source, code, message, nodeId?, field?, operationIndex?}]}`; `valid` is false exactly when a problem is an error. Nothing is written, no revision moves and nobody watching the design is notified. The shapes are published as the resources compose-preview://schemas/ui-builder-document-v1.json and compose-preview://schemas/design-mutation-v1.json.
Esquema de entrada
{'type': 'object', 'properties': {'token': {'type': 'string', 'description': '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.'}, 'designId': {'type': 'string', 'description': 'A stored design to check, or to check `operations` against.'}, 'document': {'type': 'object', 'description': 'A whole DesignDocumentV1 to check.'}, 'operations': {'type': 'array', 'items': {'type': 'object'}, 'description': "DesignMutationV1 objects to check against `designId`'s current document, as ui_builder_apply takes them."}, 'baseRevision': {'type': 'integer', 'description': 'The revision the operations were written against; a stale one is reported as a warning.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'valid', 'problems'], 'properties': {'valid': {'type': 'boolean'}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-validation/v1'}, 'designId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'problems': {'type': 'array', 'items': {'type': 'object', 'required': ['source', 'code', 'message'], 'properties': {'code': {'type': 'string'}, 'field': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'nodeId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'source': {'type': 'string'}, 'message': {'type': 'string'}, 'severity': {'type': 'string'}, 'operationIndex': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'revision': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}
ui_builder_view
See a design the way a person in the editor sees it: a PNG of the canvas with the overlays drawn on — the `selection` outline, the `reference` picture when one is attached, the discussion's `comments` pins, and the layout `bounds` — and beside it JSON with the revision, each visible node's id and box, each pin's thread and position, all in the returned image's pixels. The picture is a short-lived signed https link by default; `inline: true` puts the bytes in the reply as well. The frame is the PNG export (`renderer: "export"`, the editor's own renderer), which reports no node boxes; `renderer: "native"` draws real Compose on a host with a native render lane, reports every node's box so the selection can be outlined, and needs the ui-builder-export capability. A node with no box is reported, never drawn at a guessed position. Not an McpResponseEnvelopeV1.
Esquema de entrada
{'type': 'object', 'required': ['designId'], 'properties': {'token': {'type': 'string', 'description': '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': {'type': 'boolean', 'description': 'Also return the PNG as an image block. Defaults to false; a host with no public origin always does.'}, 'include': {'type': 'array', 'items': {'enum': ['reference', 'bounds', 'selection', 'comments'], 'type': 'string'}, 'description': 'Overlays to draw. Defaults to comments, reference, selection; [] draws the bare frame.'}, 'designId': {'type': 'string'}, 'renderer': {'enum': ['export', 'native'], 'type': 'string', 'description': 'Defaults to export.'}, 'revision': {'type': 'integer', 'description': 'A past revision. Omit for the current one.'}, 'viewport': {'type': 'object', 'required': ['width', 'height'], 'properties': {'width': {'type': 'integer', 'maximum': 4096, 'minimum': 1}, 'height': {'type': 'integer', 'maximum': 4096, 'minimum': 1}}, 'description': "Fit the picture inside this many pixels, keeping its aspect ratio. Omit for the render's own size.", 'additionalProperties': False}, 'selection': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Node ids to show as selected.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['schema', 'designId', 'revision', 'renderer', 'include', 'selection', 'image', 'frame'], 'properties': {'frame': {'type': 'object', 'required': ['widthDp', 'heightDp', 'density', 'renderWidthPx', 'renderHeightPx'], 'properties': {'density': {'type': 'number'}, 'widthDp': {'type': 'integer'}, 'heightDp': {'type': 'integer'}, 'renderWidthPx': {'type': 'integer'}, 'renderHeightPx': {'type': 'integer'}}, 'additionalProperties': False}, 'image': {'type': 'object', 'required': ['widthPx', 'heightPx', 'scale', 'sha256'], 'properties': {'url': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'scale': {'type': 'number'}, 'sha256': {'type': 'string'}, 'widthPx': {'type': 'integer'}, 'heightPx': {'type': 'integer'}, 'mediaType': {'type': 'string'}, 'expiresAtEpochSeconds': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}}, 'additionalProperties': False}, 'nodes': {'type': 'array', 'items': {'type': 'object', 'required': ['nodeId', 'x', 'y', 'width', 'height'], 'properties': {'x': {'type': 'integer'}, 'y': {'type': 'integer'}, 'width': {'type': 'integer'}, 'height': {'type': 'integer'}, 'nodeId': {'type': 'string'}, 'selected': {'type': 'boolean'}, 'componentId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'notes': {'type': 'array', 'items': {'type': 'string'}}, 'schema': {'type': 'string', 'const': 'compose-preview/ui-builder-view/v1'}, 'include': {'type': 'array', 'items': {'type': 'string'}}, 'comments': {'type': 'array', 'items': {'type': 'object', 'required': ['threadId', 'number', 'resolved', 'anchor', 'placed', 'comments'], 'properties': {'x': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}, 'y': {'anyOf': [{'type': 'integer'}, {'type': 'null'}]}, 'anchor': {'type': 'string'}, 'author': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'markId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'nodeId': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'number': {'type': 'integer'}, 'placed': {'type': 'boolean'}, 'comments': {'type': 'integer'}, 'resolved': {'type': 'boolean'}, 'threadId': {'type': 'string'}, 'firstComment': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'additionalProperties': False}}, 'designId': {'type': 'string'}, 'renderer': {'type': 'string'}, 'revision': {'type': 'integer'}, 'reference': {'anyOf': [{'type': 'object', 'required': ['drawn', 'visible', 'mode', 'opacityPercent'], 'properties': {'mode': {'type': 'string'}, 'drawn': {'type': 'boolean'}, 'reason': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'visible': {'type': 'boolean'}, 'opacityPercent': {'type': 'integer'}}, 'additionalProperties': False}, {'type': 'null'}]}, 'selection': {'type': 'array', 'items': {'type': 'string'}}, 'imageBase64': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}, 'boundsUnavailable': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'additionalProperties': False}
Añadido
preview-stories
2 de October de 2026 a las 02:40
Añadido
get-documentation-for-story
2 de October de 2026 a las 02:40
Añadido
list-all-documentation
2 de October de 2026 a las 02:40
Añadido
catalog_get_preview_data
2 de October de 2026 a las 02:40
Añadido
catalog_list_data_products
2 de October de 2026 a las 02:40
Añadido
ui_builder_archive_branch
2 de October de 2026 a las 02:40
Añadido
ui_builder_merge_branch
2 de October de 2026 a las 02:40
Añadido
ui_builder_list_branches
2 de October de 2026 a las 02:40
Añadido
ui_builder_branch_design
2 de October de 2026 a las 02:40
Añadido
ui_builder_fork_design
2 de October de 2026 a las 02:40
Añadido
ui_builder_restore_revision
2 de October de 2026 a las 02:40
Añadido
ui_builder_diff_designs
2 de October de 2026 a las 02:40
Añadido
ui_builder_list_revisions
2 de October de 2026 a las 02:40
Añadido
ui_builder_compare_reference
2 de October de 2026 a las 02:40
Añadido
ui_builder_set_reference
2 de October de 2026 a las 02:40
Añadido
ui_builder_find_design_for_pr
2 de October de 2026 a las 02:40
Añadido
ui_builder_implementation_status
2 de October de 2026 a las 02:40
Añadido
ui_builder_set_implementation
2 de October de 2026 a las 02:40
Añadido
ui_builder_await_decision
2 de October de 2026 a las 02:40
Añadido
ui_builder_record_decision
2 de October de 2026 a las 02:40
Añadido
ui_builder_render_design_matrix
2 de October de 2026 a las 02:40
Añadido
ui_builder_check_design
2 de October de 2026 a las 02:40
Añadido
ui_builder_view
2 de October de 2026 a las 02:40
Añadido
ui_builder_render_native
2 de October de 2026 a las 02:40
Añadido
ui_builder_await_comments
2 de October de 2026 a las 02:40
Añadido
ui_builder_react_to_comment
2 de October de 2026 a las 02:40
Añadido
ui_builder_acknowledge_comment
2 de October de 2026 a las 02:40
Añadido
ui_builder_resolve_comment_thread
2 de October de 2026 a las 02:40
Añadido
ui_builder_post_comment
2 de October de 2026 a las 02:40
Añadido
ui_builder_list_comments
2 de October de 2026 a las 02:40