Skip to main content
Glama

undo_delete

Undo the last delete at a location — a document, a directory, or a whole folder. Restores exactly what that one delete removed, at the version it had, with its sharing intact. Pass the same location that was deleted. Undoing twice is harmless: the second call finds nothing left to restore and says so. A document that was deleted before it ever had content cannot be restored and is reported separately rather than resurrected empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenNoBearer token identifying the principal. Usually omitted — supplied by the transport (HTTP Authorization header or the server's AGENTLEFS_TOKEN env). Only pass this to override.
locationYesfull path from the workspace root, e.g. "handbook/vendor/acme.md" (as printed by list_org_docs or search_org_knowledge)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral disclosure burden. It transparently covers idempotency, restoration of the prior version, preservation of sharing, and the cannot-restore-empty-document edge case. It does not address permission requirements or conflicts with existing items at the target location, but the major behaviors are disclosed.

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?

The description is composed of four focused, front-loaded sentences. Each sentence earns its place, with edge cases stated efficiently rather than padded.

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?

The tool is simple (one required parameter, no nested objects), and the description covers scope, idempotency, and a notable failure case. It does not detail the exact return payload, and there is no output schema to compensate, but it gives enough for an agent to invoke the tool correctly in most situations.

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?

The schema already provides 100% description coverage for both parameters, so the baseline is 3. The description adds the useful directive to pass the same deleted location and clarifies that location can be a document, directory, or folder, but largely reinforces rather than extends the schema.

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 states a specific verb ('Undo') and a specific resource ('the last delete at a location'), and enumerates the kinds of locations accepted: document, directory, or folder. This clearly distinguishes it from deletion-oriented siblings such as delete_org_doc and erase_org_doc.

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 provides clear guidance on when to use the tool: after a delete, pass the same `location` that was deleted. It also reassures the agent about repeated calls ('Undoing twice is harmless'). It does not explicitly name the delete tool it reverses or state when not to use it, so it falls just short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources