Skip to main content
Glama
MausRundung

Project Explorer MCP Server

by MausRundung

list_allowed_directories

Retrieve the list of directories permitted for exploration by this server, ensuring you know accessible paths before using other tools.

Instructions

Returns the list of directories that this MCP server is allowed to access. This is useful for understanding which directories can be explored or searched before attempting to use other tools. The allowed directories are configured when the server starts and cannot be modified at runtime.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the list_allowed_directories tool. Takes arguments and the allowed directories array, builds a formatted markdown string listing the accessible directories, and returns it as text content.
    export async function handleListAllowed(args: any, allowedDirectories: string[]) {
      let result = "# Allowed Directories\n\n";
      
      if (allowedDirectories.length === 0) {
        result += "No directories are currently allowed.";
      } else {
        result += `This MCP server has access to ${allowedDirectories.length} director${allowedDirectories.length === 1 ? 'y' : 'ies'}:\n\n`;
        
        allowedDirectories.forEach((dir, index) => {
          result += `${index + 1}. ${dir}\n`;
        });
        
        result += "\nYou can use these directories with other tools like explore_project, search_files, etc.";
      }
      
      return {
        content: [
          {
            type: "text",
            text: result
          }
        ]
      };
    }
  • Tool definition object including name 'list_allowed_directories', description, and an inputSchema with no required parameters (empty object).
    export const listAllowedTool = {
      name: "list_allowed_directories",
      description: "Returns the list of directories that this MCP server is allowed to access. This is useful for understanding which directories can be explored or searched before attempting to use other tools. The allowed directories are configured when the server starts and cannot be modified at runtime.",
      inputSchema: {
        type: "object",
        properties: {},
        required: []
      }
    };
  • src/index.ts:33-42 (registration)
    Registration of the listAllowedTool in the ListToolsRequestSchema handler, making the tool available to clients.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          exploreProjectTool,
          listAllowedTool,
          searchTool,
          renameFileTool,
          deleteFileTool,
          checkOutdatedTool
        ]
  • src/index.ts:52-54 (registration)
    Routing in CallToolRequestSchema handler: when the tool name is 'list_allowed_directories', the handler function handleListAllowed is called with the allowed directories array.
    switch (request.params.name) {
      case "list_allowed_directories":
        return await handleListAllowed(args, ALLOWED_DIRECTORIES);
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses that directories are configured at startup and immutable at runtime. No annotations provided, but description covers essential behavioral traits for a simple read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences: first states purpose, second adds valuable context. No wasted words, front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Completely sufficient for the tool's simplicity: explains purpose, usage, and a key behavioral constraint. No output schema needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With zero parameters, the description adds meaning by explaining the source and immutability of the directories, beyond the empty schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns a list of allowed directories, specifies its utility before other tools, and distinguishes from siblings like delete_file or search_files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises using this before exploring or searching, providing clear context for when to invoke. No alternatives exist, so no exclusions needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/MausRundung/mcp-explorer'

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