Skip to main content
Glama
N0moreher0
by N0moreher0

Create directory

project_create_directory
Idempotent

Creates a directory inside the workspace and creates parent folders by default, preparing a new path for file writes.

Instructions

Create a directory (create_parents defaults to true). Use when: a directory must exist before writing a file into a new path. Avoid when: the directory already exists, or you only need to write a file with create_dirs=true. Speed: nhanh. Output: directory_created: relative_path. Batch-safe: no

Input Schema

NameRequiredDescriptionDefault
relative_pathYesPath inside the workspace (relative, or absolute inside the workspace)
create_parentsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare non-readonly, idempotent, non-destructive, closed-world. The description adds context annotations cannot express: the create_parents default, the return shape ('directory_created: relative_path'), and 'Batch-safe: no', which warns against parallel invocations. It omits what happens on an already-existing directory (error vs. silent success), which is the main remaining gap.

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?

Labeled lines (Use when / Avoid when / Output / Batch-safe) front-load the essential facts with no filler sentences. The 'Speed: nhanh' line is an untranslated token that carries little actionable meaning and slightly dilutes the otherwise tight structure.

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 two-parameter, non-destructive creation tool with rich annotations and no output schema, the description covers purpose, preconditions, return value, and concurrency safety. Only the existing-directory error behavior and full create_parents semantics are left unstated.

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 50%: relative_path is documented in the schema, but create_parents has no schema description. The description compensates only partially by stating its default value, without explaining the consequence of setting it false (e.g., failure when the parent is missing).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 directory') and immediately surfaces the create_parents default. It implicitly distinguishes itself from project_write_file by noting the create_dirs=true alternative, though it does not name the sibling tool explicitly.

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?

Explicit 'Use when' and 'Avoid when' clauses give the agent both the positive precondition (directory must exist before writing into a new path) and two exclusion conditions, one of which points at an alternative approach (write_file with create_dirs=true).

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