Skip to main content
Glama
Beckett — MCP for Godot

Beckett — MCP for Godot

by beckettlab

write_script

Destructive

Writes GDScript or other text files under res://, validating GDScript first so non-compiling code is refused before it reaches disk.

Instructions

Write a GDScript (or other text, e.g. .cs) file under res://. GDScript is validated first by default — refuses code that doesn't compile; non-.gd files (C#, config…) are written as-is (use build_csharp to compile-check C#). Set validate=false to force. Reads the file back (disk_verified).

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": {
      "path": "<path>",
      "content": "<content>"
    },
    "name": "write_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesres:// path, e.g. res://player.gd
contentYes
validateNovalidate before writing (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.1
  2. Removedv1.10.0
  3. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare a destructive mutation; the description adds real content—GDScript is validated before write, non-compiling code is refused, non-.gd files are written as-is, and the file is read back for disk_verified confirmation. It never states that an existing file at path is overwritten, which is the key destructive risk an agent needs flagged.

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?

Four compact sentences, front-loaded with the action and file scope, then validation behavior, then the override and the C# alternative. No sentence is filler; em-dash compression carries detail without 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, but the description covers the observable result (disk_verified read-back) and the validation failure mode, which is what an agent needs. The only missing piece is explicit overwrite/destructive behavior on existing files.

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 the description fills the main gap by explaining validate's default-true behavior and its refusal semantics, plus the res:// path convention. Content is left implicit (obvious from name), so this is close to complete.

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 (write) and resource (GDScript/other text file under res://) and explicitly distinguishes scope by file type. The agent can tell it apart from sibling write_file (generic text) and validate_script (validation only) without opening a schema.

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?

Explicitly routes C# compile-checking to build_csharp and states the escape hatch (validate=false to force). It does not address when to prefer write_file or script_patch over this tool, leaving that inference to the agent, so it falls short of full alternative coverage.

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