Skip to main content
Glama

file_history

Trace a file's commit history newest first, with rename tracking and line additions/deletions per commit.

Instructions

Commits that touched a file, newest first, following it across renames (reports the earlier names). Shows lines added/deleted per commit.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "file_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoHEAD
pathYes
repoNo
limitNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description must carry behavior itself, and it does disclose two non-obvious traits: results are newest-first and renames are followed with earlier names reported, plus per-commit line stats. It omits other behavior an agent would want — whether the file must exist, what path is relative to, pagination beyond the limit, and permission/rate-limit expectations.

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, front-loaded with the core action, with every clause adding usable information (ordering, rename handling, line stats). Nothing is redundant or padded.

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

Completeness3/5

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

An output schema exists, so return shape needn't be explained, and the description covers the core semantics well. But for a tool with four fully undocumented parameters and zero annotations, the definition leaves notable gaps around repo/ref selection and path resolution.

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 0% for four parameters, so the description must compensate and largely does not. 'A file' loosely maps to path, but ref (which revision to start from), repo (which repository when multiple exist), and limit (default 30) are all undiscussed.

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?

Names a concrete verb+resource pair ('Commits that touched a file') and adds scope detail: newest-first ordering, rename following, and line add/delete counts. That is clearly distinguishable from siblings like churn_timeline or commit_search. It stops short of naming any sibling explicitly, so it sits at 4 rather than 5.

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 scope: an agent can infer 'use this to trace one file's history' but the description never states when to prefer this over commit_search, churn_timeline, or hotspots, nor any exclusions or prerequisites. Nothing is misleading, but the routing guidance is left to inference.

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