Skip to main content
Glama
This server has been deprecated

Rebranded to ComposeLint AI. Repository has been moved to TechsOneAi/ComposeLintAI.

reject_file_changes

Destructive

Discard incorrect modifications to a single file by reverting it byte-for-byte to its backup state before the edit. Use when changes need to be rolled back.

Instructions

Destructive: Reverts pending changes for a SINGLE file using .bridge.bak backup.

What it does: Rolls back byte-for-byte to the state before the recent surgical edit or replace_pattern.
When to use: When modifications to a specific file are incorrect and need to be discarded.
When NOT to use: File must be currently modified. Use reject_all_files for all files.
Side effects: Destructive rollback. Overwrites file with original backup and removes entry from journal.
Parameters:
  - file_path: relative path to project root (e.g., 'QuickActionsWidget.kt' or 'ui/theme/AppStrings.kt').
Returns:
  JSON string confirming rollback of the file.

Input Schema

NameRequiredDescriptionDefault
forceNo
file_pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Goes well beyond the annotations: annotations only say destructiveHint=true, while the description discloses that it restores byte-for-byte from a .bridge.bak backup, overwrites the file, and removes the entry from the journal, plus the precondition that the file must currently be modified. The gap is the undocumented `force` parameter, which plausibly bypasses that precondition and is never explained.

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?

Labeled sections (What it does / When to use / When NOT / Side effects / Parameters / Returns) make it scannable and front-load the destructive warning. Slightly verbose, and the Returns line is redundant given an output schema exists, but nothing is filler.

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 destructive, journal-backed rollback tool it covers mechanism, precondition, and side effects thoroughly, and the return value is covered by the output schema so it needn't be expanded. The only real hole is the unexplained `force` flag, which matters given the tool's destructive nature.

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?

Schema description coverage is 0%, so the description carries the full burden, yet it documents only file_path (with a relative-path rule and two concrete examples). The second parameter, `force`, is never mentioned, leaving an agent with no idea what it changes about the destructive behavior.

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?

States a specific verb and resource ("Reverts pending changes for a SINGLE file") and immediately names the mechanism (.bridge.bak backup), which distinguishes it from the sibling reject_all_files and from approve_file_changes. The "SINGLE file" emphasis paired with the explicit alternative makes it unambiguous which tool to pick.

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

Usage Guidelines5/5

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

Provides explicit "When to use" (modifications are incorrect and need discarding) and "When NOT to use" (file must be currently modified; use reject_all_files for all files), naming the alternative sibling directly. This is the textbook when/when-not/alternative structure.

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