Skip to main content
Glama
ConnorBoetig-dev

Unrestricted Development MCP Server

git_pull

Fetch and integrate changes from remote Git repositories to keep local code synchronized with upstream developments.

Instructions

Fetch and integrate changes from remote repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoRepository directory
remoteNoRemote nameorigin
branchNoBranch to pull (defaults to current branch)
rebaseNoRebase instead of merge

Implementation Reference

  • The main handler function that constructs and executes the 'git pull' command using the shared executeGitCommand helper, handling optional parameters for remote, branch, rebase, and cwd.
    export async function gitPull(args: z.infer<typeof gitPullSchema>): Promise<ToolResponse> {
      const rebaseFlag = args.rebase ? '--rebase' : '';
      const branch = args.branch || '';
      return executeGitCommand(`git pull ${rebaseFlag} ${args.remote} ${branch}`.trim(), args.cwd);
    }
  • Zod schema defining the input parameters and validation for the git_pull tool.
    export const gitPullSchema = z.object({
      cwd: z.string().optional().describe('Repository directory'),
      remote: z.string().optional().default('origin').describe('Remote name'),
      branch: z.string().optional().describe('Branch to pull (defaults to current branch)'),
      rebase: z.boolean().optional().default(false).describe('Rebase instead of merge')
    });
  • MCP tool definition/registration in the gitTools array exported from git.ts, including name, description, and inputSchema for tool listing.
    {
      name: 'git_pull',
      description: 'Fetch and integrate changes from remote repository',
      inputSchema: {
        type: 'object',
        properties: {
          cwd: { type: 'string', description: 'Repository directory' },
          remote: { type: 'string', default: 'origin', description: 'Remote name' },
          branch: { type: 'string', description: 'Branch to pull (defaults to current branch)' },
          rebase: { type: 'boolean', default: false, description: 'Rebase instead of merge' }
        }
      }
    },
  • src/index.ts:385-388 (registration)
    Runtime dispatch/registration in the main MCP server handler that routes 'git_pull' calls to the gitPull function after schema validation.
    if (name === 'git_pull') {
      const validated = gitPullSchema.parse(args);
      return await gitPull(validated);
    }
  • Shared utility function that executes git commands via child_process.exec, handles errors, and formats standardized ToolResponse for all git tools including git_pull.
    async function executeGitCommand(command: string, cwd?: string): Promise<ToolResponse> {
      try {
        const { stdout, stderr } = await execAsync(command, {
          cwd: cwd || process.cwd(),
          shell: '/bin/bash',
          maxBuffer: 10 * 1024 * 1024 // 10MB buffer
        });
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                success: true,
                command: command,
                stdout: stdout.trim(),
                stderr: stderr.trim(),
                cwd: cwd || process.cwd()
              }, null, 2)
            }
          ]
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                success: false,
                command: command,
                stdout: error.stdout?.trim() || '',
                stderr: error.stderr?.trim() || error.message,
                exitCode: error.code || 1,
                cwd: cwd || process.cwd()
              }, null, 2)
            }
          ],
          isError: true
        };
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'fetch and integrate' implies a read/write operation that modifies the local repository, it doesn't specify potential side effects (e.g., merge conflicts, working directory changes), authentication requirements, error conditions, or what happens when parameters are omitted. The description is too minimal for a mutation tool with zero annotation coverage.

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, efficient sentence that communicates the core functionality without unnecessary words. It's front-loaded with the essential action and resource, making it immediately scannable and understandable.

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?

For a git operation tool with 4 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns, error conditions, typical workflows, or how it differs from related git operations. The combination of mutation behavior and lack of structured metadata requires more descriptive content than provided.

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 all parameters are documented in the schema itself. The description adds no additional parameter information beyond what's already in the structured schema fields. This meets the baseline expectation when schema coverage is high, but doesn't provide extra context about parameter interactions or typical usage patterns.

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 action ('fetch and integrate changes') and resource ('from remote repository'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from sibling git tools like 'git_fetch' or 'git_merge', which would require more specific scope definition.

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_fetch' (which only fetches) or 'git_merge' (which only merges). There's no mention of prerequisites (e.g., needing a git repository initialized), typical workflows, or when rebase vs merge is appropriate.

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