Skip to main content
Glama
modelcontextprotocol

git MCP server

Official

git_status

Read-onlyIdempotent

Show the working tree status of a Git repository by providing its path.

Instructions

Shows the working tree status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYes

Implementation Reference

  • The actual handler function for git_status tool. Calls repo.git.status() to get the working tree status.
    def git_status(repo: git.Repo) -> str:
        return repo.git.status()
  • Pydantic input schema for git_status tool, requiring only 'repo_path' as a string.
    class GitStatus(BaseModel):
        repo_path: str
  • Tool registration in list_tools(). Defines name='git_status' via GitTools.STATUS enum, description, inputSchema, and annotations.
    return [
        Tool(
            name=GitTools.STATUS,
            description="Shows the working tree status",
            inputSchema=GitStatus.model_json_schema(),
            annotations=ToolAnnotations(
                readOnlyHint=True,
                destructiveHint=False,
                idempotentHint=True,
                openWorldHint=False,
            ),
  • Tool dispatch in call_tool() - matches GitTools.STATUS and calls git_status(repo).
    match name:
        case GitTools.STATUS:
            status = git_status(repo)
            return [TextContent(
                type="text",
                text=f"Repository status:\n{status}"
            )]
  • Enum definition mapping STATUS to the string 'git_status' used for tool routing.
    class GitTools(str, Enum):
        STATUS = "git_status"
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true, fully covering safety and idempotency. The description adds no behavioral context beyond this, such as what specific information is shown or how it handles edge cases. It neither contradicts nor significantly extends the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no wasted words. It conveys the core purpose efficiently, though it sacrifices detail for brevity.

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 lack of an output schema, the description should explain what the tool returns (e.g., list of changes, file states). It does not, leaving the agent to infer the output format. The description is insufficient for a tool that likely produces structured output, even with helpful annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter 'repo_path' lacks a description in both the schema (0% coverage) and the tool description. The description does not explain what repo_path is, its format, or how to specify it (e.g., absolute vs relative path). This is a significant gap given the parameter is required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Shows the working tree status' uses a specific verb ('Shows') and resource ('working tree status'), clearly distinguishing it from sibling tools like git_diff (which show diffs) or git_log (which shows history).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies that the tool is used to inspect the current state of the working tree, but it provides no explicit guidance on when to use this tool versus alternatives (e.g., git_diff, git_log) or when not to use it. The usage context is implied by the tool name and description but not elaborated.

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/modelcontextprotocol/git'

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