Skip to main content
Glama

mkdir

Create directories in virtual filesystem workspaces to organize files and manage storage structure.

Instructions

Create directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Implementation Reference

  • The VFSTools.mkdir method that implements the core logic for the 'mkdir' tool: resolves the path using WorkspaceManager and calls the underlying VFS mkdir operation, returning a MkdirResponse.
    async def mkdir(self, path: str) -> MkdirResponse:
        """
        Create directory.
    
        Args:
            path: Directory path to create
    
        Returns:
            MkdirResponse with success status
        """
        vfs = self.workspace_manager.get_current_vfs()
        resolved_path = self.workspace_manager.resolve_path(path)
    
        await vfs.mkdir(resolved_path)
    
        return MkdirResponse(success=True, path=resolved_path)
  • Registration of the 'mkdir' MCP tool using the @server.tool decorator. This thin wrapper function delegates execution to the VFSTools instance's mkdir method.
    @server.tool
    async def mkdir(path: str):
        """Create directory."""
        return await vfs_tools.mkdir(path)
  • Pydantic model defining the output schema for the mkdir tool response, with success boolean and created path.
    class MkdirResponse(BaseModel):
        """Response from mkdir operation"""
    
        success: bool
        path: str
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. 'Create directory' implies a write operation, but it doesn't specify whether this requires specific permissions, what happens if the directory already exists, or if it's recursive. This leaves significant gaps for a mutation tool.

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 just two words, front-loaded with the core action. There's no wasted language, making it efficient for quick understanding.

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 no annotations, 0% schema description coverage, and no output schema, the description is incomplete for a mutation tool. It doesn't cover behavioral aspects like error conditions, permissions, or return values, leaving the agent with insufficient context to use it effectively.

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 input schema has 1 parameter with 0% description coverage, so the schema provides no semantic information. The description doesn't mention the 'path' parameter at all, failing to compensate for the coverage gap. However, with only one parameter, the baseline is higher, but the description adds no value beyond the schema.

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 'Create directory' clearly states the action (create) and resource (directory), which is specific and unambiguous. However, it doesn't differentiate from sibling tools like 'workspace_create' or 'checkpoint_create' that might also create directories or similar structures in different contexts.

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 like 'workspace_create' for creating workspace directories or 'cp' for copying directories. It lacks any context about prerequisites, such as needing parent directory permissions, or exclusions.

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/IBM/chuk-mcp-vfs'

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