Skip to main content
Glama
Beckett — MCP for Godot

Beckett — MCP for Godot

by beckettlab

validate_script

Read-only

Compile and validate GDScript source or res:// files without writing them, reporting errors and editor warnings to catch API mistakes before scripts are saved.

Instructions

Parse/compile GDScript WITHOUT writing it. Pass 'content' (source) or 'path' (res://). Returns whether it compiles, plus the GDScript warnings the editor would show (unused variables, shadowing, integer division...). Use before write_script to catch hallucinated APIs. A class_name from a file written outside the editor is registered first. When validating 'content' destined for an existing file, ALSO pass its 'path' so a real cross-file class_name duplicate is still reported.

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": "validate_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNores:// path — the file to validate, or (with content) the file the content is destined for
contentNo
warningsNoalso report GDScript warnings (default true; runs a ~0.3 s headless check)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.17.0
    • addedInput schema / properties / warnings
      Added value: +{
      +  "description": "also report GDScript warnings (default true; runs a ~0.3 s headless check)",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv1.14.0
    • changedInput schema / properties / path / description
      Previous value: -"res:// path — the file to validate, or (with content) the file the content is destined for"New value: +"res:// path — the file to validate, or (with content) the file the content is destined for"
  3. Addedv1.12.1
  4. Removedv1.10.1
  5. Changed1 schema field changedv1.9.1
    • changedInput schema / properties / path / description
      Previous value: -"res:// path to validate an existing file"New value: +"res:// path — the file to validate, or (with content) the file the content is destined for"
  6. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description is consistent with that. It goes beyond them by disclosing a real side effect — a class_name from a file written outside the editor is registered first — and by explaining that duplicate class_name detection only works when both content and path are supplied. This is the kind of context structured hints cannot carry.

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?

The no-write constraint and the alternative-input rule are front-loaded, and each sentence contributes a distinct fact. The final sentence is somewhat convoluted and could be tightened, but nothing is padding.

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

Completeness4/5

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

No output schema exists, so the description must cover return values — it does, stating a compile pass/fail plus the editor warnings with examples. Combined with the warnings-flag semantics and the class_name registration note, this is close to complete; only the exact result shape (e.g., error line numbers) is left implicit.

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 67% and 'content' is undocumented in the schema, so the description carries that weight: it explains that content is raw source and path is res://, and that the two can be combined with a distinct meaning (destination file). This adds genuine semantics beyond the schema, especially the dual role of 'path'.

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?

A specific verb+resource ('Parse/compile GDScript') with an explicit scope differentiator ('WITHOUT writing it') that separates it from write_script and script_patch. The agent knows immediately this is a dry-run compile check, not a mutation.

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

Usage Guidelines4/5

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

States a concrete usage rule: 'Use before write_script to catch hallucinated APIs,' which names the sibling and the ordering. It also gives the conditional branch for passing both 'content' and 'path'. It stops short of explicit when-not guidance (e.g., don't use for a file you intend to simply read).

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