stop-all-simulator-servers
Stops all services owned by specified simulator/emulator devices—servers, debuggers, captures, proxies—freeing ports. Pass device IDs to scope cleanup and avoid cross-agent teardown.
Instructions
Stop the services a device owns - simulator-server processes (iOS + Android), native devtools, the iOS accessibility service, TV-control daemons, Chromium CDP sessions, screen recordings, native profiler sessions, native network capture with the requests it recorded, the Android network throttle proxy (set by network-conditions), and JS-runtime debugger sessions along with the network inspectors and React profiler sessions that ride on them - freeing their spawned processes, sockets and ports. Network capture started by network-capture-start ends here too, with the requests it recorded, except in a JS runtime this call does not reach, for example after Metro restarted: this call does not connect to it again, so its JS capture keeps recording and keeps its requests, and the result does not say so. A later network-capture-stop that reaches that runtime stops the recording. Call this when the user asks to clean up or ends the session, or when a skill tells you to recycle a device's services mid-flow - not just because a task finished, since the next task reuses these services and would start cold again. To stop the network capture of one app and keep its requests, call network-capture-stop instead.
PASS devices with the device ids this session used: one tool-server serves every agent, subagent and CLI call using this argent install, and an unscoped call tears down THEIR devices too. Omit devices only when a machine-wide cleanup is what you actually want. An EMPTY array stops nothing; it does not ask for the machine-wide sweep.
A JS-runtime debugger session is keyed by the id you called debugger-connect with. On a Metro serving two or more devices that id can be a logicalDeviceId: connect refuses a udid or serial it cannot match to one Metro device by name, and tells you to re-target with the logicalDeviceId it returns. A scope built from list-devices ids cannot reach that session. Pass any such logicalDeviceId in devices ALONGSIDE the device id.
Returns { stopped }: the URNs of the live services that were shut down; empty means nothing was still running. { unmatched }, present only when a supplied id owns no service here, lists those ids, so a typo or a device NAME passed instead of an id does not read as a clean machine. It is NOT proof the id is wrong: a Vega device you only booted and drove with the remote registers no service and lands here, as does any device this session never started anything on. { left_running } lists the URNs of live debugger sessions (and the network inspectors / React profiler sessions riding on them) whose id no device scope can name; re-call with the id after each URN's <namespace>:<port>: prefix to reap them. { aborted: true } means the request was cancelled part-way: the rest was left untouched and unmatched / left_running were not computed.
Fails if the input has an unknown key (e.g. udids instead of devices); otherwise it always succeeds, and reaping nothing is a result, not a failure.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "stop-all-simulator-servers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| devices | No | Ids of the devices THIS session used (iOS UDID / Android serial / Chromium id), to scope the teardown to. |