Skip to main content
Glama

hig_swiftui

Read-onlyIdempotent

Maps a Human Interface Guidelines component to its SwiftUI API and design tokens, flagging beta modifiers to verify before shipping.

Instructions

Map a HIG component to its SwiftUI API plus the token references to apply.

Stable APIs are confident; Liquid-Glass-era modifiers are flagged verify:true because names shift between betas — confirm via hig_fetch or Xcode before shipping.

Args: params.component: one of the 14 mapped components, e.g. button, tab_bar, sheet (omit to list all)

Returns: dict: mapping with swiftui API, token refs, hig_path, and verify flags.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, non-open-world, so the safety profile is covered. The description adds genuinely useful behavior beyond that: unstable Liquid-Glass-era modifiers are flagged verify:true because names shift between betas. This discloses uncertainty semantics not present in structured fields.

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-loads the core action, then uses clean Args/Returns structure. The Liquid-Glass caveat earns its place as it changes how the agent treats output. Slightly verbose but no filler 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?

An output schema exists, so the Returns line is surplus but harmless, and annotations cover the safety profile. The only real gap is the full set of 14 component names, which would remove trial-and-error for the single parameter.

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 description coverage is reported at 0%, so the description must carry the parameter meaning, and it largely does: names the parameter, gives example values (button, tab_bar, sheet), states the count (14), and explains that omitting it lists all. It stops short of enumerating all 14 valid values, leaving some guesswork.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: map a HIG component to its SwiftUI API and token references. Clear and specific, but differentiation from the overlapping sibling hig_get_tokens (also token-oriented) is only implicit — the description names hig_fetch as a verification path, not as the distinct alternative.

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?

Gives concrete when-to-use guidance: verify:true entries should be confirmed via hig_fetch or Xcode before shipping, and omitting component lists all. Names an alternative tool and the condition selecting it, though it does not cover exclusions against hig_get_tokens/hig_check_liquid_glass.

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