Skip to main content
Glama

Design deviance

get_design_deviance
Read-onlyIdempotent

Measure how far code drifts from the design system: get a 0–100 deviance score, per-rule breakdown, trend, and top off-token findings with nearest token fixes.

Instructions

Return how far the code drifts off the design system: the latest 0–100 deviance score (lower is better; null means not scored yet), its per-rule breakdown, the score trend, a scan still running if any, the top findings (file, line, literal value, rule, and the nearest token to use instead), and the active rules (off_token_color, off_token_font, off_scale_spacing, off_scale_radius, contrast_below_aa, raw_interactive_element). Optional limit: findings to return (1–200, default 25). Returns { projectId, latest, running, trend, findings, rules }. Read-only. Use to find and fix off-token code; use get_design_tokens for the full token list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoFindings to return, 1–200 (default 25).
projectIdNoProject UUID — defaults to the server-configured project when omitted (`project_id` is accepted too.)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.14

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and openWorld, and the description adds real behavioral context beyond them: score range semantics (0–100, lower is better), that null means not scored, that a scan may still be running, and the finding structure. It repeats 'Read-only' from the annotations, slightly redundant, but the semantic disclosures are genuinely useful.

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?

The core purpose is front-loaded, then the return payload is enumerated. It is dense and somewhat run-on, but with no output schema present the field enumeration earns its place; minor redundancy in repeating limit and read-only wording.

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?

With no output schema, the description carries the return contract and does so thoroughly: score semantics, rule list, trend, running state, finding fields, and the active-rule enumeration. Combined with the routing note to the sibling, an agent has everything needed to call and interpret it.

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 coverage is 100% and both parameters are documented in the schema, including the limit range and the projectId default. The description only restates the limit range and default, adding no meaning beyond the schema, so the 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?

States a specific verb and resource: it returns the design-deviance score and its breakdown for a project. It also names the sibling it is not (get_design_tokens), so an agent can route correctly without opening either schema.

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?

Explicitly says when to use it ('to find and fix off-token code') and names the alternative 'get_design_tokens' for the full token list. It does not clarify the relationship to the sibling run_design_deviance (which presumably triggers a scan), leaving a small inference gap.

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