Skip to main content
Glama
bounded-filesystem-mcp

bounded-filesystem-mcp

by shivam-bit

Directory Tree

directory_tree
Read-only

Get a recursive tree view of files and directories as JSON, with names, types, and children, limited to allowed directories.

Instructions

Get a recursive tree view of files and directories as a JSON structure. Each entry includes 'name', 'type' (file/directory), and 'children' for directories. Files have no children array, while directories always have a children array (which may be empty). The output is formatted with 2-space indentation for readability. 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": "directory_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
excludePatternsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With readOnlyHint=true already declaring the safety profile, the description adds genuinely useful context: the output is a JSON structure with name/type/children keys, files omit children, directories always include it, and output is 2-space indented. It also discloses the allowed-directory scope restriction, which is real behavioral information not in the annotations.

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 core action, then moves to output shape, which matters since there is no output schema. The indentation detail is mildly gratuitous but the rest earns its place; no sentence is wasted wholesale.

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?

Because there is no output schema, describing the returned structure is the right call and mostly done. The gap is the excludePatterns parameter, whose format and glob behavior are left entirely unexplained despite being the only non-obvious input.

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?

Schema description coverage is 0%, so the schema only gives names and types. The description explains none of them, but with only two parameters and one required, the baseline of 3 applies; the obvious cost is that excludePatterns' matching syntax is never described anywhere.

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?

States a specific verb and resource: recursive tree view of files and directories serialized as JSON. That clearly separates it from flat listing siblings like list_directory, though it never names those alternatives explicitly.

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 closing constraint 'Only works within allowed directories' gives a real precondition. However, there is no guidance on when to prefer this over list_directory or list_directory_with_sizes, so the agent must infer the recursive-vs-flat tradeoff itself.

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