Skip to main content
Glama

generate_screen_from_text

Destructive

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.

TDQS

A4.7/5.0
Behavior5/5

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

Discloses long execution time, retry prohibitions, connection error behavior, and how output_components should be processed – all beyond the annotation flags. This is valuable context that prevents agent mistakes.

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?

Well-structured with bold section headers and bullet points, making it easy to parse. Every sentence contributes meaningful guidance without redundancy.

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?

Covers the entire operational lifecycle: initiation, expected delays, failure handling, polling with get_screen, and output consumption. With an output schema present, the description doesn't need to list every return field, making this complete.

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?

The schema already covers all parameters with descriptions (100% coverage). The description adds a clear usage pattern for the prompt parameter when re-invoking from suggestions, and mentions designSystem sourcing via get_project/list_assets, supplementing the schema.

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 states 'Generates a new screen within a project from a text prompt' – a specific verb, resource, and input format. This clearly distinguishes it from siblings like generate_variants and edit_screens.

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?

Provides explicit instructions for timeout scenarios (do not retry, poll get_screen) and for re-invoking the tool when suggestions are accepted. While it doesn't explicitly contrast with sibling generation tools, it gives clear operational context and alternative actions.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools have clearly distinct purposes, but some pairs like create_design_system and create_design_system_from_design_md, or apply_design_system vs update_design_system, could cause confusion. Overall, agents can distinguish them with careful reading.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern, e.g., create_project, list_screens, upload_design_md. Even longer names like create_design_system_from_design_md maintain the pattern.

Tool Count5/5

With 14 tools, the server covers project, screen, and design system management without being overwhelming. The count is well-suited to the domain of a UI design platform.

Completeness3/5

While core operations exist, there are notable gaps: no delete tools for projects/screens/design systems, and no general update for projects or screens (edit_screens is text-prompt based). This can lead to dead ends for agents.

Resources