Skip to main content
Glama
ebowwa

Xcode MCP Server

by ebowwa

start_web_monitor

Launch a web interface to visually execute commands and monitor operations within the Xcode MCP Server for iOS/macOS project management.

Instructions

Start the web interface for visual command execution and monitoring

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP CallToolRequestSchema handler block that executes the 'start_web_monitor' tool by invoking WebMonitorManager.start() and formatting the response with the URL.
    if (name === 'start_web_monitor') {
      const result = await this.webMonitorManager.start();
      return {
        content: [
          {
            type: 'text',
            text: `${result.message}\n\nWeb interface available at: ${result.url}`
          }
        ]
      };
    }
  • Tool schema definition for 'start_web_monitor' including name, description, and empty input schema (no parameters required).
    {
      name: 'start_web_monitor',
      description: 'Start the web interface for visual command execution and monitoring',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      }
    },
  • src/index.ts:56-89 (registration)
    Defines the webMonitorTools array (including start_web_monitor) and registers them by including in the ListToolsRequestSchema response.
    // Add web monitor management tools
    const webMonitorTools = [
      {
        name: 'start_web_monitor',
        description: 'Start the web interface for visual command execution and monitoring',
        inputSchema: {
          type: 'object',
          properties: {},
          required: []
        }
      },
      {
        name: 'stop_web_monitor',
        description: 'Stop the web interface if it is running',
        inputSchema: {
          type: 'object',
          properties: {},
          required: []
        }
      },
      {
        name: 'web_monitor_status',
        description: 'Get the current status of the web monitor',
        inputSchema: {
          type: 'object',
          properties: {},
          required: []
        }
      }
    ];
    
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [...tools, ...webMonitorTools],
    }));
  • WebMonitorManager.start() method: core logic for starting the web monitor - finds available port, spawns web-server process, waits for startup, handles errors and cleanup.
    async start(): Promise<{ url: string; port: number; message: string }> {
      if (this.isRunning && this.webServerProcess) {
        return {
          url: `http://localhost:${this.port}`,
          port: this.port,
          message: 'Web monitor is already running'
        };
      }
    
      try {
        // Find an available port
        this.port = await this.findAvailablePort();
        
        // Spawn the web server process
        const webServerPath = join(__dirname, 'web-server.js');
        
        console.error(`[WebMonitor] Starting web server at ${webServerPath} on port ${this.port}`);
        
        this.webServerProcess = spawn('node', [webServerPath], {
          env: { ...process.env, PORT: this.port.toString() },
          stdio: ['ignore', 'pipe', 'pipe'],
          detached: false
        });
    
        // Wait for the "running at" message
        await new Promise<void>((resolve, reject) => {
          const timeout = setTimeout(() => {
            reject(new Error('Web server failed to start within timeout'));
          }, 5000);
    
          if (this.webServerProcess!.stdout) {
            this.webServerProcess!.stdout.on('data', (data) => {
              const output = data.toString();
              if (output.includes('running at')) {
                clearTimeout(timeout);
                resolve();
              }
            });
          }
    
          this.webServerProcess!.on('error', (err) => {
            clearTimeout(timeout);
            reject(err);
          });
    
          this.webServerProcess!.on('exit', (code) => {
            clearTimeout(timeout);
            reject(new Error(`Web server exited with code ${code}`));
          });
        });
    
        this.isRunning = true;
    
        // Handle process cleanup
        this.webServerProcess.on('exit', () => {
          this.isRunning = false;
          this.webServerProcess = null;
        });
    
        const url = `http://localhost:${this.port}`;
        return {
          url,
          port: this.port,
          message: `Web monitor started successfully at ${url}`
        };
      } catch (error) {
        this.stop();
        throw error;
      }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions starting a web interface but lacks details on permissions required, whether it runs in the background, potential side effects, or what 'visual command execution and monitoring' entails operationally. This is insufficient for a tool that likely initiates a service.

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, direct sentence that efficiently conveys the core action without any fluff or redundant phrasing. It is front-loaded and every word serves a purpose, making it highly concise and well-structured.

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 complexity of starting a web interface (a potentially stateful operation) and the lack of annotations and output schema, the description is incomplete. It doesn't explain what happens after starting, how to interact with the interface, or any behavioral outcomes, leaving significant gaps for an AI agent to understand the tool's full context.

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?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the inputs. The description doesn't need to add parameter details, and it appropriately avoids redundancy, earning a baseline score of 4 for not introducing unnecessary information.

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 ('Start') and the resource ('web interface for visual command execution and monitoring'), making the purpose evident. However, it doesn't explicitly differentiate from its sibling 'stop_web_monitor' or 'web_monitor_status', which would have required a more specific scope or condition to earn a 5.

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 like 'stop_web_monitor' or 'web_monitor_status', nor are any prerequisites or context for usage mentioned. The description only states what it does, not when it should be applied.

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

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