find_empty_directories
Locate empty directories in a specified path, with options to search recursively, exclude specific patterns, and output results in text or JSON format using the MCP Filesystem Server.
Instructions
Find empty directories.
Args:
path: Starting directory
recursive: Whether to search subdirectories
exclude_patterns: Optional patterns to exclude
format: Output format ('text' or 'json')
ctx: MCP context
Returns:
Empty directory information
Input Schema
Name | Required | Description | Default |
---|---|---|---|
exclude_patterns | No | ||
format | No | text | |
path | Yes | ||
recursive | No |
Input Schema (JSON Schema)
{
"properties": {
"exclude_patterns": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Exclude Patterns"
},
"format": {
"default": "text",
"title": "Format",
"type": "string"
},
"path": {
"title": "Path",
"type": "string"
},
"recursive": {
"default": true,
"title": "Recursive",
"type": "boolean"
}
},
"required": [
"path"
],
"title": "find_empty_directoriesArguments",
"type": "object"
}