Skip to main content
Glama

Compose Preview Catalogs

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenNoA 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.
assetKeyYes1 to 64 characters of letters, digits, '.', '_' or '-'; what the node's assetKey property names.
designIdYes
imageBase64YesThe image bytes, base64. At most 1 MiB decoded.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: accepted formats, base64 transport, content-digest storage, the exact pinned shape ({mediaType, contentDigest, source: uploaded}), revision bumping, and the returned baseRevision. It even discloses failure-mode behavior (a key whose bytes a lane cannot show renders a placeholder rather than erroring), which is unusually rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then constraints, then ordering and idempotency. Dense but nearly every clause earns its place; only the placeholder-rendering sentence is arguably extra, and even that prevents a wrong error-handling assumption.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value detail is not required, yet the description still calls out baseRevision for the caller to quote. Combined with ordering rules, idempotency, and registry-refusal behavior, nothing needed to invoke this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75%, so most params are documented structurally, but the description adds real meaning: which image formats are accepted for `imageBase64`, how it is encoded, and the implicit limit is echoed from the schema. The `token` param is left entirely to the schema, which is a minor gap but acceptable given header-preference is already explained there.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a concrete verb+resource: put image bytes behind an `assetKey` so an `asset/image` node renders it. It explicitly distinguishes this from `ui_builder_apply`, which inserts the node that consumes the key, so an agent can tell the two apart without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the required ordering ('Put the picture first, then insert the `asset/image` node with ui_builder_apply') and the reason the reducer will refuse a key that is neither pinned nor in the catalog registry. It also names the idempotency condition (same bytes under same key change nothing), which is exactly the when-to-call/when-it-is-a-no-op guidance an agent needs.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.