Skip to main content
Glama

folder_delete

Destructive

Permanently deletes one or more folders and all their contents without backup or recycle bin; use to remove obsolete feature, test, or sample folders.

Instructions

Deletes one or more folders with everything in them, for good: no backup and no recycle bin; only git can bring back tracked files. Folders are deleted deepest first, so a parent and its child may be in one call. A folder that is already gone is reported as such, not as an error; a file path is refused (use file_delete), and so is the workspace root. At most 50 paths per call. REFUSED: a folder that contains a link (it could reach outside the workspace), a folder with more than 20,000 entries (delete its subfolders one at a time), and restricted folders: bin, obj, .git, .vs, .ssh, node_modules, backups, logs, packages and anything the workspace's access rules hide. WHEN TO USE: removing a feature, test or sample folder that is no longer needed. To keep the contents under another name use folder_move; for single files use file_delete. RETURNS: one line per folder: deleted, already gone, or the error.

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": {
      "workspace": "<workspace>",
      "pathsJson": "<pathsJson>"
    },
    "name": "folder_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
guideNotrue: put the files guide first in the result. Use on your first files call, or when told it changed.
pathsJsonYesJSON array of folder paths relative to the workspace root: ["Features/OldFeature", "Features/OldFeature/Models"]. Folders only, no wildcards.
workspaceYesWorkspace name as shown in Waymark (a single workspace; '*' is not accepted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.2
    • changedInput schema / properties / pathsJson / description
      Previous value: -"JSON array of relative folder paths to delete:\n  [\"Features/OldFeature\", \"Features/OldFeature/Models\"]"New value: +"JSON array of folder paths relative to the workspace root: [\"Features/OldFeature\", \"Features/OldFeature/Models\"]. Folders only, no wildcards."
  2. Addedv0.2.1

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds substantial context beyond them: no backup and no recycle bin, only git can recover tracked files, deepest-first deletion order so parents and children may coexist in one call, already-deleted paths reported rather than errored, and a 50-path batch cap. The return format is also stated (one line per folder: deleted, already gone, or the error), covering the missing output schema.

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 permanent-deletion consequence and batching semantics are front-loaded in the first two sentences, then the REFUSED / WHEN TO USE / RETURNS labels make the remaining content scannable. Despite the length, every clause carries operational information — no filler or restated name/title.

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 destructive batch tool with no output schema, the definition covers consequence severity, ordering, partial-failure behavior, refusals, batching limits, and per-path return values. An agent has everything needed to decide whether to call it and how to interpret results.

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 description coverage is 100%, so pathsJson and workspace are already documented, and the description largely mirrors that (folders only, no wildcards, relative to workspace root). It does add one genuine constraint absent from the schema: at most 50 paths per call, which affects how an agent batches input. The optional guide parameter is left to the schema, which is acceptable given full coverage.

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?

Opens with a specific verb and resource plus scope: 'Deletes one or more folders with everything in them, for good', immediately making clear this is batch, recursive, and permanent. It distinguishes itself from siblings by naming file_delete for single files and folder_move for renaming/keeping contents, so an agent can pick correctly without opening another 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?

The WHEN TO USE block states the positive case (removing a feature, test or sample folder no longer needed) and routes two adjacent cases to alternatives (folder_move, file_delete). The REFUSED block enumerates exclusions — workspace root, file paths, link-containing folders, folders over 20,000 entries, and named restricted folders — which is exactly the when-not guidance an agent needs.

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