Skip to main content
Glama
beckettlab

Beckett — MCP for Godot

by beckettlab

write_file

Destructive

Write text files into Godot's res:// or user:// with path-traversal protection and refresh the editor filesystem. Open .tscn files need manual reload; scripts reload automatically.

Instructions

Write a text file under res:// (or user://), path-traversal guarded. Refreshes the editor filesystem. If the file is a .tscn the editor currently has OPEN, the result says so: Godot prompts the human to reload it and until they do the editor still holds the old version (scripts have no such problem, the editor auto-reloads them). Set beckett/auto_reload_scenes=true to reload open scenes automatically. Prefer the scene tools (create_node / set_property / save_scene) over writing .tscn text at all - editor-side edits never go stale.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

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

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already indicate destructiveHint=true, but the description adds valuable behavioral context: it refreshes the editor filesystem, open scenes remain stale until manually reloaded unless auto_reload_scenes is set, and scripts auto-reload. These are meaningful side effects that go beyond the annotation and help the agent anticipate consequences.

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?

The description is information-dense with no filler. It opens with the core behavior, then covers side effects and reload caveats, and ends with routing guidance. Every sentence contributes to correct invocation or expectation setting.

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?

For a two-parameter tool with no output schema, the description covers most essentials: allowed paths, traversal protection, editor refresh, open-scene reload behavior, and alternatives. It does not mention overwrite behavior or whether parent directories are created, and it does not describe the return value, but these are minor gaps given the clear scope.

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?

With 0% schema description coverage, the description must compensate, and it partially does: it clarifies that path must be under res:// or user:// and that traversal is guarded. Content is only described as text, which is fairly evident from the tool name and writing a text file, but no encoding or length constraints are provided. Overall, the path semantics are meaningfully enriched.

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?

The description states a specific verb and resource: writing a text file under res:// or user:// with path-traversal guarding. It also distinguishes itself from sibling scene tools by explicitly recommending create_node / set_property / save_scene instead of writing .tscn text. This is unambiguous and helps an agent select the right tool.

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?

The description gives clear when-to-use guidance, including the caveat about open .tscn files requiring human reload and the preference for scene tools over raw .tscn writes. It also notes that scripts reload automatically, so writing scripts is safe. This explicitly routes the agent away from write_file in certain cases and toward alternatives.

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