Wait for events
events_waitWaits for selected game events and returns as soon as one arrives or after timeout, using a returned cursor so no events are missed between calls.
Instructions
Waits for events of this game instance and returns AS SOON AS one of the wanted types arrives (all that arrived, up to limit), or after timeout_s with timed_out: true. Types: menu_ready, runtime_injected, realm_up, realm_down, realm_ready, map_loaded, disconnected, disconnect_reason, connection_failed, main_thread_stalled, main_thread_resumed, lua_error, runtime_error, report (a mcpagent.report value), focus_released, user: (sent by game code with mcpagent.event(type, data)). Without cursor it waits for events from now on; pass the returned next_cursor to the next call so nothing is missed in between. The instance keeps the last 5000 events (lost > 0 = some were dropped before you read them). Result: {events: [{seq, time (s since module start), type, data}], next_cursor, lost, timed_out}. Example: {"types": ["map_loaded", "lua_error"], "timeout_s": 60}.
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": "events_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max number of events (default 100). | |
| types | No | Types to wait for (empty = all). | |
| cursor | No | Cursor (next_cursor from a previous call). | |
| instance | No | Optional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance. | |
| timeout_s | No | Max wait (default 30). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lost | No | ||
| next | No | ||
| note | No | ||
| events | Yes | ||
| warning | No | ||
| next_call | No | ||
| timed_out | No | ||
| answered_by | No | ||
| next_cursor | Yes | ||
| truncated_note | No | ||
| version_warning | No |