Skip to main content
Glama

Keep .uid files in sync

godot_uid
Idempotent

Repairs Godot 4.4 .uid files left behind when scripts or shaders are moved outside the editor: pair orphaned uids with moved files, rewrite ext_resource paths, and detect clashes before a reference fails to load.

Instructions

Since Godot 4.4 every script and shader has a .uid file next to it. A file moved outside the editor (git mv, a shell, an IDE, an agent) leaves its .uid behind, Godot gives the moved file a new uid, and nothing says so until a reference by the old uid fails to load. op sync (default) pairs each .uid whose file is gone with the file that moved: git renames first (staged or committed), then a case-only rename, then references that name the uid with the new path, then the content the file had at the last commit, then the same name when the file declares what its references use; two files that both fit, or one that only has the name, are never guessed but listed to check by hand, and a moved file the editor gave a new uid nothing uses gets the old one back. It moves the .uid there, rewrites ext_resource paths and quoted res:// paths that name the old place (uid kept), gives scripts and shaders without a .uid the uid their references use or a new one (so every machine has the same), deletes a .uid whose file is gone when nothing uses it, and reports uid clashes and references to uids no file has. Dry run by default: one line per change (move, path, new, restore, delete) or problem (by hand, clash, unowned); write: true applies it through the journal (godot_undo reverts it). op check writes nothing and says in sync or out of sync with the same lines. For a move you have not made yet, use godot_rename: it moves the file with its .uid.

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

Input Schema

NameRequiredDescriptionDefault
opNosync (default): the plan, applied with write: true; check: only what is out of sync
gitNoask git for renames and committed versions (default true when the project is in git)
pathNoproject folder, or a file or folder inside it (relative to the server's folder; default: the current project)
writeNosync: apply the plan (default false: show it)
include_addonsNoalso give scripts and shaders in res://addons/ without a .uid one

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already disclose readOnly=false, idempotent=true, destructive=false; the description adds meaningful context beyond that: dry run by default, application through a journal, and restoration of a .uid only when nothing uses it. However, it deletes .uid files and moves them while destructiveHint=false — the description explains the safety net (journal plus 'when nothing uses it'), which largely justifies the annotation, but the tension is not addressed head-on.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One enormous run-on paragraph: the purpose statement, a five-step rename-matching precedence chain, and the dry-run/reporting contract all pile into single sentences with nested parentheticals. The most decision-relevant facts (dry run by default; write:true applies) sit mid-paragraph rather than front-loaded, and much of the precedence detail could be trimmed or moved.

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

Completeness5/5

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

Complete for a 5-parameter tool with no output schema: it spells out the returned line types (move/path/new/restore/delete and by hand/clash/unowned), the op check output ('in sync'/'out of sync'), and the ambiguity cases that are deliberately not guessed. Nothing an agent needs in order to call it correctly is missing.

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 100%, so baseline is 3, and the description goes slightly beyond by explaining the selection defaults ('git renames first', 'ask git... default true when the project is in git' semantics) and by tying op=check to 'writes nothing'. It mostly echoes the enum descriptions in the schema, so the gain is incremental rather than substantial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — pairing orphaned .uid sidecar files with files that moved, rewriting ext_resource/res:// paths, deleting unused .uid files — and it explicitly contrasts with godot_rename. The statement of purpose is real but arrives after two sentences of background, so the core action is slightly buried.

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?

Gives explicit routing: 'For a move you have not made yet, use godot_rename' and 'godot_undo reverts it', plus the op sync vs op check distinction and the dry-run/write:true convention. Conditions that select each alternative are named rather than implied.

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