mkdir
Create directories with optional parent creation and dry-run preview. Returns JSON of created paths.
Instructions
Create directories with parent-directory creation and dry-run support. Destructive: creates new directories on the filesystem. Use --dry_run to preview without creating. Use --parents to auto-create intermediate directories. Use --mode to set permissions. Returns JSON with created paths. Fails safely if the path already exists (unless forced). Use to create directory structures. Not for removing directories — use 'rmdir' for empty directories or 'rm' for non-empty. Not for temporary directories — use 'mktemp' for unique temp paths. See also 'rmdir', 'mktemp', 'touch'.
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": {
"paths": "<paths>"
},
"name": "mkdir"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Directories to create. | |
| dry_run | No | Report operations without changing files. | |
| parents | No | Create missing parents. | |
| exist_ok | No | Do not fail if a directory exists. |