Skip to main content
Glama

remote_list

List all remote repositories in a specified Git repository path using the Git MCP Server for enhanced Git operations.

Instructions

List remotes

Input Schema

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

Implementation Reference

  • The primary handler for the 'remote_list' tool. It validates the repository path, executes 'git remote -v', formats the output, and handles caching.
    static async remoteList(options: BasePathOptions, context: GitToolContext): Promise<GitToolResult> { const path = this.getPath(options); return await this.executeOperation( context.operation, path, async () => { const { path: repoPath } = PathValidator.validateGitRepo(path); const result = await CommandExecutor.executeGitCommand( 'remote -v', context.operation, repoPath ); const output = result.stdout.trim(); return { content: [{ type: 'text', text: output || 'No remotes configured' }] }; }, { useCache: true, stateType: RepoStateType.REMOTE, command: 'remote -v' } ); }
  • Defines the MCP input schema for the 'remote_list' tool, specifying the optional 'path' parameter.
    name: 'remote_list', description: 'List remotes', inputSchema: { type: 'object', properties: { path: { type: 'string', description: `Path to repository. ${PATH_DESCRIPTION}`, }, }, required: [], }, },
  • Dispatches execution of the 'remote_list' tool to the GitOperations.remoteList handler after validating arguments with isPathOnly.
    case 'remote_list': { const validArgs = this.validateArguments(operation, args, isPathOnly); return await GitOperations.remoteList(validArgs, context); }

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