Skip to main content
Glama

ui_builder_simulate_action

Run a stored design's host logic — the JavaScript in its hostLogic that stands in for the host feeding it, answering host actions by setting host inputs — headless, without a browser: init, then each of actions in order, as the editor's canvas runs it. Each action is {"name": …, "value": …}, exactly what a design's host action sends (a value is text, a whole number or a decimal; omit it for none). Returns summary first, then ok and steps: for init and each action, the program's private state, every host input's values as the canvas would draw them, which inputs the step set, and the error when its answer could not be used. A failing step keeps the values before it and the next action is still sent; a program that overruns its budget stops the run (stopped). Use it to show the logic works (a calculator shows 3 after 1 + 2 =) and to find which key breaks it. Nothing is saved. At most 200 actions.

Tool call template

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

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "designId": "<designId>"
    },
    "name": "ui_builder_simulate_action"
  }
}

Input 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.
actionsNoHost actions to answer, in order, after init. Omit to run init alone.
designIdYes
revisionNoA past revision. Omit for the current one.
agentNameNoOptional agent/client name shown to design viewers; self-reported.
agentModelNoOptional current model name shown to design viewers; self-reported. Omit when unknown.

Output Schema

NameRequiredDescriptionDefault
okYes
stepsYes
digestNo
schemaYes
stoppedNo
summaryYes
designIdYes
revisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations, the description carries the behavioral burden well: it discloses headless execution, step ordering, failure semantics, budget stopping, no persistence, and the 200-action cap. It also explains output ordering and per-step state/error reporting.

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-loads the core purpose and sequences behavior logically, but it is a dense single paragraph and repeats return details even though an output schema exists. The length is largely justified by the tool's complexity, though it could be tightened.

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?

Given the simulation's complexity and the presence of an output schema, the definition is complete enough for an agent to call it correctly. It covers sequencing, limits, no-save behavior, and failure handling, while authentication details remain in the schema.

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

Parameters3/5

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

Schema description coverage is 83%, so the schema already documents most parameters. The description clarifies action objects and value types, but largely repeats schema content and adds no semantic guidance for designId, revision, token, or agent metadata.

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

Purpose4/5

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

States a specific verb and resource — running a stored design's hostLogic headless — and describes the exact init-then-actions sequence. It does not explicitly contrast itself with related siblings such as ui_builder_validate or ui_builder_render_design_matrix, so sibling differentiation remains implicit.

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

Usage Guidelines4/5

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

Gives clear usage context: use it to show the logic works and to find which key breaks it, and notes that nothing is saved. It does not provide when-not-to-use guidance or name alternative tools.

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.