Skip to main content
Glama

run_audit

Audit design system specifications for compliance, including WCAG accessibility checks, token usage, and naming conventions, returning structured findings.

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?

With no annotations provided, the description carries full burden and delivers comprehensive behavioral disclosure. It details error behavior ('Never throws — returns success=false'), lists specific WCAG checks performed, explains return structure, and describes prerequisites for different audit types. This goes well beyond basic functionality.

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 description is well-structured with clear sections (purpose, prerequisites, returns, WCAG checks, error behavior, usage comparison). While somewhat lengthy, every sentence adds value. It could be slightly more front-loaded, but the information density is high with minimal waste.

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?

For a complex audit tool with no annotations and no output schema, the description provides exceptional completeness. It fully documents the return structure, error handling, specific checks performed, prerequisites, and comparison with alternatives. The agent has everything needed to understand and use this tool effectively.

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?

The schema has 100% description coverage, so baseline is 3. The description adds significant value by providing concrete examples of focus values ('accessibility', 'token coverage', 'naming', etc.) and explaining what each focus area does, which helps the agent understand parameter semantics beyond the schema's generic 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?

The description clearly states the tool's purpose with specific verbs ('run a design system audit') and resources ('through the agent orchestrator'), and explicitly distinguishes it from its sibling analyze_design by contrasting spec-based vs. visual-based approaches. It provides a complete picture of what the tool does.

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 description provides explicit guidance on when to use this tool vs. analyze_design, including specific scenarios (systematic spec compliance vs. visual quality review). It also mentions prerequisites (bridge requirements for certain checks) and scope narrowing options via the focus parameter.

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/m-moire'

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