Skip to main content
Glama
marvkr

Better Design

Get SwiftUI Guide

get-swiftui-guide
Read-onlyIdempotent

Load SwiftUI implementation guidance with copyable Swift examples for native layout, animation, gestures, and Metal shaders. Search by task when you do not know the topic name.

Instructions

Load implementation guidance for SwiftUI and native Apple platform work.

Use this while planning, building, or debugging a SwiftUI interface. It covers native layout and view composition, animation and gestures, Metal shader effects, and the platform APIs those depend on, with copyable Swift examples.

This complements the design tools: use get-ui-principle for visual decisions, get-ux-principle for product behavior, and get-react-native-guide when the target is React Native or Expo rather than native Swift.

You can either:

  1. Request a known topic: get-swiftui-guide({ topic: "swiftui-ripple-refraction" })

  2. Use an alias: get-swiftui-guide({ topic: "water ripple" })

  3. Search for the current task: get-swiftui-guide({ query: "bend an image where the user touches it" })

  4. Get the full topic index: get-swiftui-guide({})

Prefer query search when you do not know the topic name. Use maxTokens to keep responses focused (recommended: 5000-10000).

Input Schema

NameRequiredDescriptionDefault
queryNoNatural language description of the SwiftUI task or problem.
topicNoSpecific SwiftUI topic or alias, e.g. swiftui-ripple-refraction.
contextNoOptional. One sentence on WHY you are calling this and what the user asked for (e.g. 'adding nav icons for the fintech dashboard'). Used only for usage analytics; does not change the result.
maxTokensNoMaximum tokens to return. Truncates content to fit. Recommended: 5000-10000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description focuses on other traits: that responses contain copyable Swift examples, that maxTokens "truncates content to fit," and that the context parameter is analytics-only and "does not change the result." It stops short of describing the response shape or what an unknown-topic miss looks like, which keeps it below a 5.

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-loaded purpose sentence, then scope, then sibling routing, then a numbered invocation list — easy to scan. The four numbered examples and the maxTokens advice partially duplicate the input schema, costing a little density, but every line is actionable.

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?

A read-only guidance-retrieval tool with no output schema and zero required parameters; the description fully covers how to invoke it, how to disambiguate topic vs. query, how to bound response size, and which siblings handle adjacent needs. Nothing an agent needs to call it 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%, so all four parameters are already documented structurally; the baseline is 3. The description reinforces this with worked examples of topic vs. alias vs. query and repeats the 5000-10000 maxTokens recommendation verbatim from the schema, adding clarity but little new semantic information.

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?

States a specific verb and resource ("Load implementation guidance for SwiftUI and native Apple platform work") and enumerates the covered domains (layout/view composition, animation, gestures, Metal shaders, platform APIs). It explicitly distinguishes itself from siblings by naming get-ui-principle, get-ux-principle, and get-react-native-guide with the condition that selects each.

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?

Gives the operating moment ("while planning, building, or debugging"), four concrete invocation modes, and an explicit routing rule: "Prefer query search when you do not know the topic name" and use get-react-native-guide "when the target is React Native or Expo rather than native Swift." Exclusions and alternatives are both stated.

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