Skip to main content
Glama

status

Check the status of a Git repository with an absolute path to identify changes, untracked files, and branch information for streamlined version control.

Instructions

Get repository status

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 function that executes the 'git status' command, validates the repository path, uses caching, and returns the formatted status output as a GitToolResult.
    static async status(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( 'status', context.operation, repoPath ); return { content: [{ type: 'text', text: CommandExecutor.formatOutput(result) }] }; }, { useCache: true, stateType: RepoStateType.STATUS, command: 'status' } ); }
  • Registration of the 'status' tool in the MCP tools list, including name, description, and JSON input schema definition.
    { name: 'status', description: 'Get repository status', inputSchema: { type: 'object', properties: { path: { type: 'string', description: `Path to repository. ${PATH_DESCRIPTION}`, }, }, required: [], }, },
  • Switch case in the tool executor that handles 'status' tool calls by validating arguments and delegating to GitOperations.status.
    case 'status': { const validArgs = this.validateArguments(operation, args, isPathOnly); return await GitOperations.status(validArgs, context); }
  • JSON schema defining the input parameters for the 'status' tool (optional path).
    inputSchema: { type: 'object', properties: { path: { type: 'string', description: `Path to repository. ${PATH_DESCRIPTION}`, }, }, required: [], },

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