Skip to main content
Glama

git_git_rollback_file

Restore a single file to its state at a specific commit (default HEAD). Use confirm=true to execute after a safety prompt.

Instructions

Restore a single file to its state at a specific commit (default: HEAD = undo uncommitted changes).

Set confirm=True to proceed; without it returns a safety prompt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
relative_pathYes
shaNoHEAD
confirmNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description carries full burden. It discloses the safety prompt and default commit behavior but does not detail side effects (e.g., working tree changes, no commit creation). It lacks permissions or idempotency info. Acceptable but not thorough.

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 concise sentences with no waste. Information is front-loaded, clear, and efficient.

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?

Given complexity (3 params, git operation, output schema exists), the description covers key aspects: what it does, default, safety requirement. It omits finer points like file must exist in commit or output format, but for typical use it is sufficient.

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 has 0% description coverage, so description must compensate. It adds meaning for sha (default HEAD = undo uncommitted) and confirm (must be true to proceed). But relative_path is not described beyond being a file path. Partial compensation.

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 tool restores a single file to its state at a specific commit. It uses a specific verb (restore) and resource (single file). It distinguishes from sibling tools like git_git_rollback_to_commit (whole repo) and git_git_diff (show changes) by focusing on file-level rollback.

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?

The description explains default behavior (HEAD = undo uncommitted changes) and the safety mechanism (confirm=True to proceed). It implies when to use (file rollback) and not to use (whole repo rollback uses a different tool). Some explicit mention of alternatives would raise score to 5.

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/Fistacho/ha-nexus-agent'

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