Skip to main content
Glama

Discard local edits

discard_local_changes
DestructiveIdempotent

Discard all local edits, new files, and unpushed commits to reset a project clone to its current Overleaf version, useful when conflicts block pushing.

Instructions

Permanently throw away every local edit, new file and unpushed commit in one project's clone, fetching Overleaf first so the clone ends up matching its current version. The discarded work cannot be recovered from this server. Call show_diff first, and only call this once the user has said the work should be abandoned. Its main use is after push_changes refuses a conflicting change: the clone cannot be pushed again until the conflicting local commits are either published or discarded here. Only the chosen project is reset; pending work in other projects is untouched. Returns how many edited files and unpushed commits were discarded, or that there was nothing to discard.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoWhich project to use: its Overleaf address, its 24-character id, or a registered project name. Omit to use the default project.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.8

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds non-obvious behavior: it fetches Overleaf first, the discarded work 'cannot be recovered from this server', the reset is scoped to one project, and it returns discard counts. That is meaningful context beyond the annotation flags.

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?

Front-loaded with the destructive action and its scope, then prerequisites and the push_changes use case; each sentence carries distinct, load-bearing information with no 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?

Covers the key gaps for a destructive no-output-schema tool: irreversibility, scope, prerequisite, and a summary of the return value. Slightly less complete on failure modes (e.g., what happens if the fetch or reset fails mid-way), but otherwise sufficient to call correctly.

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?

Schema description coverage is 100% and the single 'project' parameter is fully documented in the schema (address, id, or name, with a default). The description only adds scoping semantics ('Only the chosen project is reset'), so the baseline 3 for schema-complete params applies.

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 destructive verb and resource ('permanently throw away every local edit, new file and unpushed commit in one project's clone') and clarifies the resulting state ('clone ends up matching its current version'). An agent can distinguish it from siblings like delete_file or push_changes without opening any schema.

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?

Explicit preconditions ('Call show_diff first', 'only call this once the user has said the work should be abandoned') and an explicit use case ('after push_changes refuses a conflicting change'), naming the siblings involved. This is exactly the when/when-not guidance the dimension asks for.

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