Skip to main content
Glama
MrGNSS

Desktop Commander MCP

list_allowed_directories

Check which directories the Desktop Commander MCP server can access to verify permissions for file operations and command execution.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that executes the tool logic, simply returning the predefined list of allowed directories.
    export function listAllowedDirectories(): string[] {
        return allowedDirectories;
    }
  • src/server.ts:188-197 (registration)
    Tool registration in the ListToolsRequestSchema handler, including name, description, and empty input schema (no parameters required).
    {
      name: "list_allowed_directories",
      description: 
        "Returns the list of directories that this server is allowed to access.",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • Dispatcher case in CallToolRequestSchema handler that invokes the listAllowedDirectories function and formats the response.
    case "list_allowed_directories": {
      const directories = listAllowedDirectories();
      return {
        content: [{ 
          type: "text", 
          text: `Allowed directories:\n${directories.join('\n')}` 
        }],
      };
    }
  • Helper constant defining the actual list of allowed directories used by the tool.
    const allowedDirectories: string[] = [
        process.cwd(), // Current working directory
        os.homedir()   // User's home directory
    ];
  • src/server.ts:38-39 (registration)
    Import of the handler function from filesystem module.
      listAllowedDirectories,
    } from './tools/filesystem.js';
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns a list but doesn't specify format, pagination, permissions required, rate limits, or what 'allowed to access' means operationally. This leaves significant gaps for an agent to understand how to use it effectively.

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, efficient sentence that directly states the tool's function without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly.

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, no output schema, and a simple tool (0 params), the description is incomplete. It doesn't explain what 'allowed to access' entails, the return format, or how this differs from similar listing tools. For a tool that might involve permissions or server configuration, more context is needed.

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, but that's fine here. Baseline is 4 for zero parameters, as the schema fully covers the absence of inputs.

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. However, it doesn't differentiate from sibling tools like 'list_directory' or 'list_blocked_commands', which also list things. The purpose is clear but lacks sibling distinction.

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 'list_directory' or 'search_files'. There's no mention of prerequisites, context, or exclusions. It merely states what the tool does without usage context.

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/MrGNSS/ClaudeDesktopCommander'

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