Skip to main content
Glama

Create Directory

create_directory
Idempotent

Creates a new directory and any missing parent folders, or leaves an existing path unchanged, ensuring required project paths exist only inside allowed directories.

Instructions

Create a new directory or ensure a directory exists. Can create multiple nested directories in one operation. If the directory already exists, this operation will succeed silently. Perfect for setting up directory structures for projects or ensuring required paths exist. Only works within allowed directories.

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": {
      "path": "<path>"
    },
    "name": "create_directory"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesThe directory to create, with any missing parents; an existing directory is left as is. Absolute, or relative to an allowed directory; it must resolve inside the allowed directories.

Output Schema

NameRequiredDescriptionDefault
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, so the safety profile is largely covered; the description adds concrete behavioral detail beyond that — recursive parent creation in one call, silent success on existing directories, and the allowed-directory boundary. It stops short of describing failure behavior for paths that escape the sandbox, which is the one gap left.

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?

Front-loaded with the core action, then the recursive-create and idempotency facts in ascending detail. The sentence "Perfect for setting up directory structures for projects..." is mildly promotional filler but does contribute scenario framing; otherwise there is little waste.

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

Completeness4/5

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

For a one-parameter, idempotent mutation with a provided output schema, the description covers the essentials: recursive creation, silent success on existing paths, and the sandbox restriction. Only error/edge-case behavior (invalid or out-of-bounds paths) is left unstated, a minor omission at this complexity.

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 description coverage is 100% and the single path parameter is already fully documented, including parent creation and allowed-directory resolution. The description's "can create multiple nested directories in one operation" restates what the schema already says, adding no new meaning to the parameter itself, so the baseline 3 applies.

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?

States a specific verb and resource ("Create a new directory") and immediately broadens scope precisely with "or ensure a directory exists," which distinguishes it from read-only siblings like list_directory or directory_tree. An agent can tell exactly what this tool does without opening the schema.

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

Usage Guidelines3/5

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

Usage is implied rather than prescribed: "Perfect for setting up directory structures for projects or ensuring required paths exist" gives a motivating context but never states when to prefer this over alternatives or any exclusions. No sibling tool is named as a contrast, so routing must be inferred from the directory-creation semantics alone.

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