Skip to main content
Glama
AperionAI

aperion-shield

Official

Directory Tree

directory_tree
Read-only

Generates a recursive JSON tree of files and directories, listing name, type, and children for folders. Provides readable 2-space indented output within 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
excludePatternsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv1.0.4
  2. Removedv1.0.3
  3. First observedv1.0.1

TDQS

A3.7/5.0
Behavior4/5

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

The description discloses important behavioral details beyond the readOnlyHint annotation: the exact JSON structure, the invariant that directories always have a children array while files never do, 2-space indentation, and the allowed-directories constraint. This gives the agent a clear model of what to expect.

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?

The description is concise and front-loaded with the core action, then provides necessary structural details. Every sentence adds value, and there is no redundant filler.

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?

The output format is well described and the readOnlyHint covers safety, but the description is incomplete regarding excludePatterns semantics and does not connect to alternative directory listing tools. This leaves meaningful gaps for an agent trying to decide whether and how to invoke it.

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

Parameters2/5

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

The input schema provides only parameter names and types, and schema description coverage is 0%. The description does not explain the path parameter or the excludePatterns parameter, leaving the agent to guess how to format the path or how exclude patterns behave.

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 states a specific verb and resource: get a recursive tree view of files and directories as JSON. It explicitly says 'recursive tree view', which distinguishes it from the sibling list_directory and list_directory_with_sizes tools without needing to open their schemas.

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?

Usage context is implied by the phrase 'recursive tree view' and 'Only works within allowed directories', but there is no explicit guidance on when to choose this over list_directory or list_directory_with_sizes. No alternatives are named, though the recursive nature does implicitly narrow the use case.

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

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/AperionAI/shield'

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