Skip to main content
Glama
YasiruRF
by YasiruRF

edit_script

Replace a specific exact match in a GDScript file with new code, enabling precise find-and-replace patching of Godot scripts.

Instructions

Replaces one exact occurrence of old_text with new_text in a GDScript file (like a find-and-replace patch).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
new_textYes
old_textYes
script_pathYes
project_pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It usefully specifies that only one exact occurrence is replaced and frames the operation as patch-like, which adds real meaning. However, it does not disclose what happens if old_text is not found, whether the file is modified in place, or any side effects of this mutation.

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 a single, front-loaded sentence that conveys the core operation and scope without technical filler. The analogy is compact and reinforces meaning without adding bulk. Every word serve the core message.

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?

This is a mutating tool with no annotations, no output schema, and zero schema descriptions, so the description must do heavy lifting. It leaves important context missing: error behavior when the exact text is absent, path semantics, interaction with existing script state, and why edit_script is preferable to write_script.

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%, so the description must compensate for all four parameters. It clarifies the roles of old_text and new_text, but leaves project_path and script_path unexplained, including how they relate to each other. This is only partial compensation for completely undocumented parameters.

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 ('Replaces'), a precise resource ('one exact occurrence of old_text with new_text in a GDScript file'), and uses an analogy ('like a find-and-replace patch'). This clearly distinguishes it from sibling tools like write_script or read_script, which would operate on entire file contents rather than a single targeted occurrence.

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

Usage Guidelines2/5

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

The description explains the mechanism but gives no guidance on when to choose edit_script over alternatives such as write_script or read_script. There is no mention of prerequisites, exclusions, or scenarios where a full-file replacement would be more appropriate.

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