Skip to main content
Glama

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: [], },

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