Skip to main content
Glama
falahgs

3D Cartoon Generator & File System MCP Server

by falahgs

create_directory

Create a new directory at a specified path to organize files within the file system.

Instructions

Create a new directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the directory to create

Implementation Reference

  • The handler case for the 'create_directory' tool. It validates the path using validatePath, calls fsPromises.mkdir with recursive:true, and returns a success response.
    case "create_directory": {
      const validPath = await validatePath(args.path);
      await fsPromises.mkdir(validPath, { recursive: true });
      return {
        toolResult: {
          success: true,
          content: [{ type: "text", text: `Directory created: ${args.path}` }],
          message: `Created directory: ${args.path}`
        }
      };
    }
  • The tool registration with inputSchema for 'create_directory'. Defines a single required 'path' string parameter.
    {
      name: "create_directory",
      description: "Create a new directory",
      inputSchema: {
        type: "object",
        properties: {
          path: {
            type: "string",
            description: "Path to the directory to create"
          }
        },
        required: ["path"]
      }
  • src/index.ts:277-387 (registration)
    The ListToolsRequestSchema handler that registers all available tools including 'create_directory'.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          // Image generation tool
          {
            name: "generate_3d_cartoon",
            description: "Generates a 3D style cartoon image for kids based on the given prompt",
            inputSchema: {
              type: "object",
              properties: {
                prompt: {
                  type: "string",
                  description: "The prompt describing the 3D cartoon image to generate"
                },
                fileName: {
                  type: "string",
                  description: "The name of the output file (without extension)"
                }
              },
              required: ["prompt", "fileName"]
            }
          },
          // File system tools
          {
            name: "read_file",
            description: "Read the contents of a file",
            inputSchema: {
              type: "object",
              properties: {
                path: {
                  type: "string",
                  description: "Path to the file to read"
                }
              },
              required: ["path"]
            }
          },
          {
            name: "write_file",
            description: "Write content to a file",
            inputSchema: {
              type: "object",
              properties: {
                path: {
                  type: "string",
                  description: "Path to the file to write"
                },
                content: {
                  type: "string",
                  description: "Content to write to the file"
                }
              },
              required: ["path", "content"]
            }
          },
          {
            name: "list_directory",
            description: "List the contents of a directory",
            inputSchema: {
              type: "object",
              properties: {
                path: {
                  type: "string",
                  description: "Path to the directory to list"
                }
              },
              required: ["path"]
            }
          },
          {
            name: "create_directory",
            description: "Create a new directory",
            inputSchema: {
              type: "object",
              properties: {
                path: {
                  type: "string",
                  description: "Path to the directory to create"
                }
              },
              required: ["path"]
            }
          },
          {
            name: "search_files",
            description: "Search for files matching a pattern",
            inputSchema: {
              type: "object",
              properties: {
                path: {
                  type: "string",
                  description: "Base directory to search from"
                },
                pattern: {
                  type: "string",
                  description: "Search pattern (glob format)"
                },
                excludePatterns: {
                  type: "array",
                  items: {
                    type: "string"
                  },
                  description: "Patterns to exclude from search (glob format)"
                }
              },
              required: ["path", "pattern"]
            }
          }
        ]
      };
    });
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavior. It only states 'create a new directory' without detailing side effects, error handling, or required permissions. Missing critical information like whether the operation is idempotent or if it throws errors on existing paths.

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

Conciseness3/5

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

The description is extremely short (4 words) and lacks structure. While it is concise, it sacrifices informativeness. A single sentence without context is minimally acceptable.

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?

For a simple tool, the description is incomplete. It fails to address whether parent directories are created, behavior on existing paths, or output expectations (e.g., success/failure signals). The parameter schema exists but behavioral details are missing.

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?

The schema covers 100% of the parameter with a clear description. The tool description adds no extra meaning beyond the schema, so a baseline of 3 is appropriate.

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?

The description clearly states the action (create) and resource (directory), which aligns with the tool's name. It is distinct from sibling tools like write_file or list_directory, as creating a directory is a different operation. However, it could be more specific, e.g., mentioning that it creates an empty directory.

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?

No guidance is provided on when to use this tool vs alternatives, nor are there any prerequisites or exclusions. The description lacks context such as whether parent directories are created or what happens if the directory already exists.

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/falahgs/mcp-3d-style-cartoon-gen-server'

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