Skip to main content
Glama

files.get_history

Retrieve a file's git commit history (newest first) with hash, message, date, and author. Use to understand file evolution before editing or restoring.

Instructions

Return the git commit history for one file (newest first), each entry with hash, message, date, and author. Reads the file's owning repo: the project's git repo for project files, the KB backup repo for KB files. Read-only; no side effects, auth, or rate limits. Returns {file_id, path, history}; an empty array means the file has not been committed yet. Use to understand a file's evolution before editing or restoring. Pair with files.get_diff to see exact line changes; use files.restore to roll back.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYesID of the file

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.7.2

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and covers it thoroughly: read-only, no side effects, no auth, no rate limits, which repo is read for which file type, exact return shape, and the meaning of an empty history array. No behavioral question is left unanswered.

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?

Four dense sentences with zero filler. The core action and ordering are front-loaded, followed by repo behavior, return format, and usage guidance, each sentence earning its place.

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 simple one-parameter tool with no output schema, the description is complete: it explains the result format, empty-array semantics, repo resolution, read-only safety, and relationship to sibling tools. Nothing an agent needs to select and 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 coverage is 100% and the single parameter file_id is already documented as 'ID of the file'. The description adds some useful context about which repo the ID refers to, but does not substantially extend parameter semantics beyond the schema.

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: 'Return the git commit history for one file (newest first)' with the exact entry fields. It also distinguishes itself from sibling tools by naming files.get_diff and files.restore as complementary rather than equivalent actions.

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?

Explicitly says when to use it ('to understand a file's evolution before editing or restoring') and names alternatives: pair with files.get_diff for line changes, use files.restore to roll back. This directly answers when-to-use vs alternatives.

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