Skip to main content
Glama
concavegit

App Store Connect MCP Server

by concavegit

list_schemes

Retrieve all available build schemes from an Xcode project or workspace to configure development workflows and testing environments.

Instructions

List all available schemes in an Xcode project or workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesPath to the Xcode project (.xcodeproj) or workspace (.xcworkspace)

Implementation Reference

  • Handler function that validates the project path, executes xcodebuild -list command, parses the output using parseXcodebuildOutput, and returns formatted scheme list.
    async listSchemes(args: ListSchemesArgs): Promise<any> {
      const { projectPath } = args;
    
      if (!projectPath) {
        throw new Error('Project path is required');
      }
    
      if (!existsSync(projectPath)) {
        throw new Error(`Project path does not exist: ${projectPath}`);
      }
    
      const stats = statSync(projectPath);
      if (!stats.isDirectory()) {
        throw new Error(`Project path is not a directory: ${projectPath}`);
      }
    
      const isWorkspace = projectPath.endsWith('.xcworkspace');
      const isProject = projectPath.endsWith('.xcodeproj');
    
      if (!isWorkspace && !isProject) {
        throw new Error('Project path must be either a .xcworkspace or .xcodeproj file');
      }
    
      try {
        const command = isWorkspace 
          ? `xcodebuild -workspace "${projectPath}" -list`
          : `xcodebuild -project "${projectPath}" -list`;
    
        const { stdout, stderr } = await execAsync(command);
    
        if (stderr && stderr.trim() !== '') {
          console.error('xcodebuild stderr:', stderr);
        }
    
        const schemes = this.parseXcodebuildOutput(stdout);
        
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                projectPath,
                projectType: isWorkspace ? 'workspace' : 'project',
                schemes,
                totalSchemes: schemes.length
              }, null, 2)
            }
          ]
        };
      } catch (error: any) {
        throw new Error(`Failed to list schemes: ${error.message}`);
      }
    }
  • Private helper method to parse xcodebuild -list output and extract scheme names and shared status.
    private parseXcodebuildOutput(output: string): SchemeInfo[] {
      const lines = output.split('\n');
      const schemes: SchemeInfo[] = [];
      let inSchemesSection = false;
    
      for (const line of lines) {
        const trimmedLine = line.trim();
        
        if (trimmedLine === 'Schemes:') {
          inSchemesSection = true;
          continue;
        }
    
        if (inSchemesSection) {
          if (trimmedLine === '' || trimmedLine.startsWith('Build Configurations:') || trimmedLine.startsWith('If no build configuration')) {
            break;
          }
    
          if (trimmedLine && !trimmedLine.startsWith('Information about project')) {
            const isShared = !trimmedLine.startsWith('    ');
            const schemeName = trimmedLine.trim();
            
            if (schemeName) {
              schemes.push({
                name: schemeName,
                isShared
              });
            }
          }
        }
      }
    
      return schemes;
    }
  • TypeScript interface defining the input arguments for listSchemes handler (projectPath: string).
    export interface ListSchemesArgs {
      projectPath: string;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are present, so the description carries the full burden. It does not disclose whether the tool is read-only, requires specific project conditions, or has side effects. The behavioral transparency is insufficient.

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 sentence of 10 words with no superfluous information. It is maximally concise.

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 simple list tool with one parameter and no output schema, the description covers the core functionality. However, it could be improved by specifying the expected return type (e.g., list of scheme names) or error conditions, but it is still largely complete.

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% for the single parameter, which is clearly documented in the schema as the path to .xcodeproj or .xcworkspace. The tool description adds no extra context beyond the schema, so a baseline of 3 is appropriate.

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 clearly states the verb 'List' and the resource 'schemes' within the context of an Xcode project or workspace. It is specific and distinguishes from sibling tools, as no other sibling tool lists schemes.

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?

No guidance is provided on when to use this tool versus alternatives, prerequisites, or potential errors. The description is purely functional.

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