validate_directories
Validates directory paths against allowed paths for security. Supports global or shell-specific validation to ensure directories are permitted for command execution.
Instructions
Check if directories are within allowed paths (only available when restrictWorkingDirectory is enabled)
Validation Modes:
Global: Validates against server-wide allowed paths (default)
Shell-specific: Validates against a specific shell's allowed paths
Shell-Specific Validation: Add the "shell" parameter to validate for a specific shell:
{
"directories": ["/home/user", "/tmp"],
"shell": "wsl"
}Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"directories": "<directories>"
},
"name": "validate_directories"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| directories | Yes | List of directory paths to validate | |
| shell | No | Optional: Validate against a specific shell's allowed paths instead of global paths |