Skip to main content
Glama

git_git_rollback_file

Restore any file to its exact state from a specified commit. Defaults to the last commit, effectively undoing recent changes.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
relative_pathYes
shaNoHEAD

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

No annotations provided, so description must disclose side effects. It mentions restore and default commit but lacks details on reversibility, permissions, or error conditions.

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?

Single, concise sentence with relevant information, no unnecessary content.

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

Completeness2/5

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

Lacks context for a mutation tool without annotations; fails to explain prerequisites, effects on git history, or required permissions. Output schema exists but doesn't cover behavioral expectations.

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?

Adds meaning to 'sha' parameter by explaining default (HEAD) and undo behavior, but does not elaborate on 'relative_path' beyond its name.

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 it restores a single file to a specific commit's state, and differentiates from sibling tools like git_git_rollback_to_commit by specifying 'single file'.

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?

Indicates use for single file restoration with default undo behavior, but does not explicitly compare alternatives or state when not to use.

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