Skip to main content
Glama
mattferry

Stitch MCP Server

by mattferry

screen_to_css_variables

Generate CSS variables from a screen design: produces a semantic :root block covering colors, typography, spacing, shadows, and border radii. Supports optional dark-mode overrides.

Instructions

Extracts CSS custom properties (variables) from a screen's design. Produces a complete :root block with semantic naming for colors, typography, spacing, shadows, and border radii. Supports optional dark-mode variable overrides.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
screenIdYesThe screen ID to extract from.
namespaceNoOptional namespace prefix for variable names (e.g. 'app' produces --app-color-primary).
projectIdYesThe Stitch project ID.
includeDarkModeNoGenerate a prefers-color-scheme:dark override block with inverted/adjusted values.

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?

With no annotations provided, the description carries the full burden. It discloses the output structure (a :root block) and the optional dark-mode override, but it does not state whether the operation is read-only, whether it modifies any project state, or what happens if the screen does not exist or lacks design data. The disclosed behavior is accurate but not comprehensive.

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 three sentences, each earning its place: it states the action, the output format, and the optional dark-mode capability. No filler or redundancy, and the core purpose is front-loaded.

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?

The tool has no output schema, so the description's mention of 'a complete :root block' partially addresses return value. However, it lacks usage context relative to alternatives, any mention of prerequisites (e.g., screen must exist), and does not clarify whether the returned block is a string, file, or structured object. The complexity is moderate, so the gaps are noticeable but not severe.

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 each parameter is already documented. The description adds context about semantic naming and the categories of variables extracted, which helps understand the output, but it does not add meaning beyond the schema for the parameters themselves. Baseline 3 applies.

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 opens with a specific verb and resource: 'Extracts CSS custom properties (variables) from a screen's design.' It further specifies the output (a complete :root block with semantic naming for colors, typography, spacing, shadows, and border radii) and mentions optional dark-mode overrides. This clearly differentiates it from siblings like screen_to_react or screen_to_tailwind_config, which target different output formats.

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 guidance is given on when to use this tool versus alternatives. Overlapping siblings like generate_design_tokens, extract_design_context, and screen_to_tailwind_config exist, but the description does not mention any exclusions or selection criteria. An agent would have to infer from the name and description alone.

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