Skip to main content
Glama

remote_remove

Remove a specified remote from a Git repository by providing the repository path and remote name. Supports enhanced Git operations through the Git MCP Server.

Instructions

Remove a remote

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesRemote name
pathNoPath to repository. MUST be an absolute path (e.g., /Users/username/projects/my-repo)

Implementation Reference

  • Implements the core logic for the remote_remove tool by executing the 'git remote remove' command with proper validation, error handling, caching, and result formatting.
    static async remoteRemove({ path, name }: RemoteOptions, context: GitToolContext): Promise<GitToolResult> {
      const resolvedPath = this.getPath({ path });
      return await this.executeOperation(
        context.operation,
        resolvedPath,
        async () => {
          const { path: repoPath } = PathValidator.validateGitRepo(resolvedPath);
          PathValidator.validateRemoteName(name);
          
          const result = await CommandExecutor.executeGitCommand(
            `remote remove ${name}`,
            context.operation,
            repoPath
          );
    
          return {
            content: [{
              type: 'text',
              text: `Remote '${name}' removed successfully\n${CommandExecutor.formatOutput(result)}`
            }]
          };
        },
        {
          command: 'remote_remove',
          invalidateCache: true, // Invalidate remote cache
          stateType: RepoStateType.REMOTE
        }
      );
    }
  • Registers the dispatching logic for the 'remote_remove' tool, validating arguments with isRemoteOptions and delegating to GitOperations.remoteRemove.
    case 'remote_remove': {
      const validArgs = this.validateArguments(operation, args, isRemoteOptions);
      return await GitOperations.remoteRemove(validArgs, context);
    }
  • Defines the tool schema for 'remote_remove' including input properties for path (optional) and name (required), advertised to MCP clients.
      name: 'remote_remove',
      description: 'Remove a remote',
      inputSchema: {
        type: 'object',
        properties: {
          path: {
            type: 'string',
            description: `Path to repository. ${PATH_DESCRIPTION}`,
          },
          name: {
            type: 'string',
            description: 'Remote name',
          },
        },
        required: ['name'],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Remove a remote' but doesn't explain what 'remove' entails (e.g., deletion from configuration, irreversible action, permissions required, or error handling). This is inadequate 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 with zero waste. It's appropriately sized and front-loaded, making it easy to parse without unnecessary elaboration.

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 the tool's complexity (a mutation operation with no annotations and no output schema), the description is incomplete. It lacks details on behavior, error cases, or what happens upon removal, leaving significant gaps for an agent to understand the tool fully.

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%, with clear descriptions for both parameters ('name' and 'path'). The description doesn't add any meaning beyond the schema, such as explaining how parameters interact or providing examples. Baseline 3 is appropriate as the schema does the heavy lifting.

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 ('Remove') and the resource ('a remote'), which is specific and unambiguous. However, it doesn't distinguish this tool from sibling tools like 'remote_add' or 'remote_list' beyond the verb, missing explicit 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?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't mention prerequisites (e.g., needing an existing remote) or compare it to sibling tools like 'remote_list' for checking remotes first. This leaves the agent without context for appropriate invocation.

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

Related 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/Sheshiyer/git-mcp-v2'

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