Skip to main content
Glama

File history

file_history
Read-onlyIdempotent

Trace a file's commit history on HEAD, newest first, following renames and showing added/removed lines. Use it to see how a file evolved or who changed it and when.

Instructions

List the commits on HEAD that changed a single file, newest first, following the file across renames. Each commit includes the path it had then and lines added/removed. Useful for "how did this file evolve?" and "who reworked it, and when?".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRepository-relative path of a single file, as named at HEAD.
repoNoRepository name or absolute path from the allowlist. Defaults to the first configured repo.
limitNoMaximum number of results (1-100).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe requested path, as it is named at HEAD.
repoYesName of the repository that was queried.
commitsYes
renamedYesTrue if the file had a different path in a listed commit.
truncatedYes
commitCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/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 the safety profile is covered. The description adds behavior the annotations cannot: results are HEAD-scoped, newest-first, rename-following, and each entry carries the historical path plus added/removed line counts.

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 sentences, no filler: the first front-loads the operation, scope, ordering and rename behavior; the second anchors the use cases. Every clause carries information an agent needs.

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?

With annotations covering safety, an output schema covering return structure, and a fully documented schema for repo/limit/path, the description only needs to supply scope and rename semantics — which it does. Nothing required to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real semantic value for 'path': although it must be named as at HEAD, the traversal follows renames, clarifying that the parameter is a starting point rather than a strict revision filter.

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?

States a specific verb and resource ('List the commits on HEAD that changed a single file') plus ordering ('newest first') and a distinctive scope ('following the file across renames'). This clearly separates it from siblings like commit_search (commit-message search) and file_hotspots (aggregate churn ranking) without needing their schemas.

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?

Gives concrete usage contexts via the example questions ('how did this file evolve?', 'who reworked it, and when?'), which tell an agent when this tool is the right pick. It stops short of naming alternatives or exclusions (e.g., 'for repo-wide search use commit_search'), so it is clear context without routing.

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