Skip to main content
Glama

Find Apple Swift patterns

apple_swift_pattern_find
Read-onlyIdempotent

Find repeated implementation and product patterns across WWDC sessions, Apple docs, tutorials, HIG, and Swift Evolution to guide API adoption, app architecture, and opportunity discovery.

Instructions

Find repeated implementation/product patterns across indexed WWDC sessions, Apple docs, tutorials, HIG, and Swift Evolution. Use for API adoption, app architecture, and opportunity discovery.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "apple_swift_pattern_find"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
queryYesPattern area, API, feature, or product need, e.g. `App Intents Spotlight actions` or `SwiftData migration`.
formatNoResponse formatmarkdown
year_minNo
platformsNo
frameworksNo
min_source_kindsNoMinimum distinct source kinds required for a strong pattern.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.2.3
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / query / maxLength
      Added value: +500
    • addedInput schema / properties / year_min / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / year_min / minimum
      Added value: +-9007199254740991
  2. First observedv0.2.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description adds the useful fact that results are aggregated across heterogeneous sources, but says nothing about ranking, result volume, or how 'pattern strength' is computed even though min_source_kinds implies a thresholding mechanism.

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?

Two tight sentences with the resource and scope front-loaded and no filler. It is efficient, though 'patterns' remains a somewhat elastic term that a clause of concretization could have sharpened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter, cross-corpus discovery tool with no output schema and 43% parameter coverage, the definition is thin: the agent learns what is searched but not what a returned 'pattern' looks like or how results are ordered. It is adequate to attempt a call but leaves real ambiguity about output shape.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 43% across 7 parameters: limit, year_min, platforms, and frameworks have no schema descriptions at all. The description mentions no parameters, so it does not compensate for those gaps or explain the interaction between min_source_kinds and the multi-source claim.

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?

The description pairs a specific verb ('Find') with a specific resource ('repeated implementation/product patterns') and enumerates the corpora searched (WWDC sessions, Apple docs, tutorials, HIG, Swift Evolution). That cross-source framing implicitly separates it from single-source siblings like apple_doc_get or wwdc_search, though it never names an alternative explicitly.

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?

It lists three usage contexts (API adoption, app architecture, opportunity discovery), which gives the agent a sense of when the tool fits. However, there is no guidance on when NOT to use it, and no routing to narrower siblings such as wwdc_search or apple_hig_search when the agent already knows the source it wants.

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