Skip to main content
Glama

audit_swiftui

Read-only

Audits SwiftUI source against Apple HIG, flagging hardcoded fonts, colors, small frames, and spacing off the 4/8-pt grid. Rewards semantic design tokens and returns pass/fail 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).
Behavior4/5

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

Annotations declare readOnlyHint=true and destructiveHint=false. The description adds substantial behavioral context: what it flags, what it rewards, and that source concatenation occurs. No contradiction with annotations.

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 detailed yet concise, front-loading the purpose and listing checks. Each sentence adds value, though it could be slightly more structured for readability.

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 complexity of audit checks, the description is thorough: covers what is checked, ignored, and return format (pass/fail with fix instructions). Without an output schema, it sufficiently describes outcomes.

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 coverage is 100% with descriptions for all 5 parameters. The description adds context for how parameters are used (e.g., accent_color_contents verification) but does not provide deeper semantics beyond what the schema already conveys.

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 audits SwiftUI source against Apple's HIG, lists specific checks (fonts, colors, tap targets, spacing), and distinguishes itself by being iOS-native only, differentiating from sibling tools like audit_ios_a11y or audit_ios_screen.

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

Usage Guidelines4/5

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

The description implies usage for auditing SwiftUI HIG compliance and explicitly excludes web/CSS rules, providing clear context. However, it does not name specific alternatives or state when not to use this tool versus siblings.

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/rhinocap/raven-mcp'

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