Skip to main content
Glama

delete_directory

Remove a directory inside the workspace. Set recursive to true to delete non-empty directories and all their contents.

Instructions

Delete a directory inside the workspace.

Args: path: Directory to delete, relative to the workspace root. recursive: Required to be True to delete a non-empty directory and everything inside it. The workspace root itself can never be deleted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
recursiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses critical behavioral traits: recursive must be True for non-empty directories, and the workspace root is immutable. It does not mention permissions, reversibility, or error handling, but the core destruction semantics are clear.

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 concise and front-loaded with the primary action. The provided args section is structured and each sentence adds necessary information without 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 tool with no annotations and no output schema, the description adequately covers the essential parameters and constraints. It could be more complete with notes on permissions or expected return, but the core information needed to call correctly is present.

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?

Schema description coverage is 0%, and only titles exist. The description fully compensates by explaining that 'path' is relative to the workspace root, and that 'recursive' is required to be True for non-empty directories. This adds essential meaning 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 states a specific verb and resource: 'Delete a directory inside the workspace.' It clearly distinguishes from the sibling delete_file by specifying directory, and from other directory tools like create_directory.

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?

It provides clear context that the directory is 'inside the workspace' and explains recursive behavior, including the important constraint that the workspace root can never be deleted. However, it does not explicitly name alternative tools or specify conditions when to use this versus delete_file for empty directories.

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