Skip to main content
Glama

e2b_read_file

Read a file stored in an E2B sandbox and get its content as UTF-8 text or base64.

Instructions

Read a file from a sandbox. Returns its content as UTF-8 text or base64.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the file, absolute or home-relative
portNoOptional envd port; defaults to 49983
encodingNotext
usernameNo
sandboxIdYesE2B sandbox ID
accessTokenNoOptional sandbox access token
Behavior2/5

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

With no annotations, the description must disclose behavioral traits on its own. It mentions the output encoding (UTF-8 or base64), which is useful, but it does not address potential failure modes (e.g., file not found, permission errors, reading a directory) or any side effects. The description is minimal and leaves many behavioral aspects undocumented.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely brief (one sentence) and front-loaded, but it is under-specified rather than concisely informative. It leaves out critical context about parameters, error handling, and usage scenarios, so the brevity is not paired with information density. Every word earns its place, but the description as a whole is inadequate.

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, no output schema, and no annotations, this description is incomplete. It does not explain the role of username or accessToken, does not mention what happens on error, and does not specify whether the path is resolved relative to the sandbox's home directory (though the schema partially covers this). An agent would lack essential information to call the tool correctly in many situations.

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 description adds no parameter-specific information beyond what is already in the JSON schema. The schema covers 4 of 6 parameters with descriptions (path, port, sandboxId, accessToken), leaving username and encoding without textual explanation in either place. With 67% schema coverage, the description could have filled the gaps but does not, so it provides minimal added value for parameter understanding.

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 specific verb ('Read') and resource ('a file from a sandbox'), and it mentions the return format (UTF-8 text or base64), which clarifies the tool's core action. It is clearly distinguishable from sibling tools like e2b_list_dir (list directory) or e2b_run_command (execute command), though it does not explicitly name alternatives.

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?

The description provides no guidance on when to use this tool versus alternatives, nor does it mention prerequisites, exclusions, or typical scenarios. It simply states the function without any context about file-reading use cases or edge cases where another tool (e.g., e2b_stat) might be preferable.

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