Skip to main content
Glama

get_file_history

Lists a file's commit history at a branch, tag, or commit without cloning, returning paths and commit hashes across renames.

Instructions

List a file's history at a branch, tag or commit without cloning.

Returns paths and full commit hashes, preserving paths reported by Bitbucket
across renames. Use get_commit for author, message and date; Bitbucket omits
those from filehistory. Follow next_cursor until has_more is false.
cursor keeps its issued page size; limit only applies to the first page.

Input Schema

NameRequiredDescriptionDefault
refNomain
pathYes
limitNo
cursorNo
repo_slugYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

With zero annotations the description carries the full load, and it delivers: rename-preserving paths, full rather than abbreviated hashes, and a non-obvious pagination quirk ('cursor keeps its issued page size; limit only applies to the first page'). It stops short of stating auth/scoping requirements or error behavior, so not a 5.

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 short sentences, front-loaded with what the tool returns, then the sibling redirect, then pagination. No sentence is filler and each adds a distinct fact.

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 5-parameter, no-output-schema, no-annotation tool this is close to sufficient: it describes the returned fields, the delta versus get_commit, and how to page. Missing only repo_slug semantics and any note on default ref resolution.

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 0%, so the description must compensate, and it does for the hard parts: ref is characterized as branch/tag/commit, and the cursor/limit interaction is explained in a way the bare schema cannot convey. It leaves repo_slug and the 'main'/20 defaults unaddressed, keeping it off a 5.

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 a file's history') plus the scoping qualifier ('at a branch, tag or commit without cloning'), which distinguishes it from get_commit and get_file_content. An agent knows immediately what it would get back and at what granularity.

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 routes the agent away from this tool for author/message/date metadata by naming get_commit and explaining why ('Bitbucket omits those from filehistory'). It also gives a concrete continuation procedure ('Follow next_cursor until has_more is false'), so both selection and usage are covered.

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