Skip to main content
Glama

fast_create_directory

Create directories programmatically with optional recursive functionality, designed for the stable and reliable fast-filesystem-mcp server.

Instructions

디렉토리를 생성합니다

Input Schema

NameRequiredDescriptionDefault
pathYes생성할 디렉토리 경로
recursiveNo재귀적 생성

Input Schema (JSON Schema)

{ "properties": { "path": { "description": "생성할 디렉토리 경로", "type": "string" }, "recursive": { "default": true, "description": "재귀적 생성", "type": "boolean" } }, "required": [ "path" ], "type": "object" }

Implementation Reference

  • The handler function for 'fast_create_directory' that validates the path using safePath and creates the directory using fs.mkdir with recursive option.
    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() }; }
  • The tool schema definition in MCP_TOOLS array, including name, description, and inputSchema for validation.
    { 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 of the handler in the switch statement within the tools/call method handler.
    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); }

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