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: [],
    },
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 but offers minimal information. It doesn't specify what data is returned (e.g., file changes, branch state), whether it's read-only (implied but not stated), performance characteristics, or error conditions. The description merely restates the action without behavioral context.

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 extremely concise at just three words ('Get repository status'), with zero wasted language. It's front-loaded with the core action and resource. Every word earns its place, making it efficient for quick understanding.

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 moderate complexity (repository status can involve multiple data types) and the absence of both annotations and output schema, the description is insufficiently complete. It doesn't explain what 'status' includes, the return format, or error handling. For a tool with no structured output documentation, the description should provide more context about what information is retrieved.

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?

The schema has 100% description coverage for its single parameter ('path'), so the description doesn't need to add parameter details. The description doesn't mention the 'path' parameter at all, which is acceptable since the schema fully documents it. This meets the baseline for high schema coverage.

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 'Get repository status' clearly states the verb ('Get') and resource ('repository status'), making the tool's purpose immediately understandable. However, it doesn't differentiate this from sibling tools like 'stash_list' or 'tag_list' which also retrieve status information about different repository aspects, so it doesn't achieve full sibling 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?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of what 'repository status' includes (e.g., staged/unstaged changes, branch info) or when to choose this over other status-related tools like 'stash_list' or 'branch_list'. The agent must infer usage from the tool name alone.

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