Skip to main content
Glama
penguinszp001

mcp-server-demo

make_directory

Create a directory inside the MCP_FILE_OPS_ROOT path to organize files.

Instructions

Create a directory inside MCP_FILE_OPS_ROOT.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The 'make_directory' tool handler. Decorated with @mcp.tool(), it resolves the path through _resolve_file_ops_path, creates the directory with mkdir(parents=True, exist_ok=True), and returns a confirmation string.
    @mcp.tool()
    def make_directory(path: str) -> str:
        """Create a directory inside MCP_FILE_OPS_ROOT."""
        target = _resolve_file_ops_path(path)
        target.mkdir(parents=True, exist_ok=True)
        return f"Created directory: {target}"
  • server.py:111-112 (registration)
    Registration of 'make_directory' as an MCP tool via the @mcp.tool() decorator on the function.
    @mcp.tool()
    def make_directory(path: str) -> str:
  • The _resolve_file_ops_path helper used by make_directory to resolve and validate the path against MCP_FILE_OPS_ROOT.
    def _resolve_file_ops_path(path: str | None = None) -> Path:
        if not FILE_OPS_ROOT:
            raise ValueError("MCP_FILE_OPS_ROOT is not configured in .env.")
    
        root = Path(FILE_OPS_ROOT).expanduser().resolve()
        root.mkdir(parents=True, exist_ok=True)
    
        target = root if path is None else (root / path).resolve()
        if target != root and root not in target.parents:
            raise ValueError("Path escapes the configured MCP_FILE_OPS_ROOT.")
        return target
Behavior2/5

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

No annotations provided, so the description carries full burden. It only states the basic action but lacks details on side effects, permissions, return value, or error conditions. For a mutation tool, this is insufficient.

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 a single sentence with no waste, but it is too minimal to be highly valuable. It could be slightly expanded without sacrificing conciseness.

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 and a simple tool, the description should at least explain what the path means, whether it creates parent directories, and what the output schema contains. It falls short.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no meaning beyond the schema for the single parameter 'path'. With 0% schema description coverage, the user gets no help on expected format, constraints, or examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create a directory') and the resource ('inside MCP_FILE_OPS_ROOT'). It is specific and distinguishes from sibling tools like list_directories or move_file.

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 on when to use this tool vs alternatives. No mention of prerequisites, such as whether parent directories need to exist or if the path should be absolute/relative.

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/penguinszp001/mcp-server-demo'

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