Skip to main content
Glama

fast_create_directory

Create directories with optional recursive parent creation for organized file structures in the fast-filesystem-mcp environment.

Instructions

Creates a directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath of the directory to create
recursiveNoCreate parent directories if they do not exist

Implementation Reference

  • The main handler function that safely creates a directory using fs.mkdir after validating the path with safePath. Supports recursive creation.
    async function handleCreateDirectory(args: any) {
      const { path: dirPath, recursive = true } = args;
      
      const safePath_resolved = safePath(dirPath);
      await fs.mkdir(safePath_resolved, { recursive });
      
      return {
        message: 'Directory created successfully',
        path: safePath_resolved,
        recursive: recursive,
        timestamp: new Date().toISOString()
      };
    }
  • Tool schema definition including name, description, and inputSchema with parameters 'path' (required) and 'recursive' (optional boolean).
    {
      name: 'fast_create_directory',
      description: '디렉토리를 생성합니다',
      inputSchema: {
        type: 'object',
        properties: {
          path: { type: 'string', description: '생성할 디렉토리 경로' },
          recursive: { type: 'boolean', description: '재귀적 생성', default: true }
        },
        required: ['path']
      }
    },
  • api/server.ts:335-337 (registration)
    Registration in the tool dispatcher switch statement, calling the handleCreateDirectory function.
    case 'fast_create_directory':
      result = await handleCreateDirectory(args);
      break;
  • Helper function used by the handler to validate and resolve the directory path safely.
    function safePath(inputPath: string): string {
      if (!isPathAllowed(inputPath)) {
        throw new Error(`Access denied to path: ${inputPath}`);
      }
      return path.resolve(inputPath);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Creates a directory' implies a write operation but does not specify permissions required, error conditions (e.g., if path exists), side effects, or performance characteristics hinted by 'fast' in the name. This is a significant gap for a mutation tool with zero annotation coverage.

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

Conciseness5/5

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

The description is extremely concise with a single sentence, 'Creates a directory', which is front-loaded and wastes no words. It efficiently conveys the core purpose without unnecessary elaboration, earning a high score for brevity and clarity in structure.

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

Completeness2/5

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

Given the tool's complexity (a mutation operation with no annotations and no output schema), the description is incomplete. It lacks details on behavioral traits, error handling, return values, or how it integrates with sibling tools. For a directory creation tool in a file operation context, more context is needed to ensure safe and effective use.

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%, with clear descriptions for 'path' and 'recursive' parameters. The description adds no additional meaning beyond the schema, such as examples or constraints. Baseline 3 is appropriate when the schema fully documents parameters, but no extra value is provided.

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

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Creates a directory' clearly states the action (creates) and resource (directory), making the basic purpose understandable. However, it lacks specificity about what distinguishes this tool from similar operations (like 'fast_sync_directories' or 'fast_get_directory_tree') or any unique aspects of its 'fast' implementation, which keeps it at a vague but functional level.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., permissions, existing paths), exclusions, or comparisons to sibling tools like 'fast_sync_directories' for directory-related tasks, leaving the agent without context for selection.

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/efforthye/fast-filesystem-mcp'

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