Skip to main content
Glama
drewster99

xcode-mcp-server (drewster99)

by drewster99

get_active_run_destination

Read-onlyIdempotent

Retrieves the active run destination (device or simulator) for an Xcode project or workspace by reading the workspace state file without opening Xcode.

Instructions

Get the currently active run destination for a project.

Returns the device or simulator that Xcode will use for the next build or run operation. This reads from Xcode's workspace state file without opening the project in Xcode.

Note: After calling set_run_destination, Xcode may take several seconds to flush its state to disk. If called immediately after set_run_destination, this may return the previous destination.

Args: project_path: Path to an Xcode project (.xcodeproj) or workspace (.xcworkspace).

Returns: JSON with the active destination's name, platform, architecture, and id. Returns an error message if the active destination cannot be determined (e.g. the project has never been opened in Xcode).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint, destructiveHint, idempotentHint. Description adds value by stating it reads from Xcode's workspace state file without opening the project, and discloses the timing behavior (possible lag after set_run_destination). No contradiction with annotations.

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?

Concise with front-loaded purpose, followed by explanation of behavior, parameters, and return value. Each sentence adds value, no redundancy. Could be slightly tighter but well-structured.

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?

Given the tool's simplicity (one parameter, read-only, good annotations), the description covers purpose, behavioral nuance, parameter specification, and return format (including error case). Adequately complete for an agent to use correctly.

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 0% (no parameter description in schema). Description compensates by explaining project_path accepts .xcodeproj or .xcworkspace paths, adding meaning beyond the schema's type-only definition.

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?

Clearly states it gets the currently active run destination for a project. Differentiates from siblings by noting it reads from workspace state file without opening project, but does not explicitly contrast with list_run_destinations or set_run_destination.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit context on when to use (to get active destination for next build/run). Includes important timing guidance about potential staleness after set_run_destination, but does not explicitly mention when not to use or list alternatives.

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/drewster99/xcode-mcp-server'

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