Skip to content

Commit 45f242e

Browse files
committed
refactor: Migrate next-steps to manifest-driven templates
Move next-step definitions from inline tool logic into YAML manifests using a new nextStepTemplates system. Templates support static params, ${arg} substitution, and runtime merging with dynamic response params. Removes hardcoded next-step construction from individual tool handlers.
1 parent 279efaa commit 45f242e

78 files changed

Lines changed: 1288 additions & 1172 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NEXT_STEPS_MIGRATION_TODO.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Next Steps Migration TODO
2+
3+
Generated: 2026-02-11 19:12:27 UTC
4+
5+
## Remaining tool files with inline nextSteps
6+
- [x] src/mcp/tools/debugging/debug_attach_sim.ts:148
7+
- [x] src/mcp/tools/device/get_device_app_path.ts:140
8+
- [x] src/mcp/tools/device/launch_app_device.ts:135
9+
- [x] src/mcp/tools/device/list_devices.ts:391
10+
- [x] src/mcp/tools/logging/start_device_log_cap.ts:665
11+
- [x] src/mcp/tools/logging/start_sim_log_cap.ts:81
12+
- [x] src/mcp/tools/macos/get_mac_app_path.ts:167
13+
- [x] src/mcp/tools/project-discovery/get_app_bundle_id.ts:91
14+
- [x] src/mcp/tools/project-discovery/get_mac_bundle_id.ts:88
15+
- [x] src/mcp/tools/project-discovery/list_schemes.ts:83
16+
- [x] src/mcp/tools/project-discovery/show_build_settings.ts:88
17+
- [x] src/mcp/tools/project-scaffolding/scaffold_ios_project.ts:366
18+
- [x] src/mcp/tools/project-scaffolding/scaffold_macos_project.ts:340
19+
- [x] src/mcp/tools/simulator/boot_sim.ts:69
20+
- [x] src/mcp/tools/simulator/build_run_sim.ts:486
21+
- [x] src/mcp/tools/simulator/get_sim_app_path.ts:244
22+
- [x] src/mcp/tools/simulator/install_app_sim.ts:93
23+
- [x] src/mcp/tools/simulator/launch_app_logs_sim.ts:100
24+
- [x] src/mcp/tools/simulator/launch_app_sim.ts:127
25+
- [x] src/mcp/tools/simulator/list_sims.ts:196
26+
- [x] src/mcp/tools/simulator/open_sim.ts:42
27+
- [x] src/mcp/tools/simulator/record_sim_video.ts:130

manifests/tools/boot_sim.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,19 @@ description: Boot iOS simulator.
77
annotations:
88
title: Boot Simulator
99
destructiveHint: true
10+
nextSteps:
11+
- label: Open the Simulator app (makes it visible)
12+
toolId: open_sim
13+
priority: 1
14+
- label: Install an app
15+
toolId: install_app_sim
16+
params:
17+
simulatorId: ${simulatorId}
18+
appPath: PATH_TO_YOUR_APP
19+
priority: 2
20+
- label: Launch an app
21+
toolId: launch_app_sim
22+
params:
23+
simulatorId: ${simulatorId}
24+
bundleId: YOUR_APP_BUNDLE_ID
25+
priority: 3

manifests/tools/build_run_sim.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,13 @@ predicates:
99
annotations:
1010
title: Build Run Simulator
1111
destructiveHint: true
12+
nextSteps:
13+
- label: Capture structured logs (app continues running)
14+
toolId: start_sim_log_cap
15+
priority: 1
16+
- label: Capture console + structured logs (app restarts)
17+
toolId: start_sim_log_cap
18+
priority: 2
19+
- label: Launch app with logs in one step
20+
toolId: launch_app_logs_sim
21+
priority: 3

manifests/tools/debug_attach_sim.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,13 @@ names:
66
description: Attach LLDB to sim app.
77
routing:
88
stateful: true
9+
nextSteps:
10+
- label: Add a breakpoint
11+
toolId: debug_breakpoint_add
12+
priority: 1
13+
- label: Continue execution
14+
toolId: debug_continue
15+
priority: 2
16+
- label: Show call stack
17+
toolId: debug_stack
18+
priority: 3

manifests/tools/get_app_bundle_id.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,16 @@ description: Extract bundle id from .app.
77
annotations:
88
title: Get App Bundle ID
99
readOnlyHint: true
10+
nextSteps:
11+
- label: Install on simulator
12+
toolId: install_app_sim
13+
priority: 1
14+
- label: Launch on simulator
15+
toolId: launch_app_sim
16+
priority: 2
17+
- label: Install on device
18+
toolId: install_app_device
19+
priority: 3
20+
- label: Launch on device
21+
toolId: launch_app_device
22+
priority: 4

manifests/tools/get_device_app_path.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,13 @@ description: Get device built app path.
77
annotations:
88
title: Get Device App Path
99
readOnlyHint: true
10+
nextSteps:
11+
- label: Get bundle ID
12+
toolId: get_app_bundle_id
13+
priority: 1
14+
- label: Install app on device
15+
toolId: install_app_device
16+
priority: 2
17+
- label: Launch app on device
18+
toolId: launch_app_device
19+
priority: 3

manifests/tools/get_mac_app_path.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ description: Get macOS built app path.
77
annotations:
88
title: Get macOS App Path
99
readOnlyHint: true
10+
nextSteps:
11+
- label: Get bundle ID
12+
toolId: get_mac_bundle_id
13+
priority: 1
14+
- label: Launch app
15+
toolId: launch_mac_app
16+
priority: 2

manifests/tools/get_mac_bundle_id.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ description: Extract bundle id from macOS .app.
77
annotations:
88
title: Get Mac Bundle ID
99
readOnlyHint: true
10+
nextSteps:
11+
- label: Launch the app
12+
toolId: launch_mac_app
13+
priority: 1
14+
- label: Build again
15+
toolId: build_macos
16+
priority: 2

manifests/tools/get_sim_app_path.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,16 @@ description: Get sim built app path.
77
annotations:
88
title: Get Simulator App Path
99
readOnlyHint: true
10+
nextSteps:
11+
- label: Get bundle ID
12+
toolId: get_app_bundle_id
13+
priority: 1
14+
- label: Boot simulator
15+
toolId: boot_sim
16+
priority: 2
17+
- label: Install app
18+
toolId: install_app_sim
19+
priority: 3
20+
- label: Launch app
21+
toolId: launch_app_sim
22+
priority: 4

manifests/tools/install_app_sim.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ description: Install app on sim.
77
annotations:
88
title: Install App Simulator
99
destructiveHint: true
10+
nextSteps:
11+
- label: Open the Simulator app
12+
toolId: open_sim
13+
priority: 1
14+
- label: Launch the app
15+
toolId: launch_app_sim
16+
priority: 2

0 commit comments

Comments
 (0)