Skip to main content
Glama
devyhan
by devyhan

xcode-list-schemes

Retrieve all available build schemes from an Xcode project or workspace by specifying its path, enabling efficient project configuration and management.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesXcode 프로젝트 또는 워크스페이스 경로

Implementation Reference

  • The handler function that executes the core logic of the 'xcode-list-schemes' tool: determines if the path is a workspace or project, runs 'xcodebuild -list', captures stdout/stderr, formats the output, and handles errors.
    async ({ projectPath }) => { try { console.error(`Xcode 스킴 목록 조회: ${projectPath}`); // 워크스페이스인지 프로젝트인지 확인 let command; if (projectPath.endsWith(".xcworkspace")) { command = `xcodebuild -list -workspace "${projectPath}"`; } else { command = `xcodebuild -list -project "${projectPath}"`; } try { const { stdout, stderr } = await executeCommand(command); let resultText = "Xcode 스킴 및 타겟 목록:\n"; if (stdout) resultText += `${stdout}\n`; if (stderr) resultText += `${stderr}\n`; return { content: [{ type: "text", text: resultText }] }; } catch (error: any) { throw error; } } catch (error: any) { console.error(`스킴 목록 조회 오류: ${error.message}`); return { content: [{ type: "text", text: `스킴 목록을 조회하는 중 오류가 발생했습니다:\n${error.message}\n${error.stderr || ''}` }], isError: true }; } }
  • Zod input schema defining the required 'projectPath' parameter for the tool.
    { projectPath: z.string().describe("Xcode 프로젝트 또는 워크스페이스 경로") },
  • src/index.ts:161-203 (registration)
    Registration of the 'xcode-list-schemes' tool on the MCP server using server.tool(name, schema, handler).
    server.tool( "xcode-list-schemes", { projectPath: z.string().describe("Xcode 프로젝트 또는 워크스페이스 경로") }, async ({ projectPath }) => { try { console.error(`Xcode 스킴 목록 조회: ${projectPath}`); // 워크스페이스인지 프로젝트인지 확인 let command; if (projectPath.endsWith(".xcworkspace")) { command = `xcodebuild -list -workspace "${projectPath}"`; } else { command = `xcodebuild -list -project "${projectPath}"`; } try { const { stdout, stderr } = await executeCommand(command); let resultText = "Xcode 스킴 및 타겟 목록:\n"; if (stdout) resultText += `${stdout}\n`; if (stderr) resultText += `${stderr}\n`; return { content: [{ type: "text", text: resultText }] }; } catch (error: any) { throw error; } } catch (error: any) { console.error(`스킴 목록 조회 오류: ${error.message}`); return { content: [{ type: "text", text: `스킴 목록을 조회하는 중 오류가 발생했습니다:\n${error.message}\n${error.stderr || ''}` }], isError: true }; } } );

Other Tools

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

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