Skip to main content
Glama

Delete a file or folder

delete_file
Destructive

Deletes a file or folder and its contents from an Overleaf project for every collaborator; use it to remove unwanted project items, knowing Overleaf keeps deleted content in project history.

Instructions

Deletes a file or folder (with its contents) from a project, for every collaborator. These tools cannot undo it, but Overleaf keeps the deleted content in the project history. To rename or reorganise, use move_file instead.

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_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath of the file or folder to delete, e.g. "figures/old-plot.png"
projectNoProject name, id or Overleaf URL. May be omitted when exactly one project is pinned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.4
    • addedInput schema / properties / path / description
      Added value: +"Path of the file or folder to delete, e.g. \"figures/old-plot.png\""
  2. First observedv2.1.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description adds real value beyond them: deletion is recursive for folders, propagates to all collaborators, is irreversible from the tool's perspective, yet the content persists in project history. That recovery nuance materially changes how an agent should weigh the action.

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?

Three short sentences, front-loaded with the action and its blast radius, followed by irreversibility/recovery and then the alternative. No filler or redundancy.

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 two-parameter tool with no output schema, the description covers consequences, scope, recoverability, and the sibling alternative. The only gap is that it says nothing about what the call returns or how a missing path is handled, which is minor given full schema coverage.

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%, with both `path` and `project` documented in the schema itself including examples and the pinned-project fallback. The description adds no additional meaning about these parameters, so the baseline of 3 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?

The description opens with a specific verb and resource ("Deletes a file or folder") and immediately clarifies scope: recursive folder deletion and effect on every collaborator. This distinguishes it clearly from siblings like move_file, edit_file, and write_file.

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 explicitly routes the agent away from deletion when the intent is renaming or reorganising, naming move_file as the alternative. It doesn't spell out other when-not cases (e.g. emptying a file's contents vs deleting it, or preferring edit_file for reversible changes), but the main disambiguation is present.

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