Skip to main content
Glama

audit_swiftui

Read-onlyIdempotent

Audit SwiftUI source against Apple's Human Interface Guidelines. Detects non-semantic fonts, hardcoded colors, undefined accent colors, small tap targets, and off-grid spacing; returns pass/fail per check with fix instructions.

Instructions

Audit SwiftUI source against Apple's Human Interface Guidelines. Flags hardcoded .font(.system(size:)) below ~13pt and tiny semantic fonts (.caption/.caption2), hardcoded Color(red:green:blue:)/hex instead of asset-catalog or semantic system colors, an empty/undefined AccentColor, interactive frames below 44×44pt, and ad-hoc spacing off the 4/8-pt grid. Rewards semantic Dynamic Type fonts, semantic system colors, SF Symbols, and flexible frames. iOS-native checks only — no web/CSS rules. Returns pass/fail per check with fix instructions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesSwiftUI source — a single file/view as a string, or an array of file contents. Concatenated before analysis.
strictNoStrict mode — also count warnings as failures for grading. Default: false
profileNoTaste profile owning the binding. Omit to search all stored profiles for one bound to the project.
projectNoProject identifier — resolves a saved taste surface binding (see bind_taste_surface). When the binding carries design_notes, each note is verified against the source (animation/material/haptic/font APIs) and returned in note_assessments; missing notes count toward the grade.
accent_color_contentsNoOptional raw Contents.json of AccentColor.colorset. When provided, the tool verifies AccentColor actually defines color components (flags an empty/undefined accent color as an error).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.9

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare the tool read-only and idempotent, so the safety profile is covered. The description adds meaningful behavioral context beyond that: specific violations that get flagged (font sizes below ~13pt, empty AccentColor, sub-44pt frames, off-grid spacing), the 'Rewards...' scoring behavior, and the output contract ('pass/fail per check with fix instructions').

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single tight paragraph that front-loads the action, packs the check list into compact parenthetical clusters, tacks on the scope restriction, and ends with the return contract. Every clause earns its place — around 70 words with zero filler, repetition, or marketing fluff.

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 the moderate complexity and no output schema, the description adequately covers the return shape ('pass/fail per check with fix instructions') and the main behavioral surface. The optional profile/project binding and strict-mode grading semantics are carried by the 100%-covered schema, so nothing critical needed to invoke the tool correctly is missing.

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%, and each of the 5 parameters already has a rich description (source concatenation, strict-mode semantics, taste-surface binding, accent_color_contents verification). The tool description adds only one cross-reference — tying the accent_color_contents parameter to the empty/undefined AccentColor check — which is useful marginal context but not compensating work, 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?

The description uses a specific verb ('Audit') with a specific resource ('SwiftUI source') and a named standard ('Apple's Human Interface Guidelines'), then enumerates the exact rule categories checked. It also distinguishes itself from sibling audit tools by declaring 'iOS-native checks only — no web/CSS rules'.

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?

The intended use context — SwiftUI iOS HIG auditing — is clear, and the exclusion 'no web/CSS rules' provides some boundary on when NOT to use it. However, none of the many overlapping audit siblings (audit_typography, audit_tap_targets, audit_contrast, audit_ios_a11y) are named, so when to choose this tool over an alternative is left to the agent's inference.

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