Skip to main content
Glama

Git status

git_status
Read-only

Inspect the current local Git repository state—branch, upstream ahead/behind, and changed files with staged, unstaged, and untracked status—before committing, stashing, or opening a PR.

Instructions

Parsed local git status: branch, ahead/behind vs upstream, and every changed file with staged/unstaged/untracked state and staged/worktree status letters. Use when: you need the current repo state in a parseable form (before committing, stashing or opening a PR). Avoid when: you only need the raw command (shell_run) or a remote host’s CI status (ci_status). Output: ok, branch/detached, upstream (gone flag), ahead/behind, files[] {path, old_path?, staged, unstaged, untracked, unmerged, kind, status, index_status/worktree_status}, counts{}, clean.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "git_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathsNoOptional workspace-relative paths to limit the status.
reasonNoOptional why (max 400 chars), audit-logged.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuine value beyond that by disclosing the parsed return shape, including edge-case fields such as upstream 'gone' flag, detached HEAD, and unmerged entries, which an agent could not otherwise anticipate since no output schema exists. It stops short of noting anything about repo size, performance, or path-scope behavior, so it is strong but not exhaustive.

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 structure is excellent: purpose first, then use/avoid blocks, then output shape. The output enumeration is dense and long, but it earns its space because there is no output schema; only minor tightening of the field list would improve it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only, two-optional-parameter tool, the description covers purpose, selection criteria, exclusions, and the full return contract. Given no output schema exists, spelling out the result fields is exactly the right compensation, and nothing an agent needs to invoke it correctly is missing.

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 both `paths` and `reason` documented in-schema, so the baseline is 3. The description adds no further semantics for these parameters—it never mentions path scoping or audit logging—so it neither compensates nor detracts.

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 names a specific verb and resource ('Parsed local git status') and enumerates the returned dimensions (branch, ahead/behind, per-file staged/unstaged/untracked state, status letters). This is clearly distinguishable from adjacent tools like git_diff, git_log, or shell_run.

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

Usage Guidelines5/5

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

It gives both an explicit 'Use when' (before committing, stashing, or opening a PR) and an explicit 'Avoid when', naming the alternatives shell_run (raw command) and ci_status (remote CI status). The routing decision is fully determined without opening any schema.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.