Skip to main content
Glama

Port Godot 3 scripts to Godot 4

godot_migrate
DestructiveIdempotent

Rewrites Godot 3 GDScript and shaders to Godot 4 mechanical syntax, reporting changes first and applying them with write:true, then lists what still needs manual fixes.

Instructions

Rewrite Godot 3 GDScript and shaders to Godot 4 where that is mechanical: @export/@onready/@tool, network keywords to @rpc(...), setget to property syntax, renamed classes, functions, properties and constants, yield() to await, connect()/emit_signal() to signals, funcref() to callables, moved members (OS.get_ticks_msec() to Time), shader renames (hint_albedo to source_color, WORLD_MATRIX to MODEL_MATRIX, ...) and SCREEN_TEXTURE/DEPTH_TEXTURE to a hint uniform. Strings, comments and node paths are left alone. Without write it only reports; with write: true it rewrites the scripts. It lists what still needs a hand (complex setget, move_and_slide arguments, master/mastersync, unknown export hints). Scenes and project settings are not migrated (Godot's --convert-3to4 does those). files limits it to some scripts; detail brief shows up to 12 changes per file. Running it twice changes nothing more. Use it before fixing Godot 3 findings one by one, then run godot_review.

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_migrate"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoproject folder, or a file or folder inside it (relative to the server's folder; default: the current project)
filesNoonly these res:// scripts or shaders
writeNorewrite the scripts on disk (default false: report only)
detailNobrief (capped lists) or full (everything); default full

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.6.0
    • changedInput schema / properties / detail / description
      Previous value: -"brief: short output with capped lists; full: everything (default for this premium profile: full)."New value: +"brief (capped lists) or full (everything); default full"
    • changedInput schema / properties / files / description
      Previous value: -"only these res:// scripts"New value: +"only these res:// scripts or shaders"
    • changedInput schema / properties / path / description
      Previous value: -"The project folder, or any file or folder inside it (Godotwright walks up to project.godot). Relative paths start at the server's folder. Default: the current project."New value: +"project folder, or a file or folder inside it (relative to the server's folder; default: the current project)"
  2. Changed2 schema fields changedv0.1.1
    • changedInput schema / properties / detail / description
      Previous value: -"Output detail (default for this premium profile: full)."New value: +"brief: short output with capped lists; full: everything (default for this premium profile: full)."
    • changedInput schema / properties / path / description
      Previous value: -"Project directory or a path inside it (default: the current project)."New value: +"The project folder, or any file or folder inside it (Godotwright walks up to project.godot). Relative paths start at the server's folder. Default: the current project."
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructive=true and idempotent=true; the description backs these with concrete behavior (dry-run by default, rewrite only with write:true, 'running it twice changes nothing more'). It also discloses what is deliberately left untouched (strings, comments, node paths) and which cases are reported rather than fixed, which goes beyond the annotations. A minor gap is that it doesn't say whether an undo/backup path exists despite a godot_undo sibling.

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?

One dense paragraph, front-loaded with the core action and its 'where that is mechanical' qualifier, then scope/limits, then workflow guidance. The long inline enumeration of renames is verbose but each item is information-bearing; nothing reads as filler.

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?

For a destructive, idempotent migration tool with no output schema, it covers default behavior, on-disk effects, what is out of scope, what will be flagged for manual work, and how to chain into godot_review. An agent can decide whether to call it, with which flags, and what to expect from the result.

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 the baseline is 3, but the description adds real meaning: `detail` brief is concretized as 'up to 12 changes per file' and `files` is framed as restricting scope to some scripts or shaders. `write` is explained in terms of report-vs-rewrite, which clarifies consequence, not just type.

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?

Specific verb and resource: rewrites Godot 3 GDScript and shaders to Godot 4, and it enumerates the exact transformation classes (@export/@onready, setget, yield->await, shader renames). It also states its boundary versus Godot's own --convert-3to4, so an agent can separate it from sibling fix/review tools.

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 sequencing ('Use it before fixing Godot 3 findings one by one, then run godot_review') and names godot_review as the follow-up. Exclusions are stated too: scenes and project settings are not migrated, and non-mechanical cases are deferred to manual work.

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