Skip to main content
Glama

e2b_upload_file

Upload or write a file to an E2B sandbox path, creating parent directories as needed and overwriting existing files.

Instructions

Upload/write a file into a sandbox, creating parent directories as needed. Overwrites if it already exists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesDestination path in the sandbox
portNoOptional envd port; defaults to 49983
contentYesFile content, as UTF-8 text or base64 (see `encoding`)
encodingNotext
usernameNo
sandboxIdYesE2B sandbox ID
accessTokenNoOptional sandbox access token
Behavior4/5

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

Explicitly discloses that it creates parent directories and overwrites existing files, which are key side effects. It does not mention authentication or error scenarios, but with no annotations, this is reasonably transparent.

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 a single, concise sentence that communicates the core action and key behaviors without redundancy, making it easy to parse.

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?

While it covers the main action and important behaviors, it does not mention prerequisites (e.g., sandbox existence), error handling, or whether the operation is idempotent. Given the lack of an output schema, this is acceptable but leaves some gaps.

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?

The schema already provides descriptions for most parameters (path, port, content, sandboxId, accessToken) covering 71% coverage. The description adds behavioral context (directory creation, overwrite) but does not clarify ambiguous parameters like encoding or username beyond the schema's own details.

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?

Clearly states it uploads/writes a file into a sandbox, creating parent directories and overwriting existing files. This distinguishes it from sibling tools like e2b_read_file or e2b_list_dir.

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 explicit guidance on when to use this tool versus alternatives. While the purpose is clear, it does not mention when to prefer this over e2b_read_file or other file operations, leaving the agent to infer usage from context.

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