Skip to main content
Glama

validate

Read-only

Check GDScript syntax or scene file integrity headlessly before running scripts to catch parse errors early.

Instructions

Validate GDScript syntax or scene file integrity using headless Godot. Use before attach_script or run_script to catch parse errors early. Single-target: provide exactly one of scriptPath, source, or scenePath. Batch: provide a targets array - runs all in one Godot process. Returns { valid, errors: [{ line?, message }] } for single, or { results: [{ target, valid, errors }] } for batch. Line numbers appear when Godot's stderr includes them (not always). Returns valid:false on any parse error; never throws.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNo[single] Inline GDScript source code to validate. Written to a temporary file and validated against the project.
targetsNo[batch] Array of targets to validate in a single Godot process. Each item must have exactly one of: scriptPath, source, or scenePath.
scenePathNo[single] Path to a .tscn scene file relative to the project to validate (e.g. "scenes/main.tscn")
scriptPathNo[single] Path to a .gd file relative to the project to validate (e.g. "scripts/player.gd")
projectPathYesPath to the Godot project directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.1.1
  2. Removedv3.0.0
  3. Addedv1.0.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, and the description adds meaningful behavior beyond that: valid:false on any parse error, never throws, and line numbers only appear when Godot's stderr includes them. The one gap is that it doesn't note the temp-file write for inline source (that detail lives only in the schema).

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?

Front-loads the purpose, then usage, then mode rules, then return shape. Every sentence carries information; nothing is redundant with the title or schema.

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

Completeness5/5

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

No output schema exists, but the description spells out both return shapes (single: { valid, errors }, batch: { results }), the error-object shape, and failure semantics. An agent can call and interpret results correctly without more.

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

Parameters4/5

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

Schema coverage is 100% so the baseline is 3, but the description adds a real constraint the schema does not encode: 'provide exactly one of scriptPath, source, or scenePath.' That mutual-exclusivity rule is genuinely useful beyond the structured fields.

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

Purpose5/5

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

States a specific verb (validate) plus two resources (GDScript syntax, scene file integrity) and the mechanism (headless Godot). This clearly separates it from siblings like run_script or attach_script, which execute or attach rather than check validity.

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

Usage Guidelines5/5

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

Explicitly says to use it before attach_script or run_script to catch parse errors early, and states the alternation rules: single-target requires exactly one of scriptPath/source/scenePath, while batch uses a targets array. When-to-use and mode selection are both given.

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