Skip to main content
Glama

delete_folder

Recursively deletes a folder and all its files from the knowledge base. Rejects project IDs to avoid file-watcher races; remove project content via your editor.

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 create_folder. 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.
Behavior5/5

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

With no annotations provided, the description carries full burden and delivers: labels itself DESTRUCTIVE, explains recursive deletion of disk and FTS rows, states the project_id refusal and its rationale, warns about non-recoverability except git backup, notes no external auth/rate limits, and states the return value. This is comprehensive and directly addresses the tool's safety profile.

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 description is four sentences, front-loaded with 'DESTRUCTIVE' and then covers key aspects: scope, refusal behavior, validation, recoverability, auth/rate limits, and return value. Every sentence carries essential information with no fluff or redundancy.

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 destructive nature, lack of annotations, and no output schema, the description is remarkably complete. It explains what gets deleted, the race condition caveat, alternative action, recovery options, external constraints, and the success response format. This leaves the agent well-prepared to invoke the tool correctly and understand consequences.

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% for both parameters, so the baseline is 3. The description adds marginal value by referencing 'Same name validation as create_folder' for the name parameter, but the project_id semantics are already fully described in the schema. It does not significantly deepen understanding beyond 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?

The description uses a specific verb (delete) with a clear resource (folder under the KB) and scope (recursively, including every file inside, disk + FTS rows). It distinguishes from sibling tools like delete_file and delete_files by specifying folder-level recursive deletion, and clearly states the refusal behavior for project_id.

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?

The description provides explicit when-not-to-use guidance: it refuses project_id deletions and tells the user to remove project content via their editor instead. It also references create_folder for name validation, giving context for expected behavior. However, it does not explicitly frame this as an alternative to delete_file or delete_files, though the folder-vs-file distinction is implicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/safiyu/kontexta'

If you have feedback or need assistance with the MCP directory API, please join our Discord server