Skip to main content
Glama

Git info

git_info
Read-onlyIdempotent

Summarizes a Git repository's branch, HEAD, uncommitted changes, remotes, and recent commits so agents can inspect repository state before acting.

Instructions

Summarise a git repo: branch, HEAD, uncommitted changes, remotes, recent commits.

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_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoAny path inside the repository..
max_commitsNo

Output Schema

NameRequiredDescriptionDefault
headYesHEAD commit SHA, or null in an empty repository.
branchYesCurrent branch, or null on a detached HEAD.
remotesYes
is_dirtyYes
repo_rootYesRepository root, relative to the workspace.
changed_filesYesPorcelain status lines, e.g. ' M src/app.py'.
recent_commitsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and openWorldHint=false, so the safety profile is covered. The description adds the scope of what is inspected (working tree state, remotes, commit history), but says nothing about failure behavior for a non-repo path, permissions, or cost. Since an output schema exists, the enumeration partly duplicates the documented return shape.

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?

A single front-loaded sentence with the resource stated first and the covered facets listed after; there is no filler or redundant restatement of the tool name.

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

Completeness4/5

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

For a simple read-only inspection tool with annotations and an output schema, the description covers what is gathered and needs not explain return values. The remaining gaps are minor: the meaning of max_commits and behavior when the path is not a git repository.

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

Parameters2/5

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

Schema description coverage is 50%: 'path' is documented in the schema as 'Any path inside the repository', but 'max_commits' has no description anywhere, and the description never mentions either parameter. 'recent commits' faintly gestures at max_commits but gives no meaning for a value of 0 or for the default, so the description does not compensate for the coverage gap.

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 names a specific verb ('Summarise') and resource ('git repo') and enumerates the exact contents covered: branch, HEAD, uncommitted changes, remotes, recent commits. It clearly separates this from generic file/query siblings, though it does not explicitly contrast with any named alternative.

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?

Usage is only implied by the word 'Summarise' and the enumerated contents — an agent can infer this is the tool for getting a repository overview. There is no explicit when-to-use/when-not-to-use statement, no mention of prerequisites such as the path needing to be inside a git repository, and no routing to alternatives.

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