Skip to main content
Glama

Git Merge

git_merge

Integrate changes from another branch into your current Git branch. Configure merge strategies, squash commits, write custom messages, or abort conflicting merges.

Instructions

Merge branches together. Integrates changes from another branch into the current branch with optional merge strategies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to the Git repository. Defaults to session working directory set via git_set_working_dir..
branchYesBranch to merge into current branch.
strategyNoMerge strategy to use (ort, recursive, octopus, ours, subtree).
noFastForwardNoPrevent fast-forward merge (create merge commit).
squashNoSquash all commits from the branch into a single commit.
messageNoCustom merge commit message.
abortNoAbort an in-progress merge that has conflicts.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYesIndicates if the operation was successful.
strategyYesMerge strategy used.
fastForwardYesWhether merge was fast-forward.
conflictsYesWhether merge had conflicts.
conflictedFilesYesFiles with conflicts that need resolution.
mergedFilesYesFiles that were merged.
messageYesMerge commit message.
Behavior3/5

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

Aligns with readOnlyHint:false by describing an integration operation. Mentions 'optional merge strategies' which hints at behavioral variation. However, it omits critical behavioral context: potential for merge conflicts, working directory modifications, or the fact that this creates merge commits (unless fast-forwarded), all of which are left to parameter documentation alone.

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?

Two sentences with zero waste. Front-loaded with core action 'Merge branches together' followed by elaboration. Every word earns its place without redundancy or repetition of schema details.

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

Completeness3/5

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

With 100% schema coverage and an output schema present, the description doesn't need to explain return values. However, for a complex VCS operation that can leave the repository in a conflicted state, the lack of behavioral context regarding conflicts, side effects, or failure modes leaves gaps that structured fields don't fully compensate.

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 description coverage is 100%, establishing baseline 3. Description mentions 'merge strategies' reinforcing the strategy parameter and implies the branch parameter is the source, but adds no syntax details, examples, or semantic nuances beyond what the well-documented schema already provides.

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 specific action (merge/integrate changes) and resource (branches). However, it fails to distinguish from siblings like git_rebase, git_cherry_pick, or git_pull which also integrate changes, leaving ambiguity about which integration method to choose.

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?

Provides no guidance on when to use merge versus rebase (git_rebase), cherry-pick (git_cherry_pick), or pull (git_pull). Missing prerequisites like 'ensure working directory is clean' or guidance on conflict resolution workflows despite the existence of the abort parameter.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/git-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server