List instances
instances_listList known GMod instances with IDs, modes, ports, maps, roles, and live health metrics to monitor running, hung, unresponsive, or crashed games; filter by owner when needed.
Instructions
Known gmod-mcp instances (this one, and on the coordinator every registered member): id, mode (client/srcds), port, pid, map, realms (client true = the client is in game), role, heartbeat age and health: agent_version, uptime_s, fps (over the last 3 s), main_thread_stalled, stalled_s (seconds the main thread has been blocked, 0 when it ticks), silent_s (seconds since its last heartbeat, 0 for this game: it grows for a frozen one, state "unresponsive", and is the number the instance_hung error gives; heartbeat_age_s is the same figure unrounded), fps_low_s (seconds the frame rate has stayed under 10 fps, 0 when fine or while the game loads: measurements taken meanwhile are suspect), loading (true while a map load is in progress, whatever started it: console, Lua, map_load, which counts from its first moment, while it still waits for the menu and the engine has not started the load; sent at once when it starts and ends; it ends when the server state that started it is gone, e.g. a disconnect right after map, and a load whose loading screen has been down for 30 s no longer counts; a loading screen with nothing behind it for 12 s (no server or client realm, not connected, no load starting: the engine's stuck state after map then disconnect at once) is not a load: loading is false and the entry carries loading_stuck: true, and map_load clears it (disconnect does not); status reports the same flags), lua_errors (count since start; errors_since for the details). The instance with role "coordinator" (also named by coordinator_id) holds the directory: when it ends, another takes over within about a second, and during the hand-over coordinator_changing: true (calls with instance answer the retryable error coordinator_changing, with retry_after_s). Instances whose process ended are removed, except those that crashed: they stay an hour with state "crashed" and crash {dump (crashes/*.mdmp file name or null), exit_code, evidence}; relaunch with instances_launch, the dump is for a human. States: "running" (live); "hung" (main thread blocked for 60 s, 180 s during a map load, or no heartbeat for that long while the process lives: a load that never ends, an infinite loop, a crash dialog; it will not recover: the note says to close it with instances_close {pids} or game_terminate {instance} and relaunch, and what was measured on it since is void); "unresponsive" (no heartbeat for 10 s but the process lives: busy or frozen, becomes hung after the limit); "crashed". A call in flight to an instance that dies is answered at once with client_crashed / server_crashed, and one whose process is frozen with no heartbeat for 30 s with instance_hung. Any tool accepts an instance argument: the coordinator relays the call to that instance. Through the plugin's bridge, entries also carry the owner label given to instances_launch (sent by the game itself, so it shows for every instance whichever bridge session launched it) and test_client (true for clients started by instances_launch), owner filters on it, and launched_not_answering lists the clients it launched that never answered (close them with instances_close {pids}); with no game running the list is empty, with a note.
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_list"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | No | Only the clients launched with this owner label (bridge only). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | No | ||
| note | No | ||
| warning | No | ||
| instances | Yes | ||
| next_call | No | ||
| answered_by | No | ||
| coordinator | No | ||
| truncated_note | No | ||
| version_warning | No |