list_allowed_directories
Retrieve the absolute paths of all directories authorized for read/write operations by the Filesystem MCP Server, ensuring compliance with directory sandboxing and access restrictions.
Instructions
List all allowed directory roots for filesystem operations.
Returns: List[str]: Absolute paths of directories the server can read/write
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:194-201 (handler)The handler function for the 'list_allowed_directories' tool, registered via @mcp.tool decorator. It returns a list of absolute paths of the allowed directories configured at server startup.@mcp.tool def list_allowed_directories() -> List[str]: """List all allowed directory roots for filesystem operations. Returns: List[str]: Absolute paths of directories the server can read/write """ return [str(p) for p in ALLOWED_DIRS]
- main.py:194-194 (registration)The @mcp.tool decorator registers the list_allowed_directories function as an MCP tool.@mcp.tool