Skip to main content
Glama
Stitch MCP Server

Stitch MCP Server

Generate Screen

stitch_generate_screen

Generate a new UI screen in Google Stitch from a text prompt, using a specified project or falling back to the first available, with device and model selection.

Instructions

Generate a new UI screen in Google Stitch from a text prompt. Uses the specified project or falls back to the first available project. Supports model selection (GEMINI_3_PRO, GEMINI_3_FLASH, GEMINI_3_1_PRO).

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": {
      "prompt": "<prompt>"
    },
    "name": "stitch_generate_screen"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoName for the generated screen
deviceNoDevice typemobile
promptYesDesign prompt for the screen
modelIdNoModel to use for generation
projectIdNoStitch project ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.4

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), so the lower bar applies. The description still adds real behavior beyond them: the fallback to the first available project when none is given, and the fact that generation is model-driven, which is not derivable from annotations. It does not mention latency, cost, or duplicate-screen behavior on repeat calls, which keeps it from a 5.

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?

Three short sentences, front-loaded with the core action, with no filler. The verbatim listing of GEMINI_3_PRO / GEMINI_3_FLASH / GEMINI_3_1_PRO repeats the schema enum and is the one sentence that does not fully earn its space.

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

Completeness3/5

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

For a write-oriented generator with no output schema, an agent still needs to know what comes back (a screen ID or object) so it can chain into stitch_sync_screen or stitch_export_framework; the description is silent on that. Inputs are adequately covered, so it is functional but incomplete at the seams.

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 100%, so the baseline is 3 and the schema already explains name, device, prompt, modelId, and projectId. The description's restatement of the three model IDs duplicates the enum values rather than adding semantics; the only added meaning is that projectId is optional in effect via the fallback.

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 plus the source of input: 'Generate a new UI screen in Google Stitch from a text prompt.' The verb 'generate' plus 'UI screen' clearly separates it from siblings like stitch_sync_screen or stitch_apply_design_system, though it never names an alternative explicitly.

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

Usage Guidelines3/5

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

Usage is implied by the purpose and by the note that a project can be supplied or an available one picked up, which tells an agent it may omit projectId. There is no explicit 'use this instead of X' routing against the other screen-creation-adjacent siblings, so guidance remains inferred rather than stated.

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