Skip to main content
Glama
rawr-ai

Filesystem MCP Server

list_allowed_directories

Retrieve a list of accessible directories on the Filesystem MCP Server to ensure compliance with permissions and streamline file access 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

  • The core handler function implementing the 'list_allowed_directories' tool. It takes the allowedDirectories array and returns a formatted text response listing them.
    export function handleListAllowedDirectories(
      args: unknown,
      allowedDirectories: string[]
    ): { content: [{ type: string; text: string }] } {
      return {
        content: [{
          type: "text",
          text: `Allowed directories:\n${allowedDirectories.join('\n')}`
        }],
      };
    }
  • index.ts:247-248 (registration)
    Registers the tool handler by binding 'handleListAllowedDirectories' to the 'list_allowed_directories' tool execution in the toolHandlers object.
    list_allowed_directories: (a: unknown) =>
      handleListAllowedDirectories(a, allowedDirectories),
  • index.ts:312-312 (registration)
    Defines the tool metadata (name and description) in the allTools array, used for conditional registration based on permissions.
    { name: "list_allowed_directories", description: "List allowed directories" },
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 states the tool returns a list, implying a read-only operation, but does not disclose behavioral traits such as whether the list is cached, real-time, or includes metadata like paths or permissions. The description adds basic context about server access scope but lacks details on format, ordering, or potential limitations.

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 adds value: the first defines the tool's function, and the second provides practical context. There is no redundancy or wasted words, making it highly efficient.

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 mostly complete. It covers purpose and usage well, but lacks details on output format (e.g., list structure) and behavioral aspects like performance or constraints. For a low-complexity tool, this is sufficient but not exhaustive.

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 does not mention parameters, which is appropriate. A baseline of 4 is applied as it correctly omits unnecessary parameter details, though it could slightly enhance by noting the lack of inputs.

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 'get_permissions' (which focuses on permission details). It explicitly identifies what the tool provides: available directories for server access.

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?

The description provides explicit guidance on when to use this tool: 'Use this to understand which directories are available before trying to access files.' This directly addresses the context of sibling tools that access files (e.g., 'read_file', 'search_files'), indicating it should be used as a prerequisite to avoid errors when accessing directories.

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/rawr-ai/mcp-filesystem'

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