Skip to main content
Glama

Windows Automation MCP Server

create_directory

Create new directories on Windows systems by specifying the desired path. This tool enables automated folder creation for organizing files and managing directory structures.

Instructions

创建目录

Input Schema

NameRequiredDescriptionDefault
pathYes目录路径

Input Schema (JSON Schema)

{ "properties": { "path": { "description": "目录路径", "type": "string" } }, "required": [ "path" ], "type": "object" }

Implementation Reference

  • The handler function that implements the create_directory tool logic using fs.mkdir to create the directory recursively.
    async createDirectory(dirPath) { try { await fs.mkdir(dirPath, { recursive: true }); return { success: true, path: dirPath, message: '目录创建成功' }; } catch (error) { return { success: false, error: error.message }; } }
  • The input schema and tool definition for create_directory, requiring a 'path' parameter.
    { name: 'create_directory', description: '创建目录', inputSchema: { type: 'object', properties: { path: { type: 'string', description: '目录路径' }, }, required: ['path'], }, },
  • Registration in the executeTool switch statement that dispatches create_directory calls to the handler.
    case 'create_directory': return await this.createDirectory(args.path);
  • Inclusion of 'create_directory' in the tools list used by canHandle method for tool routing.
    const tools = ['read_file', 'write_file', 'list_directory', 'create_directory', 'delete_file', 'copy_file', 'move_file', 'search_files'];

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/eva-wanxin-git/windows-automation-mcp'

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