Skip to main content
Glama

mkdir

Destructive

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'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYesDirectories to create.
dry_runNoReport operations without changing files.
parentsNoCreate missing parents.
exist_okNoDo not fail if a directory exists.
Behavior4/5

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

Description states 'Destructive: creates new directories on the filesystem', aligning with annotations. It also discloses behavior: 'Fails safely if the path already exists (unless forced)' and mentions return format ('Returns JSON with created paths'). However, it incorrectly references '--mode' which does not exist in the input schema, slightly reducing transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is multi-sentence but well-structured, starting with the core action and features. It is front-loaded with main purpose and follows with usage, safety, and alternatives. Some redundancy (e.g., 'Use --dry_run' and 'Use --parents' could be more compact) but remains efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 parameters and no output schema, the description covers purpose, safety, and alternatives, but misses explaining the 'exist_ok' parameter clearly (only hints at 'unless forced'). The incorrect mention of '--mode' also detracts from completeness. It does not fully compensate for the lack of output schema beyond a brief mention.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all parameters. Description adds context for 'dry_run' and 'parents' but introduces a non-existent '--mode' parameter, which could mislead the agent. It provides return format details not in schema, but overall adds marginal value 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 clearly states 'Create directories' with specific features like parent-directory creation and dry-run support. It distinguishes from siblings by explicitly naming alternatives for removal ('rmdir', 'rm') and temporary directories ('mktemp').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit usage instructions: 'Use --dry_run to preview', 'Use --parents to auto-create', and 'Use --mode to set permissions'. Clearly states when not to use the tool by directing to alternatives: 'Not for removing directories ... use rmdir', 'Not for temporary directories ... use mktemp'. Also lists related tools in 'See also'.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/caseSHY/AI-CLI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server