Skip to main content
Glama

Script / Delete

script-delete
DestructiveIdempotent

Delete a Godot script (.cs or .gd) from res:// and remove its .uid sidecar. Verify references first because linked nodes/resources will break.

Instructions

Delete a Godot script file (C# '.cs' or GDScript '.gd') from the res:// filesystem. Fails if no file exists at the path. The script's identity (path, language) is captured BEFORE deletion and returned for confirmation. The file is removed with DirAccess, along with its Godot '.uid' sidecar when present, then the editor filesystem is rescanned and (for a '.cs' file) BOUNDED-settles. WARNING: nodes/resources referencing the deleted script will break — verify with 'script-read' first. A loaded copy is detached from the path, so an open scene still using it embeds it on its next save. Returns a structured ScriptInfo.

Input Schema

NameRequiredDescriptionDefault
scriptPathYesres:// path of the script file to delete, ending in '.cs' or '.gd'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.35.1

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already flag destructive/non-readOnly, but the description goes well beyond them: failure when no file exists, identity captured before deletion, the '.uid' sidecar removal, a filesystem rescan, and a bounded settle for '.cs'. It also discloses a non-obvious side effect — a loaded copy is detached so an open scene embeds it on its next save — which no annotation conveys.

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?

Front-loads the action and resource in the first sentence, then layers failure mode, mechanics, and the breakage warning in a logical order. It is dense but every clause carries operational information; only the 'BOUNDED-settles' phrasing is slightly opaque jargon.

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?

With no output schema, the description does state what comes back ('structured ScriptInfo' with path and language captured pre-deletion). It omits the concrete shape of that return object and any error payload detail, but for a one-parameter destructive tool the operational picture is essentially complete.

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

Parameters3/5

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

Schema coverage is 100% and the single parameter already documents the res:// path format and '.cs'/'.gd' extension requirement. The description adds only the implied must-exist constraint, so the baseline 3 applies with little extra meaning contributed.

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 and resource ('Delete a Godot script file') plus the scope ('from the res:// filesystem') and accepted file types ('.cs' or '.gd'). It is unmistakable against siblings like script-update or script-read, which mutate or inspect rather than remove.

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?

Gives an explicit precondition before use: 'verify with script-read first' because nodes/resources referencing the deleted script will break. That names a sibling and the condition selecting it. It does not, however, contrast against other mutation siblings (script-update, script-create) or state when deletion is inappropriate beyond the breakage warning.

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