Skip to main content
Glama

e2b_list_dir

List files and folders inside an E2B sandbox directory, with optional recursion depth, to inspect its contents.

Instructions

List the contents of a directory in a sandbox.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute or home-relative directory path
portNoOptional envd port; defaults to 49983
depthNoHow many levels deep to recurse
usernameNo
sandboxIdYesE2B sandbox ID
accessTokenNoOptional sandbox access token
Behavior2/5

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

There are no annotations, so the description must carry the full behavioral burden. It only says 'list the contents' without disclosing whether it returns just names, full metadata, whether recursion is default, or if any side effects occur (e.g., caching, pagination). For a read-only operation, not much risk exists, but the lack of any behavioral detail leaves the agent guessing about output format and defaults.

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 a single, non-redundant sentence that front-loads the core action. There's no fluff or repetition. However, it's so terse that it under-specifies rather than being economical; the sentence does earn its place but adds minimal value beyond the tool name.

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

Completeness2/5

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

For a tool with 6 parameters and no output schema or annotations, the description is too thin. It doesn't explain how the depth parameter works, what the default depth is, or what the response structure looks like. An agent needs to infer behavior from the sibling tools and schema, which is not adequate for reliable invocation. The absence of any usage context or return format makes it incomplete.

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 high at 83%, with meaningful descriptions for path, depth, port, and sandboxId. The description itself adds no parameter context, but since the schema already documents most parameters, a baseline of 3 is appropriate. The one undocumented parameter, 'username', still lacks clarifying text, but that's a schema gap rather than a description gap.

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?

The description states a clear verb and resource: 'List the contents of a directory in a sandbox.' It's direct and unambiguous, but it doesn't differentiate from sibling tools like e2b_stat or e2b_read_file, which could also inspect directory information. The tool's niche is implied but not explicitly contrasted, so it misses the full 'distinguishes from siblings' bar.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool versus alternatives, such as when to prefer e2b_stat or e2b_read_file for inspecting files. There is no mention of the depth parameter for recursive listing or any context about typical sandbox usage. The description relies entirely on the schema for usage hints, leaving the agent to infer the tool's role among 22 siblings.

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/contributory/e2b-mcp-server'

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