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. Writes unsaved changes the user reviews and saves in Xodia, and 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.7/5.0
Behavior5/5

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

Annotations only say destructiveHint=true; the description goes far beyond by naming the refusal error code, the cascade scope of withPages (pages plus their routes and files), the template-site caveat, and the post-call side effect that unsaved changes are staged for the user to review in Xodia and the site plan updates in the same change. That is exactly the irreversibility and side-effect context an agent needs before a destructive call.

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?

Front-loaded with the core action and no filler; every clause carries behavioral information. The density of parenthetical nesting ('(folder_not_empty, listing them)', '(template sites; ask the user first, and dryRun lists them)') makes it slightly harder to parse than it needs to be, but nothing is redundant.

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 5-parameter tool with no output schema, the description covers refusal modes, cascade scope, side effects, and preview behavior. The only gap is what a successful call returns (aside from the error case), which the agent would otherwise have to discover empirically.

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 coverage is 100%, so the baseline is 3; the description still adds value by explaining the consequences of withPages (every page deleted with routes and files, template sites only) and by framing dryRun as the preview path. It says nothing extra about path, branch, or projectId, but those are self-evident from 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?

Opens with a specific verb+resource ('Deletes a folder') and then immediately distinguishes three distinct deletion outcomes: empty folder, non-empty folder refused, and withPages bulk delete. An agent can tell this apart from update_folder or delete_file from the description alone.

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?

Explicitly states the conditions under which the call is refused (folder_not_empty, collection-owned folders) and the remedy for each ('move or delete the collection first'). It also names the safe alternative mechanism (dryRun lists them) and prescribes asking the user before withPages, which is real when-to-use/when-not guidance.

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