Skip to main content
Glama
bounded-filesystem-mcp

bounded-filesystem-mcp

by shivam-bit

List Directory

list_directory
Read-only

Lists files and directories in a specified path, using [FILE] and [DIR] prefixes to reveal directory structure and help find specific files within allowed directories.

Instructions

Get a detailed listing of all files and directories in a specified path. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is essential for understanding directory structure and finding specific files within a directory. Only works within allowed directories.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "list_directory"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds real context beyond that: the output formatting convention with [FILE]/[DIR] prefixes and the sandbox restriction to allowed directories. It stops short of describing error behavior for missing or disallowed paths.

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

Conciseness4/5

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

Front-loaded with the action and the output format, followed by scope. Mostly efficient, though 'essential for understanding directory structure' is a mild filler claim that restates the obvious.

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

Completeness4/5

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

With readOnlyHint present and no output schema, the description does the right work by describing the return shape and the sandbox constraint. Missing only edge-case behavior (non-existent path, permission errors, whether hidden entries appear), which is minor for a one-parameter read tool.

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

Parameters3/5

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

The single parameter has 0% schema description coverage, so the description must compensate. It implies path selection and adds the meaningful constraint that it 'only works within allowed directories,' but never says whether the path must be absolute, relative, or rooted at an allowed directory.

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?

Clear specific verb and resource: 'Get a detailed listing of all files and directories in a specified path.' It also states the output shape (flat listing with [FILE]/[DIR] prefixes), which separates it implicitly from directory_tree. It never names the closest siblings (list_directory_with_sizes, directory_tree, search_files), so the agent must infer the boundary.

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?

'Essential for understanding directory structure and finding specific files within a directory' indicates context but gives no when-not guidance and no alternative for recursive views, size info, or pattern search. Given the sibling set contains list_directory_with_sizes, directory_tree, and search_files, leaving the choice to inference is a real gap.

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