Skip to main content
Glama

run_audit

Run a design system audit to check spec compliance for WCAG accessibility, token coverage, and naming conventions. Returns structured findings with pass/warn/fail status.

Instructions

Run a design system audit through the agent orchestrator and return a structured findings report.

Prerequisites: No Figma connection required for spec-level audits. For visual/contrast checks, the bridge must be running (WCAG contrast checks query the design system tokens; pixel-level checks use AI vision via analyze_design).

Returns on success: Orchestrator result with audit findings — { success: boolean, results: AuditResult[], summary: string }. Each AuditResult includes { check: string, status: "pass"|"warn"|"fail", details: string, affected?: string[] }.

WCAG checks performed (when focus includes "accessibility"):

  1. WA-101: Color contrast ratio — text/background pairs against 4.5:1 (AA normal) and 3:1 (AA large) thresholds

  2. WA-201: Touch target size — interactive elements checked against 24×24px (AA) and 44×44px (AAA) minimums

  3. WA-202: Focus indicator visibility — focus ring width ≥ 2px and contrast ≥ 3:1

  4. WA-301: Text spacing overrides — specs must tolerate 1.5× line-height and 0.12em letter-spacing

  5. WA-401: Keyboard navigation — component specs checked for keyboard interaction definitions

Error behavior: Never throws — returns success=false with an error message if the orchestrator fails to initialize.

Use this tool vs analyze_design: run_audit operates on specs and the token registry (no screenshot needed); analyze_design operates on a live Figma screenshot with AI vision. Use run_audit for systematic spec compliance; use analyze_design for visual quality review of a specific frame.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
focusNoOptional focus area to narrow the audit scope. Examples: 'accessibility' (runs all 5 WCAG checks), 'token coverage' (checks which components use design tokens vs hardcoded values), 'naming' (validates spec name conventions), 'contrast' (color contrast only), 'touch-targets' (interactive element sizing only). Omit to run the full default audit suite.
Behavior5/5

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

No annotations provided, but description fully compensates: states error behavior (never throws, returns success=false), lists all WCAG checks performed, describes return format (success, results, summary), and mentions prerequisites.

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?

Description is relatively long but well-structured: starts with purpose, then prerequisites, return format, checklist, error behavior, and comparison with sibling. Could be slightly more concise, but all content is relevant.

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?

Covers all aspects users need: purpose, when to use, prerequisites, error handling, return structure, detailed checklist of checks. Completeness is high despite no output schema.

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% with one parameter 'focus' described. Description adds value by listing example values and explaining what each focus does, though not strictly necessary given schema's 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?

Uses specific verb 'Run' and resource 'design system audit', clearly distinguishes from sibling 'analyze_design' by stating it operates on specs and token registry without needing a screenshot.

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?

Explicitly says when to use this tool vs 'analyze_design' (spec compliance vs visual review), includes prerequisites (no Figma required for spec-level, bridge needed for visual checks), and provides examples of focus areas.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sarveshsea/memi'

If you have feedback or need assistance with the MCP directory API, please join our Discord server