Skip to main content
Glama

list_dir

List files and directories to orient in an unfamiliar repo area. Automatically skips build outputs, node_modules, and .git. For specific lookups, use search_code.

Instructions

List files and directories. Use for orientation in an unfamiliar area of the repo. Build outputs, node_modules and .git are skipped automatically. Prefer search_code when you are looking for something specific.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoDirectory relative to the workspace root. Default: "."
depthNoLevels to descend, 1-6. Default 1.
limitNoMax entries. Default 500.
workspaceNoWorkspace alias. Defaults to the active workspace.
include_hiddenNoInclude dot-files. Default false.
Behavior4/5

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

With no annotations provided, the description carries the burden of disclosing behavior. It adds important context that 'Build outputs, node_modules and .git are skipped automatically,' which is not obvious from the name or schema. However, it does not mention the output format or whether paths are relative to workspace, but the main behavioral quirk is covered.

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 three sentences with no redundant words. The first sentence states the action, the second explains when to use it and mentions key exclusions, and the third gives a tool-selection hint. Every sentence earns its place.

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?

The tool has five optional parameters and no output schema, so the description needs to cover essential context. It does: purpose, usage scenario, automatic skips, and an alternative tool. It omits details about the return format, but for a simple directory listing, this is sufficient.

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 100%, so the parameters are fully documented in the schema. The description does not add any parameter-level detail beyond what the schema provides, so a baseline score of 3 is appropriate.

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's function as 'List files and directories' and adds a specific usage context ('for orientation in an unfamiliar area of the repo'). It explicitly differentiates from the sibling tool search_code by advising to prefer it for specific lookups, making the purpose unambiguous.

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

Usage Guidelines5/5

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

The description gives a clear when-to-use scenario: 'Use for orientation in an unfamiliar area of the repo.' It also provides an explicit alternative by saying 'Prefer search_code when you are looking for something specific,' which guides tool selection effectively.

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/zcrossoverz/repo-bridge'

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