Skip to main content
Glama

DESIGN.md Linter & Extractor

Diff two DESIGN.md files for token changes and lint regressions

diff_design_md
Read-onlyIdempotent

Compares two versions of a DESIGN.md file the way npx @google/design.md diff does. Best for: deciding whether a DESIGN.md change is breaking before it is merged. Pass the whole old file in base_text and the whole new file in target_text, each including the YAML front matter; a file path or URL will not work. Returns: every added, removed and modified token in colors, typography, rounded, spacing and components with its old and new value, breaking (true when a token was removed), regression (true when the new file has more lint errors or warnings), the lint counts before and after, and a markdown summary. Do not use for: checking a single file (use lint_design_md) or comparing two websites (run extract_design_md on each first).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_textYesThe whole old (current) DESIGN.md file contents, including the YAML front matter between --- lines. Not a file path or URL. Example: "--- name: Paper colors: primary: "#1D1D1B" ---". Both files together must stay under 64 KB.
target_textYesThe whole new (proposed) DESIGN.md file contents, including the YAML front matter, to compare against base_text. Not a file path or URL. Example: "--- name: Paper colors: primary: "#0B5CAD" ---".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokensYesToken names added, removed and modified per group, as `npx @google/design.md diff` reports them
changesYes
breakingYesTrue when a token was removed, so references to it stop resolving
findingsYes
regressionYesTrue when the target has more lint errors or warnings than the base
changesCountYes
markdownSummaryYesThe changes as a short markdown report

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real behavioral substance beyond that: inputs must be full file text including YAML front matter, file paths and URLs are rejected, and the 64 KB combined size constraint applies. It does not discuss failure modes or how near-identical files are handled.

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?

Well front-loaded and cleanly segmented into purpose, 'Best for:', input rules, 'Returns:' and 'Do not use for:'. The 'Returns:' sentence enumerates fields that the output schema already exposes, which is redundant padding, though it does not obscure the key instructions.

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 an output schema present, annotations covering safety, and 100% schema description coverage, the description needs only to supply scope, routing and input format — all of which it does. An agent can select and call this tool correctly with no open questions.

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's parameter guidance (whole old file in base_text, whole new file in target_text, include front matter, not a path or URL) largely restates what the schema properties already document, adding no new syntax or format detail.

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 (compares two versions of a DESIGN.md file) and frames it against the equivalent CLI command. It explicitly distinguishes itself from siblings by naming lint_design_md and extract_design_md as the tools for the two adjacent jobs.

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

Usage Guidelines5/5

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

The 'Best for: deciding whether a DESIGN.md change is breaking before it is merged' clause plus the explicit 'Do not use for: checking a single file (use lint_design_md) or comparing two websites (run extract_design_md on each first)' give both positive and negative routing criteria with named alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.