Skip to main content
Glama
ConnorBoetig-dev

Unrestricted Development MCP Server

git_merge

Merge a branch into your current working branch to integrate changes from development work. Supports merge commits and abort options for version control management.

Instructions

Merge a branch into current branch

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchYesBranch to merge into current branch
cwdNoRepository directory
noFfNoCreate merge commit even if fast-forward is possible
abortNoAbort current merge

Implementation Reference

  • The main handler function that executes the git merge command using executeGitCommand, supporting abort and no-ff options.
    export async function gitMerge(args: z.infer<typeof gitMergeSchema>): Promise<ToolResponse> {
      if (args.abort) {
        return executeGitCommand('git merge --abort', args.cwd);
      }
      const noFfFlag = args.noFf ? '--no-ff' : '';
      return executeGitCommand(`git merge ${noFfFlag} ${args.branch}`.trim(), args.cwd);
    }
  • Zod schema defining input parameters for the git_merge tool, used for validation.
    export const gitMergeSchema = z.object({
      branch: z.string().describe('Branch to merge into current branch'),
      cwd: z.string().optional().describe('Repository directory'),
      noFf: z.boolean().optional().default(false).describe('Create merge commit even if fast-forward is possible'),
      abort: z.boolean().optional().default(false).describe('Abort current merge')
    });
  • src/index.ts:401-403 (registration)
    Registration in the main MCP server tool dispatcher: validates arguments and calls the gitMerge handler for 'git_merge' tool calls.
    if (name === 'git_merge') {
      const validated = gitMergeSchema.parse(args);
      return await gitMerge(validated);
  • MCP tool specification in gitTools array, defining name, description, and input schema for listing tools.
    {
      name: 'git_merge',
      description: 'Merge a branch into current branch',
      inputSchema: {
        type: 'object',
        properties: {
          branch: { type: 'string', description: 'Branch to merge into current branch' },
          cwd: { type: 'string', description: 'Repository directory' },
          noFf: { type: 'boolean', default: false, description: 'Create merge commit even if fast-forward is possible' },
          abort: { type: 'boolean', default: false, description: 'Abort current merge' }
        },
        required: ['branch']
      }
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('merge') but doesn't mention potential side effects like creating merge commits, handling conflicts, or requiring specific git states. This leaves significant gaps for a mutation tool.

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?

The description is a single, clear sentence with zero wasted words. It's front-loaded with the core action and appropriately sized for the tool's complexity, making it highly efficient.

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

Completeness2/5

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

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral traits, error handling, and return values, which are crucial for safe and effective use in a git context.

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%, so the schema already documents all parameters thoroughly. The description doesn't add any meaning beyond what the schema provides, such as explaining parameter interactions or edge cases, meeting the baseline for high coverage.

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?

The description clearly states the verb ('merge') and resource ('a branch into current branch'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like git_rebase or git_pull that also involve integrating changes, missing full sibling differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives like git_rebase or git_pull, nor does it mention prerequisites such as having a clean working directory or resolving merge conflicts. Usage context is implied but not explicit.

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/ConnorBoetig-dev/mcp2'

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