Skip to main content
Glama

revert_patch

Undo an applied patch by ID, restoring the original file from Git's object store. Use when a code rewrite must be rolled back.

Instructions

Undo one patch by id, restoring the file from the blob saved in git's object store before it was applied.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patch_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

B3.2/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 burden and does disclose the mechanism: the file is restored from a blob saved in git's object store from before the patch. That is genuinely useful behavioral context, but it omits whether the operation is destructive to later edits, permission/auth requirements, and failure behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no wasted words; the action verb leads and the restore mechanism follows. Efficient and well-structured for its length.

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 one-parameter mutation tool with no annotations and no output schema, the description explains the core action and mechanism adequately. It leaves gaps on destructiveness to subsequent changes and error conditions that an agent performing an undo would want.

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?

Only one parameter (patch_id, string) with 0% schema coverage. The phrase 'one patch by id' confirms the id identifies a single patch, adding marginal meaning, but formats, acceptable values, and where ids come from are not explained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (undo) and resource (one patch, by id), and the mechanism clarifies scope precisely. It implies patch-level granularity that differs from the sibling revert_session, though it never names that sibling to make the distinction explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance is given. The description never tells the agent when to reach for revert_patch versus the sibling revert_session, patch_group, or the various fix_* tools, and states no prerequisites for a valid revert.

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