Skip to main content
Glama
ai-yliu

Filesystem MCP Server

by ai-yliu

create_directory

Generate or verify directory existence at a specified path using Filesystem MCP Server, ensuring efficient file organization and accessibility.

Instructions

Create new directory or ensure it exists

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the directory to create

Implementation Reference

  • Handler for the 'create_directory' tool: extracts path argument, validates it, ensures directory exists using fs.ensureDir, and returns success message.
    case 'create_directory': { const { path: dirPath } = request.params.arguments as { path: string }; validatePath(dirPath); await fs.ensureDir(dirPath); return { content: [ { type: 'text', text: `Directory created successfully: ${dirPath}`, }, ], }; }
  • src/index.ts:144-157 (registration)
    Registration of the 'create_directory' tool in the ListTools handler, including name, description, and input schema definition.
    { name: 'create_directory', description: 'Create new directory or ensure it exists', inputSchema: { type: 'object', properties: { path: { type: 'string', description: 'Path to the directory to create', }, }, required: ['path'], }, },

Other Tools

Related 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/ai-yliu/filesystem-mcp-server'

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