Skip to main content
Glama

xcode_stop

Stop the current build or scheme action in Xcode for a specified project file to halt ongoing processes.

Instructions

Stop the current scheme action for a specific project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xcodeprojYesAbsolute path to the .xcodeproj file (or .xcworkspace if available) - e.g., /path/to/project.xcodeproj

Implementation Reference

  • Core handler function that executes the JXA script to invoke Xcode's workspace.stop() method, stopping the current build/run/test action.
    public static async stop(projectPath: string): Promise<McpResult> {
      const script = `
        (function() {
          ${getWorkspaceByPathScript(projectPath)}
          
          workspace.stop();
          return 'Stop command sent';
        })()
      `;
      
      const result = await JXAExecutor.execute(script);
      return { content: [{ type: 'text', text: result }] };
    }
  • MCP server dispatch handler in CallToolRequestSchema switch statement that validates input and delegates to BuildTools.stop.
    case 'xcode_stop':
      if (!args.xcodeproj) {
        return { content: [{ type: 'text', text: 'Error: xcodeproj parameter is required' }] };
      }
      return await BuildTools.stop(args.xcodeproj as string);
  • Tool schema definition providing name, description, and input validation schema (requires xcodeproj path).
    {
      name: 'xcode_stop',
      description: 'Stop the current scheme action for a specific project',
      inputSchema: {
        type: 'object',
        properties: {
          xcodeproj: {
            type: 'string',
            description: preferredXcodeproj 
              ? `Absolute path to the .xcodeproj file (or .xcworkspace if available) - defaults to ${preferredXcodeproj}`
              : 'Absolute path to the .xcodeproj file (or .xcworkspace if available) - e.g., /path/to/project.xcodeproj',
          },
        },
        required: preferredXcodeproj ? [] : ['xcodeproj'],
      },
    },
  • Registers xcode_stop tool (via getToolDefinitions) for the MCP ListToolsRequestSchema, making it discoverable by clients.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      const toolOptions: {
        includeClean: boolean;
        preferredScheme?: string;
        preferredXcodeproj?: string;
      } = { includeClean: this.includeClean };
      
      if (this.preferredScheme) toolOptions.preferredScheme = this.preferredScheme;
      if (this.preferredXcodeproj) toolOptions.preferredXcodeproj = this.preferredXcodeproj;
      
      const toolDefinitions = getToolDefinitions(toolOptions);
      return {
        tools: toolDefinitions.map(tool => ({
          name: tool.name,
          description: tool.description,
          inputSchema: tool.inputSchema
        })),
      };
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool stops a 'current scheme action,' implying it terminates an ongoing process, but lacks details on permissions needed, side effects (e.g., whether it saves state or causes data loss), error handling, or what happens if no action is running. This is a significant gap for a mutation tool with zero annotation coverage.

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 a single, clear sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and efficiently conveys the core action, making it easy for an agent to parse and understand quickly.

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's complexity as a mutation operation (stopping an action), lack of annotations, and no output schema, the description is incomplete. It does not cover behavioral aspects like safety, error conditions, or what the tool returns, which are critical for an agent to use it correctly in context with sibling tools.

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%, with the single parameter 'xcodeproj' fully documented in the schema as an absolute path to the project file. The description does not add any meaning beyond this, such as explaining why this path is needed or how it relates to stopping the action, so it meets the baseline score when schema coverage is high.

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 action ('Stop') and the target ('the current scheme action for a specific project'), which is specific and unambiguous. However, it does not explicitly differentiate this tool from siblings like 'xcode_close_project' or 'xcode_clean', which might also involve stopping or closing operations, leaving some ambiguity in sibling context.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., that a scheme action must be running), exclusions, or comparisons to sibling tools like 'xcode_close_project' or 'xcode_clean', leaving the agent to infer usage context solely from the tool name and description.

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