Skip to main content
Glama

file_history

Retrieve recent commits for a file with pull request and issue context to understand code changes and their purpose.

Instructions

Returns the N most recent commits that touched a file, each annotated with its associated pull request and linked issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the file
limitNoNumber of commits to return (default 10)
repo_pathNoWorking directory / repo root (defaults to cwd)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool returns data (non-destructive) but lacks critical details: whether it requires authentication, rate limits, error handling, pagination behavior, or what happens with invalid inputs. The mention of 'annotated with pull request and linked issues' hints at enriched output but doesn't specify format or completeness guarantees.

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?

The description is a single, dense sentence with zero wasted words. It front-loads the core functionality ('Returns the N most recent commits that touched a file') and efficiently adds value with the annotation detail. Every element earns its place, making it highly scannable and informative.

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?

For a read-only tool with 3 parameters (100% schema coverage) but no output schema or annotations, the description is minimally complete. It clarifies the tool's purpose and output nature but lacks behavioral context (e.g., error cases, performance). The absence of output schema means the description doesn't explain return values, though it hints at enriched data structure.

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 parameters are fully documented in the schema. The description adds no additional parameter semantics beyond what's in the schema (e.g., no clarification on 'file' path format, 'limit' constraints, or 'repo_path' resolution). Baseline score of 3 reflects adequate but minimal value addition over structured 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?

The description clearly states the specific action ('Returns'), resource ('N most recent commits that touched a file'), and scope ('each annotated with its associated pull request and linked issues'). It distinguishes itself from siblings like 'blame_context' (line-level attribution) and 'search_commits' (general commit search) by focusing on file-specific commit history with rich annotations.

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?

The description implies usage for retrieving annotated commit history for a specific file, but provides no explicit guidance on when to choose this tool over alternatives like 'commit_story' or 'file_contributors'. There's no mention of prerequisites, limitations, or comparative use cases, leaving the agent to infer context from tool names alone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/muhannad-hash/git-context-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server