delete_directory
Remove a directory by specifying its path, with an option to delete contents recursively. Supports both relative and absolute paths for flexible file management.
Instructions
Removes a directory. Optionally removes recursively. Accepts relative or absolute paths.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
path | Yes | The path to the directory to delete. Can be relative or absolute. | |
recursive | No | If true, delete the directory and all its contents. If false, only delete if the directory is empty. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"path": {
"description": "The path to the directory to delete. Can be relative or absolute.",
"minLength": 1,
"type": "string"
},
"recursive": {
"default": false,
"description": "If true, delete the directory and all its contents. If false, only delete if the directory is empty.",
"type": "boolean"
}
},
"required": [
"path"
],
"type": "object"
}