Skip to main content
Glama

restore_file

Restores a file to a specified previous version. The restoration is recorded in history, so you can undo it if needed.

Instructions

Vuelve un archivo a como quedó en la versión version_id (ver file_history). La restauración también queda en el historial, así que se puede deshacer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
version_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosing side effects. It states that restoration adds to the history and is therefore undoable, which is a key behavioral trait. It does not mention permissions or error behavior, but for a simple mutation tool, this is adequate and goes beyond a bare 'restore' statement.

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 two sentences, with the core action front-loaded and the side effect (history entry/undoability) in the second sentence. Every word earns its place; there is no fluff or redundancy.

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 tool with only two required parameters and an output schema (not detailed), the description covers the action, the source of version_id, and the reversibility. It does not detail when to use vs. alternatives, but that is addressed under usage guidelines. Overall, it is sufficient for an agent to call it correctly without additional context.

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?

The schema has zero description coverage for both parameters, so the description must compensate. It explains that version_id refers to a version from file_history, giving context that the schema lacks. Path is implicitly understood as the file to restore. This adds meaningful semantics, though it could be more explicit about the path parameter.

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 a specific verb and resource: 'restore a file to how it was in version version_id'. It distinguishes itself from siblings like read_file, write_file, and file_history by focusing on the action of restoring a prior version, which is unambiguous.

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?

It references 'file_history' as a source for version_id, implying the agent should consult history first to obtain a valid version. However, it does not explicitly state when to use this tool over alternatives like write_file or when not to use it. The guidance is implied rather than explicit, so it falls short of a higher score.

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