Skip to main content
Glama
lofcz

MCP Smart Filesystem Server

by lofcz

list_allowed_directories

Display directories accessible within the MCP Smart Filesystem Server's security boundaries to identify permitted file system areas for safe exploration.

Instructions

Show which directories this server can access (security boundaries). No parameters required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_allowed_directories' tool. It serializes and returns the list of allowed directories (via getAllowedDirectories helper), including count and security note.
    case 'list_allowed_directories': {
      return {
        content: [{
          type: 'text',
          text: JSON.stringify({
            allowedDirectories: getAllowedDirectories(),
            count: getAllowedDirectories().length,
            note: 'This server can only access files within these directories for security'
          }, null, 2)
        }]
      };
    }
  • index.ts:249-256 (registration)
    Tool registration in the tools array returned by ListToolsRequestSchema handler. Defines name, description, and empty input schema (no parameters).
    {
      name: 'list_allowed_directories',
      description: 'Show which directories this server can access (security boundaries). No parameters required.',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    }
  • Input schema definition for the tool (empty object, no required parameters).
    inputSchema: {
      type: 'object',
      properties: {}
    }
  • lib.ts:6-17 (helper)
    Global state management and helper functions for allowed directories. getAllowedDirectories() is called by the tool handler to retrieve the list.
    // Global allowed directories - set by the main module
    let allowedDirectories: string[] = [];
    
    // Function to set allowed directories from the main module
    export function setAllowedDirectories(directories: string[]): void {
      allowedDirectories = [...directories];
    }
    
    // Function to get current allowed directories
    export function getAllowedDirectories(): string[] {
      return [...allowedDirectories];
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'security boundaries,' which hints at access control or permissions, but does not elaborate on behavioral traits such as whether this is a read-only operation, potential rate limits, authentication needs, or what the output format might be. For a tool with zero annotation coverage, this is a significant gap in transparency.

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?

The description is appropriately sized and front-loaded: it consists of two concise sentences that directly state the purpose and parameter requirement without any waste. Every sentence earns its place by providing essential information efficiently.

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

Completeness3/5

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

Given the tool's complexity is low (0 parameters, no output schema), the description is somewhat complete but has gaps. It covers the purpose and parameter aspect well, but without annotations or an output schema, it lacks details on behavioral traits and return values. For a simple tool, this is adequate but with clear gaps in transparency and output information.

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?

The input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description adds value by explicitly stating 'No parameters required,' which clarifies that no inputs are needed. This compensates for the lack of parameters and provides useful semantics, though it doesn't add meaning beyond the schema since there are no parameters to describe.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Show which directories this server can access (security boundaries).' It specifies the verb 'show' and the resource 'directories this server can access,' with added context about security boundaries. However, it does not explicitly differentiate from sibling tools like 'list_directory' or 'find_files,' which might also involve directory operations, so it lacks sibling differentiation for a perfect score.

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

Usage Guidelines3/5

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

The description implies usage by stating 'No parameters required,' suggesting it's a straightforward retrieval tool without input constraints. However, it does not provide explicit guidance on when to use this tool versus alternatives like 'list_directory' or 'search_code,' nor does it mention any prerequisites or exclusions. The usage is implied but not clearly articulated relative to siblings.

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/lofcz/mcp-filesystem-smart'

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