Skip to main content
Glama
bluedevilcollectibles

stitch-mcp-stdio

generate_screen_from_text

Destructive

Create a new UI screen in your project by providing a text prompt. This tool generates the screen design from your description, supporting device type and design system options.

Instructions

Generates a new screen within a project from a text prompt.

Instructions for Tool Call:

  • This action can take a few minutes to complete. Please be patient. DO NOT RETRY.

  • If the tool fails with a timeout, don't retry. Instead, try to get the screen with get_screen method every 30 seconds for up to 10 times before giving up.

  • If the tool call fails due to connection error, the generation process may still succeed. Please try to get the screen with get_screen method later.

Output:

  • output_components: If output_components contains text, return it to the user. If output_components contains suggestions (e.g. "Yes, make them all"), present these suggestions to the user. If the user accepts one of the suggestions, call generate_screen_from_text again with prompt set to the accepted suggestion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesRequired. The input text to generate the screen from.
modelIdNoOptional. The model to use for generation.
projectIdYesRequired. The project ID to generate the screen for, example: '4044680601076201931', without the `projects/` prefix.
deviceTypeNoThe type of device that captured the screenshot, e.g., mobile or desktop.
designSystemNoOptional. The design system id to use for generating the new screen, should always be configured for design consistency, via `get_project` or `list_assets` methods. If not provided, a default design system will be used. Example: `assets/15996705518239280238`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoThe project ID of the generated screen. This is the same as the input project ID.
sessionIdNoThe session ID of the generated screen.
outputComponentsNoThe generated output components.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

The description goes beyond annotations by detailing the asynchronous behavior: it can take minutes, may timeout, and may still succeed on connection errors. It also specifies the fallback polling mechanism and the handling of output components and suggestions. The annotations only state readOnlyHint=false and destructiveHint=true, so the description adds valuable behavioral context without contradicting them.

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

Conciseness5/5

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

The description is well-structured with sections for instructions and output. It is appropriately sized for the tool's complexity (async operation, error handling, output handling). Every sentence serves a purpose: the initial purpose statement, the timing instructions, the fallback strategy, and the output handling. No redundant or filler text; it is dense but clear.

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 tool's complexity (long-running, error-prone, with suggestions), the description is complete. It covers what to do on timeout, connection errors, how to retrieve the result, and how to handle suggestions. It also references an output schema implicitly through 'output_components'. The agent has everything needed to invoke the tool correctly and react to its outcomes.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds extra value by providing guidance on the 'designSystem' parameter ('should always be configured for design consistency, via `get_project` or `list_assets` methods') and clarifying the 'projectId' format (example given). These details are not present in the schema descriptions, making the description helpful for correct parameter usage.

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 clearly states the tool's purpose: 'Generates a new screen within a project from a text prompt.' This is a specific verb ('generates'), resource ('screen'), and input method ('text prompt'). It distinguishes itself from sibling tools like 'edit_screens' (which edits existing screens) and 'generate_variants' (which generates variants of existing screens) by the text prompt basis. The purpose is unambiguous.

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?

The description provides explicit guidance on when and how to use the tool: it warns about long execution time, instructs not to retry on timeout, and directs the agent to poll with `get_screen` every 30 seconds up to 10 times. It also explains how to handle connection errors and what to do with output suggestions (re-call the tool with the accepted suggestion). This is clear, actionable usage context that differentiates this tool from its alternatives.

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