Skip to main content
Glama

list_dir

Browse files and subdirectories inside the sandbox before reading or writing. Provide an optional path relative to the sandbox root to inspect its contents.

Instructions

List a directory inside the sandbox. 'path' defaults to the sandbox root; use it to browse files before reading or writing.

Input Schema

NameRequiredDescriptionDefault
pathNoDirectory relative to the sandbox root (default '.')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the sandbox scope and default root path, but does not describe return format, ordering, hidden-file behavior, or error cases.

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?

Two concise sentences with the purpose front-loaded and no wasted language. The default path and usage hint are both useful and compact.

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?

For a one-parameter, optional, non-destructive directory listing tool, the description is nearly complete. The main omission is return shape, but the tool is simple enough that this is a minor gap.

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%, and the schema already documents 'path' with a default of '.'. The description confirms the sandbox-root default but adds no new syntax or format details beyond the schema.

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?

States a specific verb and resource ('List a directory') and scopes it to the sandbox, which clearly distinguishes browsing from read_file/write_file siblings.

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

Usage Guidelines4/5

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

Provides clear usage context: browse files before reading or writing. It does not name explicit alternatives or exclusions, but the guidance is sufficient for a simple listing tool.

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