mc_quit_client
Shuts down the Minecraft client gracefully and waits for complete exit, enabling safe immediate relaunch. For development loops requiring clean client termination.
Instructions
Gracefully shut down the entire Minecraft client. This tears down the user's whole play session, including any world or server they're in — only do it when asked, or as part of a dev loop the user set up (typically the quit step of build → deploy → quit → launch → mc_wait_for_bridge; see the mcdev://guides/dev-loop resource).
Fire-and-acknowledge: the WebSocket is expected to drop moments after the ack (that counts as success). By default the tool then waits for the client to be truly gone: it resolves the PID listening on the bridge port before quitting, polls until the port stops listening, then until that process exits — so on success it's safe to relaunch immediately, even through launchers that track the instance (Prism silently ignores --launch while the old process lives). When the PID can't be resolved (no lsof, permissions), it falls back to port-close-only and the result says so — the JVM can outlive the port by a few seconds, so in that case confirm the process exited yourself (pgrep / kill -0) before relaunching. Requires session_control_enabled=true in the DebugBridge config.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| waitForExit | No | Wait until the client is actually gone — bridge port closed, then the client process exited (when its PID could be resolved) — before returning. Default true. | |
| timeoutSeconds | No | How long to wait for the whole shutdown (port close + process exit). Default 30. |