Skip to main content
Glama

Check iOS availability guards

check_availability_guards

Verify that version-gated Apple APIs are guarded at their introduction version, not the newest SDK, to catch missing or over-restrictive availability checks before shipping.

Instructions

Verify that version-gated Apple APIs are guarded on the version where they were INTRODUCED rather than the newest SDK. Catches both missing guards and over-restrictive ones — for example Liquid Glass (iOS 26) guarded at iOS 27, which silently drops every iOS 26 device to the fallback. Also flags Foundation Models used without a runtime SystemLanguageModel.availability check. Use before shipping, or after bumping an SDK.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the Swift project root (the folder containing Package.swift or the .xcodeproj).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
scoreYes0-100 defect density. 100 = no findings. penalty = 10*blockers + 3*serious + 1*minor; capacity = files*10. Comparable across runs on ONE project, not between projects.
countsYes
issuesYesEvery finding, most severe first.
summaryYesOne-line plain-language result.
suggestionsYesPrioritized next actions, deduplicated by rule — not a restatement of every issue's fix.
files_checkedYesSwift files actually scanned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.7.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains what the tool catches (missing guards, over-restrictive guards, missing runtime availability checks) and the consequence of the bug it detects (silently dropping iOS 26 devices to fallback). It doesn't state whether the tool modifies code or only reports findings, but the verb 'Verify' and 'Catches' imply a read-only analysis, which is reasonably transparent.

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?

The description is compact and front-loaded: the first sentence states the core purpose, the second gives a concrete example, and the third adds usage timing. Every sentence earns its place, and there is no redundant restating of the tool name or title.

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?

For a single-parameter analysis tool with an output schema present, the description covers the key context: what it checks, why it matters, and when to use it. It doesn't detail the output format, but the output schema exists and the description needn't explain return values. The only minor gap is not stating whether it performs read-only analysis, but 'Verify' and 'Catches' strongly imply that.

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 the schema already documents the single 'path' parameter. The description adds context by implying the path is a Swift project root, but it doesn't add meaning beyond the schema's own description. Baseline 3 is appropriate when the schema does the heavy lifting.

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 states a specific verb ('Verify') and resource ('version-gated Apple APIs'), and clearly distinguishes the tool's purpose from siblings like review_swift_concurrency or audit_app_store_readiness by focusing on guard placement relative to the introduced version. It also names concrete examples (Liquid Glass iOS 26 vs 27) that make the purpose unmistakable.

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?

The description explicitly says 'Use before shipping, or after bumping an SDK,' which gives clear timing context. It also contrasts with alternatives implicitly by naming what it checks (availability guards and Foundation Models runtime checks), and the sibling list shows other review tools exist, making this guidance valuable for selection.

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