Skip to main content
Glama

xcode_test

Execute test suites for an Xcode project. Optionally run specific test methods or classes by temporarily altering the test plan, automatically restored afterward. Supports XCTest and Swift Testing frameworks.

Instructions

Run tests for a specific project. Optionally run only specific tests or test classes by temporarily modifying the test plan (automatically restored after completion). ⏱️ Can take minutes to hours - do not timeout.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xcodeprojYesAbsolute path to the .xcodeproj file (or .xcworkspace if available) - e.g., /path/to/project.xcodeproj
destinationYesTest destination (required for predictable test environments) - e.g., "iPhone 15 Pro Simulator", "iPad Air Simulator"
command_line_argumentsNoAdditional command line arguments
test_plan_pathNoOptional: Absolute path to .xctestplan file to temporarily modify for selective test execution
selected_testsNoOptional: Array of specific test identifiers to run. Format depends on test framework: XCTest: "TestAppUITests/testExample" (no parentheses), Swift Testing: "TestAppTests/example". Requires test_plan_path.
selected_test_classesNoOptional: Array of test class names to run (e.g., ["TestAppTests", "TestAppUITests"]). This runs ALL tests in the specified classes. Requires test_plan_path.
test_target_identifierNoOptional: Target identifier for the test target (required when using test filtering). Can be found in project.pbxproj.
test_target_nameNoOptional: Target name for the test target (alternative to test_target_identifier). Example: "TestAppTests".
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. It explicitly warns about long runtimes ('Can take minutes to hours - do not timeout') and mentions the automatic restoration of the test plan after temporary modification. These are key behavioral traits. It doesn't cover all possible side effects (e.g., console output, result storage), but the critical aspects are addressed.

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?

The description is two sentences: a clear statement of purpose followed by a behavioral warning. It is front-loaded with the core function. However, the first sentence is a bit run-on, combining multiple ideas. No unnecessary words, but could be slightly refined for clarity.

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

Completeness2/5

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

Given the tool has 8 parameters, no annotations, and no output schema, the description should provide more context. It lacks information about the return value (e.g., test results, exit status), prerequisites (e.g., scheme must be set, simulator availability), and error handling. The long runtime warning is helpful, but overall the description leaves significant gaps for an agent to correctly interpret the tool's full behavior.

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 100% (all 8 parameters have descriptions). The tool description adds value beyond the schema by explaining the purpose of the test plan modification (temporary, auto-restored) and clarifying the format for selected_tests depending on the test framework. This provides meaningful context that aids correct parameter usage.

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 clearly states the tool runs tests for a specific project, with optional selective test execution by temporarily modifying the test plan. While it distinguishes from siblings like xcode_build or xcode_debug by focusing on testing, it does not explicitly differentiate from other test-related tools on the same server (e.g., no direct comparison with xcresult-related tools, but those are for result analysis). The verb 'Run tests' is specific and well-defined.

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?

The description indicates usage for running tests and optionally filtering specific tests or classes, providing guidance on when to use these features. However, it lacks explicit 'when not to use' scenarios or comparisons with alternative tools like xcode_build_and_run or xcode_debug. The guidance is implied rather than direct.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lapfelix/XcodeMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server