Skip to main content
Glama

Delete a folder

delete_folder
Destructive

Deletes a folder. An empty one just goes; one with pages is refused (folder_not_empty, listing them) unless withPages is true, which deletes every page under it with its route and file (template sites; ask the user first, and dryRun lists them). A folder holding a collection's items is refused: move or delete the collection first. Saved at once, like every edit in Xodia; pushing to Git and publishing stay the user's. The site plan follows in the same change.

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>",
      "projectId": "<projectId>"
    },
    "name": "delete_folder"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesThe folder to delete
branchNoOptional branch; default the branch the workspace has open
dryRunNoOnly list the pages it holds; deletes nothing
projectIdYesProject id from list_projects
withPagesNoAlso delete every page under it, with their routes and files (template sites). Ask the user first

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true; the description adds the meaningful specifics: the folder_not_empty error code with a page listing, the cascade of page routes and files under withPages, the collection-item refusal, immediate persistence without a separate save step, and the fact that Git push/publishing are left to the user. That is exactly the mutation context an agent needs before invoking a destructive tool.

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?

Dense but front-loaded: the deletion outcome comes first, then the refusal and cascade branches. A few clauses duplicate schema text (dryRun's 'only list the pages', 'ask the user first'), which is mild redundancy rather than waste.

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 write tool with no output schema, the description covers refusals, side effects, persistence and the site-plan consequence. The only soft spot is what a successful call returns or the shape of the folder_not_empty listing, which is implied but not spelled out.

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 description coverage is 100%, so dryRun, withPages, branch and path are already documented; the description largely restates the withPages/dryRun meaning and adds only the 'template sites' qualifier and the ask-the-user-first precondition. Baseline 3 is appropriate since the schema carries the parameter burden.

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 ('Deletes a folder') and immediately scopes it against the neighbouring delete_* tools by describing page contents, routes and files rather than files or items generically. An agent can tell exactly what class of object this removes and what falls inside its blast radius.

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?

Gives explicit when-to-use branch conditions: use withPages only for page-bearing folders after asking the user, use dryRun to preview, and for collection-backed folders stop and move/delete the collection first. Refusal conditions and their remedy are stated rather than left to trial and error.

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