Skip to main content
Glama

run_headless_script

Executes GDScript code headlessly against a Godot project for procedural asset or scene generation. Use it to run scripted scene creation without opening the editor.

Instructions

Execute a GDScript body inside func run(tree: SceneTree) headlessly against the project for procedural asset/scene generation.

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": {
      "code": "<code>"
    },
    "name": "run_headless_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
timeoutMsNo
projectPathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the entire behavioral burden for an arbitrary-code-execution tool. It discloses that execution is headless and against the project, but says nothing about whether project files are modified in place, whether changes are reversible, sandboxing or permission requirements, error/exception behavior, or what is returned. For a tool that runs user-authored code, these are material omissions.

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

Conciseness4/5

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

A single dense sentence with no filler, and the core intent (headless execution against the project) is front-loaded before the purpose clause. Slightly awkward embedding of the function signature mid-sentence, but nothing is wasted.

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

Completeness2/5

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

For a code-execution tool with no annotations, no output schema, and two of three parameters undocumented, the definition is too thin. An agent cannot predict side effects on the project, timeout behavior, or the shape of a result, which is exactly the information the description would need to supply here.

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

Parameters2/5

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

Schema description coverage is 0% across three parameters, so the description must compensate. It does explain that `code` must be a body executed inside `func run(tree: SceneTree)`, which is real meaning beyond the bare string type, but `timeoutMs` and `projectPath` receive no coverage at all — units, default, and timeout consequences are left unknown.

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 names a specific verb ("Execute") and resource (a GDScript body inside `func run(tree: SceneTree)`) and adds the important qualifier "headlessly against the project." That gives an agent a concrete picture of the operation and hints at a distinction from a live-game eval sibling, but it never names the alternative, so differentiation is inferred rather than stated.

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?

"for procedural asset/scene generation" implies the intended use case (headless project mutation rather than interactive play), which is genuine when-to-use context. However there is no explicit when-not condition, no mention of prerequisites such as project state or an editor/game instance, and no alternative is named even though `game_eval` exists as a likely overlapping sibling.

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