Skip to main content
Glama
git MCP server

git MCP server

Official

git_merge

Idempotent

Merge a branch into the current branch with fast-forward-only default, optional merge commit, and abort on conflicts or dirty tree.

Instructions

Merges a branch into the current branch. Fast-forward only unless fast_forward_only is false; refuses a dirty working tree, and aborts a merge that conflicts, leaving the repository unchanged

Input Schema

NameRequiredDescriptionDefault
repo_pathYes
source_branchYesBranch, tag or commit to merge into the current branch
fast_forward_onlyNoOnly fast-forward, failing if the branches have diverged. False allows a merge commit

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.3.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=true), and the description adds real value beyond them: it discloses that a dirty working tree is refused, that conflicting merges abort, and that the repository is left unchanged on failure. It stops short of describing the success state in detail (index update, merge commit creation beyond the fast_forward_only note) and says nothing about the returned result.

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?

One dense sentence with the core action front-loaded and the conditional/failure behavior following immediately; no filler, and each clause carries distinct information.

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 three-parameter mutation tool with no output schema, the description covers the critical behavioral risks (dirty tree refusal, conflict abort, unchanged repo). The remaining gap is minor: repo_path's expected value and what the tool returns on success are left implicit.

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 67%: source_branch and fast_forward_only are already documented in the schema, and repo_path is undocumented in both places. The description reinforces fast_forward_only's meaning (default fast-forward, false allows divergence) but adds no new syntax or format detail, so the schema is still doing most of the work.

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?

The description opens with a specific verb and resource ("Merges a branch into the current branch") and names the target scope explicitly, so an agent can distinguish it from siblings like git_checkout or git_create_branch without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the operation (merge a branch when you want its commits on the current branch), and the default fast-forward behavior is stated, but there is no explicit when-to-use/when-not guidance and no mention of alternatives such as rebasing or checking out before merging.

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