Skip to main content
Glama
saitolume

git-mcp-server

by saitolume

git-mcp-server: Merge remote ref

git_merge
Destructive

Merge a specified remote-tracking ref from a fetch session into the current local branch, using fast-forward or native merge, and creating a merge session for conflicts.

Instructions

Operation: Merge the exact remote_ref and object bound to one fetch_id. Returns: request_id, repository_id, head, nullable merge_session_id, and conflicted paths. Defaults: allow fast-forward or a native merge commit; conflicts create an owned session. Excludes: rebase, arbitrary local refs or unobserved object IDs, and external merge sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fetch_idYesBridge-issued fetch session ID that binds the allowed remote-tracking observation.
remote_refYesExact origin remote-tracking ref observed in fetch_id; arbitrary local refs are forbidden.
repositoryYesAbsolute path to the exact target Git worktree for this mutation.
request_idYesClient-generated UUID that makes this mutation durable and idempotent for exact replay.
expected_headYesExact current local HEAD object ID expected before mutation; mismatch rejects without Git mutation.
expected_branchYesExact current local branch name expected before mutation; mismatch rejects without Git mutation.
expected_remote_objectYesExact Git object ID that fetch_id observed at remote_ref.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
errorNo
statusYes
warningsYes
operationYes
request_idNo
repository_idNo
observed_afterNo
observed_beforeNo
Behavior5/5

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

Beyond annotations (destructiveHint: true), the description details that conflicts create an owned session, returns nullable merge_session_id, and excludes external sessions, providing full behavioral context.

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: first states operation and returns, second covers defaults and exclusions. No redundancy, front-loaded.

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?

Given output schema exists, description covers necessary behavioral aspects and return fields. All required params are in 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 baseline is 3. Description adds little beyond schema (e.g., defaults mention fast-forward/merge commit) but does not elaborate parameter usage.

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 explicitly states the action (merge), the resource (remote_ref and object bound to fetch_id), and distinguishes from siblings by excluding rebase, arbitrary local refs, and external merge sessions.

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

Usage Guidelines4/5

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

The description provides defaults and conflict behavior but does not explicitly compare to sibling tools like git_merge_continue or git_push, leaving room for ambiguity in when to use this tool.

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

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