Skip to main content
Glama

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoRequired for press: InputMap action name to press/release
holdMsNoOptional for press: how long to hold the action in ms (defaults to 120)
targetNoOptional: node path for tree/read (absolute like /root/Main or relative to the current scene, defaults to ".")
commandYesHook command: tree, read, shot, quit, press, or stats
maxDepthNoOptional: subtree depth for tree (defaults to 3)
expressionNoRequired for read: read-only Expression evaluated on the target node
includeImageNoOptional for shot: include base64 PNG in the response (defaults to true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full disclosure burden. It usefully reveals two behavioral facts: commands are restricted to an allow-list, and an active run_project session with the hook is required. It omits other material behavior — that quit likely terminates the running game, that press mutates input state, and how failures surface.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero filler, with the action and its allow-list front-loaded and the prerequisite trailing. Every clause carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter, no-output-schema tool the description is adequate: the schema covers all parameters and the description covers the command domain and session prerequisite. It still leaves side effects (notably quit and press) and error/response behavior unaddressed, which matters given the absence of annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter (action, holdMs, target, maxDepth, expression, includeImage, command) is already documented in the schema. The description only echoes the command list, adding no syntax or interaction detail beyond structured data; baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ('Send an allow-listed command ... to the opt-in signal_hook in a running game') and enumerates the command set, so an agent knows exactly what this tool does. It does not explicitly contrast itself with siblings like run_project or get_debug_output, which keeps it short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Requires an active run_project session with the hook installed' supplies a real precondition for use, which is more than most definitions offer. However, it never says when to prefer hook_exec over alternatives (e.g. dump_scene/get_debug_output) or what happens when the hook is not installed, so usage is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.