Skip to main content
Glama
StrawHatAI

Claude Desktop Commander MCP

by StrawHatAI

list_allowed_directories

Check which directories the Claude Desktop Commander MCP server can access on your computer to understand its file system permissions.

Instructions

Returns the list of directories that this server is allowed to access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'list_allowed_directories' tool. It calls listAllowedDirectories() and returns the formatted list of allowed directories.
    case "list_allowed_directories": {
      const directories = listAllowedDirectories();
      return {
        content: [{ 
          type: "text", 
          text: `Allowed directories:\n${directories.join('\n')}` 
        }],
      };
    }
  • src/server.ts:188-197 (registration)
    Registration of the 'list_allowed_directories' tool in the listTools handler, including name, description, and input schema.
    {
      name: "list_allowed_directories",
      description: 
        "Returns the list of directories that this server is allowed to access.",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • Input schema for the tool (empty object as it takes no parameters).
    inputSchema: {
      type: "object",
      properties: {},
      required: [],
    },
  • Core helper function that returns the predefined list of allowed directories.
    export function listAllowedDirectories(): string[] {
        return allowedDirectories;
    }
  • Constant defining the allowed directories used by the tool.
    const allowedDirectories: string[] = [
        process.cwd(), // Current working directory
        os.homedir()   // User's home directory
    ];
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. It states the tool returns a list, implying a read-only operation, but doesn't disclose behavioral traits such as permissions required, rate limits, error conditions, or format of the returned list. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 a single, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse. Every part of the sentence contributes directly to understanding the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters and no output schema, the description adequately covers the basic purpose. However, it lacks details on return format, error handling, or server-specific context, which could be important for an agent to use it effectively. With no annotations, it's minimally complete but has room for improvement.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add param info, which is appropriate. Baseline is 4 for zero parameters, as it avoids redundancy and focuses on the tool's purpose.

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 verb ('Returns') and resource ('list of directories'), specifying what the tool does. It distinguishes the scope ('that this server is allowed to access'), which adds clarity. However, it doesn't explicitly differentiate from sibling tools like 'list_directory', which might list directories without access restrictions, so it's not a perfect 5.

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. It doesn't mention sibling tools like 'list_directory' or 'search_files', nor does it specify prerequisites or contexts for usage. This leaves the agent without explicit direction on tool selection.

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/StrawHatAI/claude-dev-tools'

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