Skip to main content
Glama
AleBrito124356

mcp-git-historian

Find when code appeared or disappeared

find_change
Read-onlyIdempotent

Trace when a code pattern was introduced or removed in a Git repository by returning commits where its occurrence count changed.

Instructions

Find when a piece of code appeared or disappeared using git's pickaxe (log -S): returns the commits where the number of occurrences of the pattern changed, i.e. the code was actually added or removed (unlike -G, which also matches lines that merely moved). Great for "when was this constant/function introduced?" forensics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoOptional file (relative to the repository root) to restrict the search to; followed across renames.
limitNoMaximum number of commits to return.
regexNoUse git's -G (regex matched against changed lines, also catches edits and moves) instead of the -S pickaxe.
patternYesExact code snippet or identifier to track, e.g. 'MAGIC_TOKEN' (a regex only when regex=true).
repo_pathYesAbsolute path to a local git repository, or to any folder inside one (a sub-folder scopes the analysis to it).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so safety is covered. The description adds genuine behavioral context: it explains that only commits where the occurrence count changed are returned, and that -G also matches edits and moved lines — useful for interpreting results.

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?

Two tight sentences, front-loaded with the core purpose followed by a parenthetical clarification and a usage hook. Every clause earns its place with no redundancy.

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 read-only query tool with a full schema and an output schema, the description is essentially complete: it covers what it does, how it differs from -G, and a motivating use case. The only omission is routing to sibling tools for related questions.

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%, so all five parameters are already documented in the schema, including the file, limit, regex, and repo_path semantics. The description's -S/-G explanation reinforces the regex parameter but does not add meaning beyond what the schema already provides, so baseline 3 applies.

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?

States a specific verb+resource: finding commits where a code pattern appeared or disappeared, and explains the -S pickaxe mechanism vs the -G regex mode. It is very clear what it does, but it does not distinguish itself from siblings like search_commits or file_history, which an agent might otherwise confuse it with.

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

Usage Guidelines4/5

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

"Great for 'when was this constant/function introduced?' forensics" gives a concrete use case and the -S vs -G contrast implies when to keep regex=false. However, there are no explicit when-not conditions or named alternative tools for adjacent use cases.

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