List hooks
hook_listList all registered Garry's Mod hooks by realm with defining file and line; filter by event to detect missing or mistyped hook registrations.
Instructions
Hooks registered with hook.Add in a realm (hook.GetTable), with where each function was defined. Without event: every event (large). Result: {hooks: {: [{id, source (file), line, what}]}, count}, and with event: event, known (false = no hook and no gamemode function for that name: probably a typo) and gamemode_function (source of GAMEMODE:, or null). Example: {"realm": "client", "event": "Think"}.
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": "hook_list"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event | No | Event name (e.g. Think). | |
| realm | No | Default server. | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | No | ||
| note | No | ||
| count | Yes | ||
| event | No | ||
| hooks | Yes | ||
| known | No | ||
| warning | No | ||
| next_call | No | ||
| answered_by | No | ||
| truncated_note | No | ||
| version_warning | No | ||
| gamemode_function | No |