Skip to main content
Glama

Delete a doc, file or folder

delete_entity
Destructive

Delete a file or folder, including all folder contents, from an Overleaf project by project-relative path; recover deleted items later from project history in the web editor.

Instructions

Deletes the entity at path (a folder with all its contents). Overleaf keeps deleted files in the project history, from where they can be restored in the web editor.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "delete_entity"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesProject-relative path of the doc, file or folder to delete. Folders are deleted with their contents.
project_idNoOverleaf project id from list_projects or open_project. Opens the project if it is not already active. Pass it on every call when MCP sessions may change between calls. Writes without it only go to the project last confirmed by open_project or by a write naming it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, and the description adds a genuinely useful trait beyond them: deleted files remain in project history and can be restored in the web editor, so the agent knows the action is recoverable. It does not cover permission requirements, whether the path must exist, or what happens on a missing path, so it is additive but thin.

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?

Two tight sentences with the destructive scope front-loaded and the recovery caveat second. Nothing is wasted, though the recursive-parenthetical partially duplicates the schema's own wording.

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?

For a two-parameter destructive tool with a fully described schema, no output schema, and a destructiveHint annotation, the description covers scope, recursion, and recoverability. That is enough for an agent to call it correctly and understand the consequence.

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 coverage is 100%, including the folder-recursion note and the project_id session guidance, so the description's restatement of recursive deletion adds nothing new. Baseline 3 applies when the schema already carries parameter meaning.

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 ('Deletes') and resource ('the entity at `path`'), and clarifies the recursive folder case. It is distinguishable from delete_comment/delete_comment_message by operating on a path-based doc/file/folder entity, though it never names those siblings explicitly.

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?

There is no when-to-use or when-not-to-use guidance and no pointer to alternatives such as move_entity or delete_comment. The only implicit signal is that it removes things at a path; an agent gets no help deciding between this and other mutating tools.

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