From 3e75fb5afc9db42a541fe4bde7d4437fcf7d1109 Mon Sep 17 00:00:00 2001 From: Quang Tran <16215255+trmquang93@users.noreply.github.com> Date: Sun, 29 Mar 2026 03:54:14 +0700 Subject: [PATCH] Fix build_device next step suggesting unsupported --device-id flag (#287) The list_devices tool included deviceId in nextStepParams for build_device, but build_device does not accept a deviceId parameter (it builds generically for the iOS device platform). This caused the CLI to render an invalid suggestion like: xcodebuildmcp device build --device-id "DEVICE_UDID" Remove deviceId from build_device's nextStepParams. The build_run_device and test_device entries correctly retain deviceId since those tools require it. --- src/mcp/tools/device/__tests__/list_devices.test.ts | 2 +- src/mcp/tools/device/list_devices.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mcp/tools/device/__tests__/list_devices.test.ts b/src/mcp/tools/device/__tests__/list_devices.test.ts index 927da5a1..3bcbf5ad 100644 --- a/src/mcp/tools/device/__tests__/list_devices.test.ts +++ b/src/mcp/tools/device/__tests__/list_devices.test.ts @@ -217,7 +217,7 @@ describe('list_devices plugin (device-shared)', () => { expect(text).toContain('Test iPhone'); expect(text).toContain('test-device-123'); expect(result.nextStepParams).toEqual({ - build_device: { scheme: 'YOUR_SCHEME', deviceId: 'UUID_FROM_ABOVE' }, + build_device: { scheme: 'YOUR_SCHEME' }, install_app_device: { deviceId: 'UUID_FROM_ABOVE', appPath: 'PATH_TO_APP' }, }); }); diff --git a/src/mcp/tools/device/list_devices.ts b/src/mcp/tools/device/list_devices.ts index f8e69371..c6131a01 100644 --- a/src/mcp/tools/device/list_devices.ts +++ b/src/mcp/tools/device/list_devices.ts @@ -18,7 +18,7 @@ type ListDevicesParams = z.infer; type ListDevicesResult = DeviceListDomainResult; const NEXT_STEP_PARAMS = { - build_device: { scheme: 'YOUR_SCHEME', deviceId: 'UUID_FROM_ABOVE' }, + build_device: { scheme: 'YOUR_SCHEME' }, install_app_device: { deviceId: 'UUID_FROM_ABOVE', appPath: 'PATH_TO_APP' }, } as const;