Skip to main content
Glama
rajnaveen344

LSP Tools MCP Server

by rajnaveen344

list_allowed_directories

Discover which directories the LSP Tools MCP Server can access. Use this tool to verify accessible paths before attempting file operations, preventing access errors.

Instructions

Lists all directories that this server is allowed to access. Use this to understand which paths are accessible before trying to access files. Returns an array of absolute paths to allowed directories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'list_allowed_directories' tool. Returns a JSON string of the allowedDirectories array wrapped in the MCP content format.
    case "list_allowed_directories": { return { content: [{ type: 'text', text: JSON.stringify(allowedDirectories), }] }; }
  • Zod schema for the tool's input arguments, which is empty as no parameters are required.
    // Schema for list_allowed_directories tool (empty object, no parameters needed) const ListAllowedDirectoriesArgsSchema = z.object({});
  • src/index.ts:79-86 (registration)
    Registration of the tool in the ListTools response, defining name, description, and input schema.
    { name: "list_allowed_directories", description: "Lists all directories that this server is allowed to access. " + "Use this to understand which paths are accessible before trying to access files. " + "Returns an array of absolute paths to allowed directories.", inputSchema: zodToJsonSchema(ListAllowedDirectoriesArgsSchema), },
  • Helper variable that stores and normalizes the allowed directories from command-line arguments, used by the handler.
    // Store allowed directories in normalized form const allowedDirectories = args.map(dir => normalizePath(path.resolve(expandHome(dir))) );
Install Server

Other 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/rajnaveen344/lsp-tools-mcp'

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