Skip to main content
Glama

audit_design_md

Read-onlyIdempotent

Audit DESIGN.md color tokens for WCAG/APCA contrast, color-blind collisions, duplicate or broken references, and missing primary tokens. Returns failing pairs and same-hue fix suggestions.

Instructions

Audit the color tokens of a DESIGN.md file (Google Labs design-system format: YAML front matter / ```yaml blocks with colors and components). Checks WCAG + APCA contrast for pairs declared in components (backgroundColor/textColor) and pairs inferred from token names (on-X ↔ X, text ↔ surface), color-blind collisions between accent/status colors, exact and near-duplicate tokens, disliked colors, broken {colors.x} references and a missing primary. Suggests same-hue fixes for failing pairs. Pass the file's full text.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "designMd": "<designMd>"
    },
    "name": "audit_design_md"
  }
}

Input Schema

NameRequiredDescriptionDefault
designMdYesFull text of the DESIGN.md file
maxItemsNoMaximum rows listed per report section
cvdThresholdNoΔE2000 below which two accent/status colors count as indistinguishable under color-vision deficiency
textThresholdNoMinimum WCAG contrast for text pairs (4.5 = AA normal text, 7 = AAA)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent, non-destructive and closed-world, so the description's job is to add substance, which it does: it lists the full set of checks (declared and inferred pairs, CVD collisions, duplicates, disliked colors, broken {colors.x} references, missing primary) and states it proposes same-hue fixes. It stops short of describing report structure or how inferred pairs are derived, keeping it below a 5.

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?

Front-loaded with the verb and resource, then the format spec, then the check list. Dense but every clause carries information; the check enumeration is long but earns its place by defining scope. Slightly over-packed as two long sentences.

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?

Given four parameters, no output schema, and rich annotations, the description is nearly sufficient: it defines input format, checks, and that fixes are suggested. Minor gaps are the shape of the returned report and behavior on malformed or missing front matter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds real meaning: 'Pass the file's full text' clarifies the designMd parameter's expected content, and the contrast/CVD checks give context for textThreshold and cvdThreshold. maxItems remains unexplained beyond its schema description.

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 (audit the color tokens of a DESIGN.md file), pins the exact file format (YAML front matter / ```yaml blocks with `colors` and `components`), and enumerates the checks performed. This lets an agent distinguish it from generic siblings like audit_ui_colors or check_palette_accessibility without opening any schema.

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?

Usage is implied by the format constraint and the closing instruction 'Pass the file's full text', which tells the agent what input to supply. However, there is no explicit when-to-use/when-not guidance and no named alternative for auditing a non-DESIGN.md file or for a single-pair check (e.g., check_contrast).

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