Skip to main content
Glama
gabrielmaialva33

MCP Filesystem Server

list_allowed_directories

Retrieve the list of directories accessible by the MCP Filesystem Server to ensure compliance with path restrictions before performing file operations.

Instructions

Returns the list of directories that this server is allowed to access. Use this to understand which directories are available before trying to access files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the list_allowed_directories tool. Returns the list of allowed directories from the server configuration as a formatted text response.
    case 'list_allowed_directories': {
      await logger.debug('Listed allowed directories')
    
      endMetric()
      return {
        content: [
          {
            type: 'text',
            text: `Allowed directories:\n${config.allowedDirectories.join('\n')}`,
          },
        ],
      }
    }
  • src/index.ts:325-335 (registration)
    Tool registration in the ListTools response. Defines the tool 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. ' +
        'Use this to understand which directories are available before trying to access files.',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },
  • Input schema definition for list_allowed_directories tool, specifying an empty object (no input parameters needed).
    inputSchema: {
      type: 'object',
      properties: {},
      required: [],
    },
Behavior3/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 discloses the tool's read-only nature ('Returns the list') and its purpose for permission checking, but lacks details on behavioral traits like rate limits, authentication needs, or error conditions. The description adds some context but is not comprehensive.

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?

Two sentences with zero waste: the first states the purpose, the second provides usage guidance. It is front-loaded with the core functionality and appropriately sized for a simple tool with no parameters.

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

Completeness4/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is complete enough for its context. It explains what the tool does and when to use it, though it could benefit from mentioning output format or behavioral details. The lack of output schema is a minor gap.

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 tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately does not discuss parameters, focusing instead on the tool's purpose and usage. A baseline of 4 is applied as it efficiently handles the lack of parameters.

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 specific action ('Returns the list') and resource ('directories that this server is allowed to access'), distinguishing it from siblings like list_directory (which lists contents of a specific directory) or directory_tree (which shows hierarchical structure). The purpose is precise and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use this tool: 'Use this to understand which directories are available before trying to access files.' This provides clear context for its application relative to file-access siblings like read_file, write_file, or list_directory, guiding the agent to check permissions first.

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

Related 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/gabrielmaialva33/mcp-filesystem'

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