Skip to main content
Glama
mattferry

Stitch MCP Server

by mattferry

validate_design_system

Validate a screen against approved design tokens to catch color, font, spacing, and border-radius violations. Get compliance percentage and fix suggestions to ensure design consistency.

Instructions

Validates whether a screen follows a given design token set. Checks colors, fonts, spacing, and border-radii against approved values and reports violations, compliance percentage, and suggestions for fixes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
screenIdYesThe screen ID to validate.
projectIdYesThe Stitch project ID.
strictModeNoIf true, any unapproved value is a violation. If false, only flag values that are far from approved ones.
approvedFontsNoList of approved font family names.
approvedRadiiNoList of approved border-radius values.
approvedColorsNoList of approved color values (hex, rgb, hsl).
approvedSpacingNoList of approved spacing values (e.g. '4px', '8px', '16px').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It explains what the tool checks and what it reports (violations, compliance percentage, suggestions), but it does not explicitly state side-effect behavior, such as whether the screen is modified, or any prerequisites like requiring a design system to exist in the project.

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 one focused sentence that leads with the action and purpose, then lists the checked categories and the outputs. Every phrase earns its place; there is no repetition of schema details or filler.

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

Completeness4/5

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

For a moderately complex tool with 7 parameters and no output schema, the description plus fully documented parameters provide enough for an agent to invoke it correctly. It describes the return-style outputs in prose, though it could be more complete by noting whether validation is read-only or what happens when optional approved arrays are omitted.

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 parameter baseline is 3. The description adds a high-level mapping between 'colors, fonts, spacing, and border-radii' and the approved-array parameters, but it does not add meaningful detail beyond what the schema already provides for each parameter.

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 names a specific action ('Validates'), a specific object ('a screen'), and the specific basis ('a given design token set'). It also enumerates the checked dimensions and report outputs, making the tool's purpose unambiguous and distinguishable from siblings like analyze_accessibility or apply_design_system.

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?

The description implies when to use the tool—when checking a screen's compliance against approved design tokens—but it does not explicitly state when not to use it or mention alternative tools such as apply_design_system or analyze_accessibility. Usage context is present but left to inference.

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