Skip to main content
Glama
ai-yliu

Filesystem MCP Server

by ai-yliu

list_allowed_directories

Lists directories accessible to the Filesystem MCP Server for file operations. Use this tool to identify available paths for reading, writing, or managing files.

Instructions

List all directories the server is allowed to access

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler implementation for the 'list_allowed_directories' tool. Returns a JSON-formatted list of the resolved allowed directories as text content.
    case 'list_allowed_directories': { return { content: [ { type: 'text', text: JSON.stringify(resolvedAllowedDirectories, null, 2), }, ], }; }
  • src/index.ts:222-230 (registration)
    Tool registration in the ListTools response, defining the name, description, and empty input schema for 'list_allowed_directories'.
    { name: 'list_allowed_directories', description: 'List all directories the server is allowed to access', inputSchema: { type: 'object', properties: {}, required: [], }, },
  • Definition of resolvedAllowedDirectories, which is used by the tool handler to list the allowed access directories.
    const resolvedAllowedDirectories = allowedDirectories.map(dir => path.resolve(dir));

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

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