Skip to main content
Glama
mattferry

Stitch MCP Server

by mattferry

screen_to_react

Convert a Stitch screen's HTML into a typed React/TSX component with Tailwind classes and imports, ready for direct integration.

Instructions

Converts a Stitch screen's HTML into a clean React/TSX function component with a typed props interface, Tailwind CSS classes extracted from inline styles where possible, and proper imports. Returns usable React code ready to drop into a project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
screenIdYesThe screen ID to convert.
projectIdYesThe Stitch project ID.
componentNameNoName for the generated React component (PascalCase). Defaults to 'Screen'.
includeResponsiveNoInclude responsive Tailwind modifiers (sm:, md:, lg:).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It accurately describes the transformation (reads HTML, produces React code) but doesn't disclose whether it's read-only, side effects, limitations, or error behavior. The term 'Converts' implies non-destructive, but this isn't explicit.

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 a single, information-dense sentence. It front-loads the action and object, then specifies outputs and benefits without unnecessary fluff. Every clause adds value.

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?

No output schema exists, so the description should clarify return value. It states 'Returns usable React code' but doesn't specify the format (e.g., string, file), error handling, or prerequisites like project/screen existence. Given the tool's simplicity, this is adequate but not comprehensive, especially without annotations to cover safety or side effects.

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. The description doesn't add meaning to any parameter; it only describes output behavior (e.g., Tailwind extraction) rather than parameter details. It doesn't enhance understanding of projectId, screenId, componentName, or includeResponsive beyond what the schema already provides.

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 verb 'Converts' and the specific resource (Stitch screen's HTML) and output (clean React/TSX function component), with distinct details like 'typed props interface' and 'Tailwind CSS classes extracted from inline styles' that differentiate it from sibling tools like screen_to_tailwind_config or screen_to_css_variables.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives. The description mentions 'ready to drop into a project' but doesn't compare with other screen conversion tools or state conditions for selection. Siblings like screen_to_plane_issue or screen_to_tailwind_config exist, but no differentiation is provided.

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