Skip to main content
Glama

Discard an undo point

wp_undo_discard
Destructive

Permanently discard an undo point and its snapshot without restoring anything once a change is confirmed good, or drop all account undo points with all=true.

Instructions

Throw away an undo point and its snapshot without restoring anything; this is permanent, the change it covered can then no longer be undone. Meant for a change confirmed good; all=true drops all of the account's own undo points at once. Discarding needs the same permission and access level as undoing the original tool: a token that is malformed, no longer stored or not the account's own, or one this connection may not act on, is refused; with all=true such points are kept and counted in kept. Returns discarded (the count) and token, or all. Other users' undo points are never touched.

Input Schema

NameRequiredDescriptionDefault
allNotrue discards all of the account's own undo points; token is then ignored.
tokenNoThe undo token to discard (undo_…), as wp_undo_list or the original result shows it. Needed unless all=true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.10.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructive; the description goes further by explaining the irreversibility (the covered change can no longer be undone), the permission/access level mirroring the original tool, refusal behavior for malformed, expired or foreign tokens, and a failure mode where all=true keeps such points and counts them in kept. It also guarantees other users' undo points are never touched — context no structured field carries.

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?

Front-loads the destructive action and its permanence before permissions, return values and edge cases. It is dense and clause-packed, but essentially every sentence contributes a distinct constraint; minor readability cost from the semicolon chaining.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description usefully specifies return values (discarded count and token, or all) and the kept count on all=true. Permissions, failure modes and cross-user isolation are all covered, leaving nothing an agent needs missing.

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?

Schema coverage is 100%, so baseline is 3; the description adds real semantics: all=true discards every one of the account's own points, token is then ignored, and the elsewhere-documented token ownership refusal. Token format (undo_…) is already in the schema, so only marginal value is added there.

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?

Specific verb and resource ("Throw away an undo point and its snapshot") with an explicit negative scope ("without restoring anything"), which implicitly separates it from the wp_undo and wp_undo_list siblings. The agent knows exactly what is destroyed and what is not done.

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?

States the intended moment ("Meant for a change confirmed good") and covers the bulk alternative via all=true. It never names the wp_undo / wp_undo_list siblings by name, so the agent has to infer the routing from semantics rather than from an explicit pointer.

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

Deploy Server

Other Tools