Skip to main content
Glama

Review test suite quality

review_swift_testing

Check a Swift test suite for defects that make it unreliable or vacuous, including sleeps, missing assertions, unsafe async, and static state. Use when tests are flaky or before trusting green results.

Instructions

Check a Swift test suite for defects that make it unreliable or vacuous: tests that wait by sleeping, tests with no assertion at all, await inside an XCTAssert autoclosure (which does not compile), live URLSession calls in tests, try!, static mutable state that makes results order-dependent, long expectation timeouts covering for races, and XCTAssertTrue on an equality that hides both values on failure. Also reports when a project has no tests or very few. Use when tests are flaky, before trusting a green suite, or when adding coverage.

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.5/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden, and it does that well by listing exactly what it detects, including the no-tests edge case and the compile-issue detail about `await` in XCTAssert autoclosure. It does not explicitly state whether it modifies anything or whether it is purely read-only, but 'Check' and 'reports' strongly imply a non-mutating analysis tool.

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 long, but every clause names a distinct, valuable defect category or usage condition. It front-loads the core purpose and then elaborates with specifics that help an agent decide and invoke correctly. There is no filler or repetition.

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?

For a static review tool with one fully described parameter, the description is complete: it states the object of analysis, the defect categories checked, the scenario in which to use it, and the edge case of missing tests. Since an output schema exists, the absence of return-format details is acceptable.

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 input schema already fully documents the `path` parameter. The description adds useful context that `path` should be the Swift project root, but the parameter-level meaning is already clear from the schema; the description does not need to do heavy lifting here.

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 uses a specific verb ('Check') and a specific resource ('a Swift test suite'), then enumerates concrete defect categories, making it unmistakable what the tool does. It clearly positions itself as a review/analysis tool rather than a test runner like run_tests, and the specific defect list distinguishes it from sibling review tools.

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 when to use it: 'Use when tests are flaky, before trusting a green suite, or when adding coverage.' These are actionable triggering conditions. It also implicitly sets it apart from run_tests and other review_swift_* tools by focusing on test-suite reliability rather than execution or general architecture.

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