Skip to main content
Glama
jesspig

git-mcp-server

by jesspig

git_merge

Destructive

Merge a branch into the current branch, integrating commits with or without a merge commit. Use to bring a feature branch back into its base or squash work into a single commit.

Instructions

Merge a branch into the current branch, integrating its commits with or without a merge commit. Use this to bring a feature branch back into its base when histories have diverged, or to squash a branch's work into one commit with squash=True. Does NOT rewrite the current branch's history — use git_rebase for that; use git_cherry_pick to port specific commits instead of a whole branch. Best for: integrating a feature branch back into the base branch. Returns: git merge output text; conflicts raise a ValueError with details — resolve them and retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchYesBranch to merge
squashNoSquash commits into a single merge
repo_pathNoPath to the git repository, defaults to '.' (the server working directory).
no_fast_forwardNoCreate a merge commit even if fast-forward is possible
Behavior5/5

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

Goes beyond the destructiveHint annotation by clarifying the operation does NOT rewrite the current branch's history, which is a critical behavioral distinction from rebase. Also discloses conflict handling: 'conflicts raise a ValueError with details — resolve them and retry.' These are meaningful behavioral traits not evident from annotations 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?

Five sentences, each earning its place: purpose, usage guidance, exclusions, best-for, and return/error behavior. No filler or repetition. The structure front-loads the core action and then logically expands to alternatives and edge cases.

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 tool with 4 parameters, no output schema, and a destructive operation, the description covers all key aspects: what it does, when to use it, what it doesn't do, alternatives, return value, and error handling. An agent can confidently invoke this tool and anticipate outcomes, including failure modes.

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 provides full descriptions for all 4 parameters (100% coverage), so the baseline for this dimension is 3. The description adds contextual meaning by mentioning 'squash=True' for consolidating commits and 'with or without a merge commit' which maps to no_fast_forward. However, this largely rearticulates what the schema already conveys, without adding new parameter semantics.

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?

States a specific verb+resource: 'Merge a branch into the current branch, integrating its commits.' Clearly distinguishes from siblings by explicitly naming git_rebase and git_cherry_pick as alternatives for different use cases. No ambiguity about what the tool does.

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?

Provides explicit when-to-use guidance: 'Use this to bring a feature branch back into its base when histories have diverged, or to squash a branch's work into one commit.' Also gives clear exclusions: 'use git_rebase for that; use git_cherry_pick to port specific commits instead of a whole branch.' This is model guidance for tool selection.

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/jesspig/git-mcp-server'

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