Skip to main content
Glama
saitolume

git-mcp-server

by saitolume

git-mcp-server: Abort merge

git_merge_abort
Destructive

Abort a specific conflicted merge session and restore the original branch state. Requires repository, branch, HEAD, and merge session identifiers.

Instructions

Operation: Abort the exact owned merge_session_id and restore its original merge state. Returns: request_id, repository_id, and the restored head object ID. Defaults: all inputs are required and owned cleanup follows durable completion. Excludes: external merge sessions, generic reset, unrelated paths, and retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.
merge_session_idYesOwned conflicted merge-session ID to abort; external merge state is rejected.

Output Schema

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

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

Annotations indicate destructiveHint: true, and the description confirms the destructive nature by stating it aborts a merge and restores state. It adds specific context about requiring an 'owned' merge session and durable cleanup, which goes beyond the annotation hints.

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?

The description is two sentences long and conveys key information efficiently. It is front-loaded with the main action, though the phrasing 'exact owned merge_session_id' is somewhat dense. No superfluous content.

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?

Given the five required parameters and the presence of an output schema, the description adequately covers the tool's behavior, including return fields (request_id, repository_id, restored head). It provides enough context for an agent to understand the tool's purpose and constraints.

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?

All 5 parameters have schema descriptions, achieving 100% coverage. The description does not add significant new meaning beyond the schema, only reiterating that inputs are required. This meets the baseline for schema-rich tools.

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 clearly states the verb 'Abort' and the resource 'merge_session_id', specifying that it restores the original merge state. This distinguishes it from siblings like git_merge_continue and git_merge, which serve different purposes.

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 explicitly excludes 'external merge sessions, generic reset, unrelated paths, and retry', providing some guidance on when not to use. However, it does not explicitly contrast with alternatives like git_merge_continue or git_restore_worktree, leaving room for clearer usage context.

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