Skip to main content
Glama

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" },

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