Skip to main content
Glama

Revert File

revert_file

Restores a file to its state before the first write in the current session, letting AI agents undo debugging edits when a fix makes things worse.

Instructions

Restaura un archivo a como estaba antes del primer write_file de esta sesion. Usar si un intento de fix empeoro las cosas.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "revert_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the key trait — that ALL writes from the session are discarded, not just the last one — but is silent on irreversibility, whether the revert can itself be undone, permission requirements, and what happens if the file was never written this session.

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 short sentences, zero filler, with the critical baseline definition front-loaded before the usage hint. Nothing redundant is included.

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?

An output schema exists so return values need not be explained, and the core semantics are covered. Still, for a destructive, non-annotated mutation, missing details on irreversibility, no-op cases, and path semantics leave real gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single required parameter 'path' has 0% schema description coverage, so the description is solely responsible for clarifying it, and it says nothing about the parameter at all. It does not state whether the path is absolute or relative, or how a non-existent or unmodified file is handled.

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 names a specific verb and resource ('Restaura un archivo') and pins the target state precisely: the file as it was before the first write_file of the current session. That scoping makes it unmistakable against write_file and read_file without needing to open either schema.

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?

It gives an explicit use condition: invoke when a fix attempt made things worse. That is a clear trigger, but it offers no when-not guidance (e.g., after the session ends, or when no write occurred), leaving edge-case routing to inference.

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