Skip to main content
Glama

folders.delete

Recursively delete a folder and all its files from the knowledge base, including search index entries. Refuses project-scoped deletion to avoid file-watcher re-ingestion conflicts.

Instructions

DESTRUCTIVE — recursively delete a folder under the KB AND every file inside it (disk + FTS rows). REFUSES (returns isError) when project_id is supplied: deleting inside a registered project would race the file watcher and re-ingest the contents — remove project content via your editor instead. Same name validation as folders.create. Not recoverable from Kontexta after the call (only the git backup, if configured, retains it). No external auth or rate limits. Returns {success: true}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFolder name (relative)
project_idNoProject ID. Pass null or omit to delete from the KB. Project IDs are rejected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.7.2

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description carries full burden. It clearly discloses destructuring behavior (recursive, disk+FTS rows), refusal behavior when project_id is passed, the non-recoverable nature after the call (except git backup if configured), and the response format ('Returns {success: true}'). It also notes no external auth or rate limits. This is comprehensive for 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, all substantive: destructive scope, refusal condition and reason, validation reference and recoverability, and response format. Front-loads the critical destructive warning. No filler, each sentence earns its place.

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?

Given the tool's complexity (destructive recursive delete with refusal logic) and lack of annotations, the description covers all needed operational knowledge: preconditions (name validation), special cases (project_id), consequences (non-recoverable), and return value. Output schema is absent, but the description specifies the return shape, completing the picture.

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 baseline is 3. The description adds value by clarifying project_id's effect ('Project IDs are rejected' and refusal rationale), which the schema only hints as 'rejected'. It also confirms name validation parity with folders.create, helpful for expected format. This elevates beyond 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?

The description opens with 'DESTRUCTIVE — recursively delete a folder under the KB AND every file inside it (disk + FTS rows)', clearly stating the verb (delete), resource (folder), and full scope (recursive, disk and FTS rows). It distinguishes from sibling tools like files.delete, which lacks folder recursion, and from folders.create, which it references for shared validation. This specificity prevents selection confusion.

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?

It explicitly states when NOT to use: when project_id is supplied, the tool refuses to avoid racing the file watcher, and recommends removing project content via the editor instead. It also references folders.create for same name validation, implying usage contexts match that tool's naming rules. This gives clear do/don't guidance with an alternative path.

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