hook_exec
Send allow-listed commands to a running Godot game's signal_hook during an active run_project session to inspect scenes, read expressions, capture screenshots, press actions, view stats, or quit.
Instructions
Send an allow-listed command (tree|read|shot|quit|press|stats) to the opt-in signal_hook in a running game. Requires an active run_project session with the hook installed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"command": "<command>"
},
"name": "hook_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Required for press: InputMap action name to press/release | |
| holdMs | No | Optional for press: how long to hold the action in ms (defaults to 120) | |
| target | No | Optional: node path for tree/read (absolute like /root/Main or relative to the current scene, defaults to ".") | |
| command | Yes | Hook command: tree, read, shot, quit, press, or stats | |
| maxDepth | No | Optional: subtree depth for tree (defaults to 3) | |
| expression | No | Required for read: read-only Expression evaluated on the target node | |
| includeImage | No | Optional for shot: include base64 PNG in the response (defaults to true) |