Skip to main content
Glama
A-Niranjan

MCP Filesystem Server

by A-Niranjan

list_allowed_directories

Check which directories are accessible before performing file operations in the MCP Filesystem Server. This tool helps verify available paths to ensure secure and valid file access.

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

  • The handler function for the 'list_allowed_directories' tool. It logs a debug message, ends the metric timer, and returns a text content listing all allowed directories from the server configuration.
    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)
    Registration of the 'list_allowed_directories' tool in the ListTools response, including its 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 for the 'list_allowed_directories' tool, which is an empty object since the tool takes no parameters.
    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 describes the tool's behavior as returning a list, which is helpful, but lacks details such as whether the list is paginated, sorted, or includes metadata. It also does not mention permissions, rate limits, or error conditions. The description adds some value but is incomplete for behavioral 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 two sentences, front-loaded with the core purpose and followed by usage guidance. Every sentence earns its place by providing essential information without waste, making it highly concise and well-structured.

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's complexity (simple read operation with no parameters) and lack of annotations or output schema, the description is adequate but has gaps. It explains what the tool does and when to use it, but does not cover behavioral aspects like output format or error handling. This makes it minimally viable but not fully complete.

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 there is no need for parameter information in the description. The description appropriately focuses on the tool's purpose and usage without redundant parameter details, meeting the baseline for zero parameters.

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 tool's purpose: 'Returns the list of directories that this server is allowed to access.' It specifies the verb ('returns') and resource ('directories'), but does not explicitly differentiate it from sibling tools like 'list_directory' or 'directory_tree', which is why it scores 4 instead of 5.

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

Usage Guidelines4/5

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

The description provides clear context on when to use this tool: 'Use this to understand which directories are available before trying to access files.' This implies it should be used as a preliminary step before file operations. However, it does not explicitly state when not to use it or name specific alternatives among siblings, so it scores 4.

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/A-Niranjan/mcp-filesystem'

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