-
-
Notifications
You must be signed in to change notification settings - Fork 205
Description
Description
xcodebuildmcp ui-automation snapshot-ui crashes when using the default text output format. The snapshot itself succeeds, but the CLI renderer throws when formatting the "next steps" section because the tap_coordinate tool entry is missing a cliTool mapping.
Version
xcodebuildmcp@2.0.7
node v24.13.0
macOS
Steps to Reproduce
- Boot a simulator
- Launch any app
- Run:
xcodebuildmcp ui-automation snapshot-ui --simulator-id <UDID>
Expected Behavior
The UI hierarchy prints successfully with suggested next steps.
Actual Behavior
Exit code 1 with:
Error: Next step for tool 'tap_coordinate' is missing cliTool - ensure enrichNextStepsForCli was called
at formatNextStepForCli (…/next-steps-renderer.js:6:11)
at renderNextStep (…/next-steps-renderer.js:41:41)
at …/next-steps-renderer.js:49:62
at Array.map (<anonymous>)
at renderNextStepsSection (…/next-steps-renderer.js:49:24)
at processToolResponse (…/next-steps-renderer.js:60:28)
at printToolResponse (…/cli/output.js:8:21)
at Object.handler (…/cli/register-tool-commands.js:120:7)
Workaround
Using --output json bypasses the text renderer and returns the hierarchy successfully:
xcodebuildmcp ui-automation snapshot-ui --simulator-id <UDID> --output jsonRoot Cause (likely)
In next-steps-renderer.js, formatNextStepForCli expects every next-step tool to have a cliTool property. The tap_coordinate entry returned by snapshot-ui is missing this mapping — it wasn't added in enrichNextStepsForCli.
The fix is likely adding cliTool: "tap" (or the correct CLI command name) to the tap_coordinate tool mapping in the enrichment step.