Skip to content

Commit f257016

Browse files
committed
feat: add visibility hints to boot and launch simulator tools
- Updated boot_sim description to mention using open_sim() after booting - Updated launch_app_sim and launch_app_sim_name descriptions to hint about open_sim() - Modified success messages in boot_sim and launch_app_sim to prominently suggest open_sim() - Kept hints concise to preserve context while ensuring agents remember to make simulator visible
1 parent 0d6cb4a commit f257016

3 files changed

Lines changed: 15 additions & 27 deletions

File tree

src/mcp/tools/simulator/boot_sim.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,12 @@ export async function boot_simLogic(
3838
content: [
3939
{
4040
type: 'text',
41-
text: `Simulator booted successfully. Next steps:
42-
1. Open the Simulator app: open_sim({ enabled: true })
41+
text: `✅ Simulator booted successfully. To make it visible, use: open_sim()
42+
43+
Next steps:
44+
1. Open the Simulator app (makes it visible): open_sim()
4345
2. Install an app: install_app_sim({ simulatorUuid: "${params.simulatorUuid}", appPath: "PATH_TO_YOUR_APP" })
44-
3. Launch an app: launch_app_sim({ simulatorUuid: "${params.simulatorUuid}", bundleId: "YOUR_APP_BUNDLE_ID" })
45-
4. Log capture options:
46-
- Option 1: Capture structured logs only (app continues running):
47-
start_sim_log_cap({ simulatorUuid: "${params.simulatorUuid}", bundleId: "YOUR_APP_BUNDLE_ID" })
48-
- Option 2: Capture both console and structured logs (app will restart):
49-
start_sim_log_cap({ simulatorUuid: "${params.simulatorUuid}", bundleId: "YOUR_APP_BUNDLE_ID", captureConsole: true })
50-
- Option 3: Launch app with logs in one step:
51-
launch_app_logs_sim({ simulatorUuid: "${params.simulatorUuid}", bundleId: "YOUR_APP_BUNDLE_ID" })`,
46+
3. Launch an app: launch_app_sim({ simulatorUuid: "${params.simulatorUuid}", bundleId: "YOUR_APP_BUNDLE_ID" })`,
5247
},
5348
],
5449
};
@@ -69,7 +64,7 @@ export async function boot_simLogic(
6964
export default {
7065
name: 'boot_sim',
7166
description:
72-
"Boots an iOS simulator. IMPORTANT: You MUST provide the simulatorUuid parameter. Example: boot_sim({ simulatorUuid: 'YOUR_UUID_HERE' })",
67+
"Boots an iOS simulator. After booting, use open_sim() to make the simulator visible. IMPORTANT: You MUST provide the simulatorUuid parameter. Example: boot_sim({ simulatorUuid: 'YOUR_UUID_HERE' })",
7368
schema: bootSimSchema.shape, // MCP SDK compatibility
7469
handler: createTypedTool(bootSimSchema, boot_simLogic, getDefaultCommandExecutor),
7570
};

src/mcp/tools/simulator/launch_app_sim.ts

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -159,21 +159,14 @@ export async function launch_app_simLogic(
159159
content: [
160160
{
161161
type: 'text',
162-
text: `App launched successfully in simulator ${simulatorDisplayName || simulatorUuid}`,
163-
},
164-
{
165-
type: 'text',
166-
text: `Next Steps:
167-
1. You can now interact with the app in the simulator.
162+
text: `✅ App launched successfully in simulator ${simulatorDisplayName || simulatorUuid}. If simulator window isn't visible, use: open_sim()
163+
164+
Next Steps:
165+
1. To see the simulator window (if hidden): open_sim()
168166
2. Log capture options:
169-
- Option 1: Capture structured logs only (app continues running):
170-
start_sim_log_cap({ simulatorUuid: "${simulatorUuid}", bundleId: "${params.bundleId}" })
171-
- Option 2: Capture both console and structured logs (app will restart):
172-
start_sim_log_cap({ simulatorUuid: "${simulatorUuid}", bundleId: "${params.bundleId}", captureConsole: true })
173-
- Option 3: Restart with logs in one step:
174-
launch_app_logs_sim({ simulatorUuid: "${simulatorUuid}", bundleId: "${params.bundleId}" })
175-
176-
3. When done with any option, use: stop_sim_log_cap({ logSessionId: 'SESSION_ID' })`,
167+
- Capture structured logs: start_sim_log_cap({ simulatorUuid: "${simulatorUuid}", bundleId: "${params.bundleId}" })
168+
- Capture console+structured logs: start_sim_log_cap({ simulatorUuid: "${simulatorUuid}", bundleId: "${params.bundleId}", captureConsole: true })
169+
3. When done, use: stop_sim_log_cap({ logSessionId: 'SESSION_ID' })`,
177170
},
178171
],
179172
};
@@ -194,7 +187,7 @@ export async function launch_app_simLogic(
194187
export default {
195188
name: 'launch_app_sim',
196189
description:
197-
"Launches an app in an iOS simulator. IMPORTANT: You MUST provide both the simulatorUuid and bundleId parameters.\n\nNote: You must install the app in the simulator before launching. The typical workflow is: build → install → launch. Example: launch_app_sim({ simulatorUuid: 'YOUR_UUID_HERE', bundleId: 'com.example.MyApp' })",
190+
"Launches an app in an iOS simulator. If simulator window isn't visible, use open_sim() first. IMPORTANT: You MUST provide both the simulatorUuid and bundleId parameters.\n\nNote: You must install the app in the simulator before launching. The typical workflow is: build → install → launch. Example: launch_app_sim({ simulatorUuid: 'YOUR_UUID_HERE', bundleId: 'com.example.MyApp' })",
198191
schema: launchAppSimSchema.shape, // MCP SDK compatibility
199192
handler: createTypedTool(launchAppSimSchema, launch_app_simLogic, getDefaultCommandExecutor),
200193
};

src/mcp/tools/simulator/launch_app_sim_name.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type LaunchAppSimNameParams = z.infer<typeof launchAppSimNameSchema>;
1818
export default {
1919
name: 'launch_app_sim_name',
2020
description:
21-
"Launches an app in an iOS simulator by simulator name. IMPORTANT: You MUST provide both the simulatorName and bundleId parameters.\n\nNote: You must install the app in the simulator before launching. The typical workflow is: build → install → launch. Example: launch_app_sim_name({ simulatorName: 'iPhone 16', bundleId: 'com.example.MyApp' })",
21+
"Launches an app in an iOS simulator by simulator name. If simulator window isn't visible, use open_sim() first. IMPORTANT: You MUST provide both the simulatorName and bundleId parameters.\n\nNote: You must install the app in the simulator before launching. The typical workflow is: build → install → launch. Example: launch_app_sim_name({ simulatorName: 'iPhone 16', bundleId: 'com.example.MyApp' })",
2222
schema: launchAppSimNameSchema.shape, // MCP SDK compatibility
2323
handler: createTypedTool(
2424
launchAppSimNameSchema,

0 commit comments

Comments
 (0)