Close test clients
instances_closeCloses clients launched by this bridge session at once without saving their config, using instance IDs, PIDs, or owner labels; clients from other sessions or games are refused.
Instructions
Closes clients this session started with instances_launch, at once and without writing their config, by instance id, by pid (also for a client that never answered, e.g. gmod-mcp did not load in it) or by owner label. By id, pid or all, only this bridge session's clients: other games (the user's own, another session's) are refused, close those only if the user asks, with game_terminate. By owner label it also closes keep: true test clients of an earlier session (a bridge restarted, another agent) that carry that label (instances_list shows it as owner; closed[i].launched_by_other_session is true), but never a game that is not a test client or one without the tag. Sub-agents of one Claude Code session share it: all: true closes their clients too. The selectors add up (instances, pids, owner). Result: {closed: [{pid, instance?, owner?}], already_gone?: [{pid, instance?, owner?}] (processes that had ended before the call: nothing was closed), refused?: [ids, pids or "owner:" not started by this session or already closed], why_refused?}; an error (code refused, the same fields beside it) only when nothing was closed. Closing the client that is the coordinator (the game on the base port, see instances_list: role, coordinator_warning) while other games live moves that role: the answer says so (closed[i].was_coordinator, coordinator_moved_to, warning) and calls of other agents answer coordinator_changing for a few seconds. Example: {"owner": "fork-a"}.
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": "instances_close"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Close every client this session started, other sub-agents' included. | |
| pids | No | Process ids to close (as returned by instances_launch). | |
| owner | No | Close every client launched with this owner label, including keep: true test clients of an earlier bridge session that carry it. | |
| instances | No | Instance ids to close. |