Skip to main content
Glama
ebowwa
by ebowwa

xcode_modify_plist

Update specific values in a plist file by specifying the file path, key, and new value. Streamline iOS/macOS project configurations directly through programmatic access to Xcode functionality.

Instructions

Modify a value in a plist file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesPlist key to modify
plist_pathYesPath to the plist file
valueYesNew value for the key

Implementation Reference

  • Core handler function that executes the PlistBuddy command to set a key-value pair in a plist file.
    async modifyPlist(plistPath: string, key: string, value: string): Promise<void> { // Use PlistBuddy to modify plist files const command = `/usr/libexec/PlistBuddy -c "Set :${key} ${value}" "${plistPath}"`; await execAsync(command); }
  • Internal command handler that calls fileManager.modifyPlist for the 'modify_plist' command.
    case 'modify_plist': await this.fileManager.modifyPlist(args.plist_path, args.key, args.value); output = `Plist modified successfully: ${args.key} = ${args.value}`; break;
  • MCP CallToolRequestSchema handler that strips 'xcode_' prefix from tool name and dispatches to commandExecutor.executeCommand for execution.
    // Handle Xcode commands // Remove 'xcode_' prefix if present const commandName = name.startsWith('xcode_') ? name.slice(6) : name; const result = await this.commandExecutor.executeCommand(commandName, args); let responseText = result.output; if (result.error) { responseText += `\n\nWarnings/Errors:\n${result.error}`; } if (!result.success) { responseText = `Command failed: ${result.error}\n\nCommand executed: ${result.command}`; } return { content: [ { type: 'text', text: responseText, }, ], }; } catch (error) {
  • Dynamically generates MCP tool schema (inputSchema, name as `xcode_${commandName}`, description) from loaded commands.json definitions.
    return Object.entries(this.commands).map(([name, command]) => ({ name: `xcode_${name}`, description: command.description, inputSchema: { type: 'object', properties: command.parameters ? Object.fromEntries( Object.entries(command.parameters).map(([paramName, paramDef]) => [ paramName, { type: paramDef.type, description: paramDef.description, ...(paramDef.default !== undefined && { default: paramDef.default }) } ]) ) : {}, required: command.parameters ? Object.entries(command.parameters) .filter(([_, paramDef]) => paramDef.required) .map(([paramName]) => paramName) : [] } }));
  • src/index.ts:87-89 (registration)
    Registers the dynamically generated tool list (including xcode_modify_plist) with the MCP server for ListTools requests.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [...tools, ...webMonitorTools], }));

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