Skip to main content
Glama

Merge scenes and resources by meaning

godot_merge
Idempotent

Merge Godot .tscn, .tres, and project.godot files three-way by semantic structure, resolving node, resource, connection, and property conflicts that line-based Git merges mishandle.

Instructions

A three-way merge of .tscn, .tres and project.godot that knows what the files mean, offline. Git merges them line by line: two branches (or two agents in two worktrees) that each add a node to one scene conflict, or merge into a file Godot cannot load (both gave a new resource the same id, load_steps is off, a node sits under a removed parent). This merges nodes by their path, ext_resources by uid or path, connections by signal, source, target and method, and properties one by one; resource ids of both sides are brought into one numbering and every reference follows; a resource one side removed and the other still uses is kept. Only a property both sides set to different values is a conflict, reported with base, ours and theirs. Without theirs: the files a git merge, rebase or cherry-pick left in conflict (dry run; write: true puts the merged files in the working tree, then you git add them). With theirs (a branch or commit): a preview of merging it into HEAD, before you merge. Never use a text editor on conflict markers in a scene.

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

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:// files
writeNowrite the merged files into the working tree (a merge in progress only; default false: show what it would be)
detailNobrief (capped lists) or full (everything); default full
preferNothe side a conflict takes in the merged file (default ours); the conflict is reported either way
theirsNoa branch or commit: preview what merging it into HEAD does to the Godot files (nothing is written)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, non-destructive, idempotent, closed-world mutation, and the description adds real substance on top: what counts as a conflict (only a property both sides set differently), what is preserved (a resource one side removed but the other still uses), how ids are renumbered, and that write:true requires a merge in progress. It omits what the reported conflict output and dry-run preview actually look like, but the behavioral profile is otherwise well disclosed.

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 core claim and the git-merge contrast, then moves through semantics, conflict rules, and the two modes; nearly every clause carries information. It is dense and long for one block, but nothing is filler, and the closing warning is well placed.

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 6-parameter tool with no output schema, it covers both invocation modes, write safety, preferring, and detail level. What is missing is a sense of the return payload in dry-run/preview mode (how conflicts and file lists are presented), which matters given there is no output schema.

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%, so defaults and enum meanings are already documented there. The description reinforces the interactions that matter (theirs implies a preview into HEAD and nothing is written; prefer picks the winner but the conflict is still reported) but adds little per-parameter detail beyond the schema text, so the baseline applies.

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?

Names a specific operation (three-way merge) over specific resources (.tscn, .tres, project.godot) with a distinguishing mechanism (merges by meaning: node path, resource uid/path, signal+source+target+method, per-property). It explicitly contrasts with line-based git merge, making it unmistakable against any text-diff sibling.

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 modes: without `theirs` it handles files left in conflict by git merge/rebase/cherry-pick (dry run, or write:true to place merged files in the working tree); with `theirs` it previews merging a branch/commit into HEAD before merging. It also states the anti-pattern outright: never hand-edit conflict markers in a scene.

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