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'] } },

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