Skip to main content
Glama

delete_folder

Recursively delete a folder and all its contents from the knowledge base. Refuses to delete within a project; use your editor instead.

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 CtxNest 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
project_idNoProject ID. Pass null or omit to delete from the KB. Project IDs are rejected.
nameYesFolder name (relative)
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: destructive, recursive, disk and Full-Text Search row deletion, refusal case for project_id, non-recoverability from CtxNest (only git backup), and no external auth/rate limits. It also specifies the return format {success: true}.

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 well-structured, starting with 'DESTRUCTIVE' emphasis, then outlining behavior, conditions, recovery, and return value. Every sentence provides essential information without redundancy, and key points are front-loaded.

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?

Given no output schema and two parameters, the description covers the core behavior, failure conditions, side effects, and return value. It references name validation but does not detail error handling for missing folders or other edge cases. However, it is sufficiently complete for a deletion tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds significant value by explaining the effect of project_id (rejection with reason) and linking name validation to create_folder. It clarifies that null or omit means delete from KB, and supplies context for the rejection behavior beyond schema descriptions.

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 explicitly states 'recursively delete a folder under the KB AND every file inside it (disk + FTS rows)', providing a clear verb (delete) and resource (folder) with specific scope and effect. It differentiates from sibling tools like delete_file by specifying folder-level recursive deletion.

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?

Clearly states when NOT to use the tool: when project_id is supplied, it returns isError. Provides an alternative: 'remove project content via your editor instead'. Also notes recovery limitations and same name validation as create_folder, guiding proper usage.

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/ctxnest'

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