Skip to main content
Glama

Write File to Sandbox

sandbox_fs_write
Idempotent

Write content to files inside a sandbox, automatically creating parent directories as needed.

Instructions

Write content to a file inside the sandbox. Creates parent directories as needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesSandbox name
pathYesAbsolute path inside the sandbox
contentYesFile content to write
Behavior3/5

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

Annotations already indicate readOnlyHint=false, destructiveHint=false, idempotentHint=true. Description adds that parent directories are created as needed, which is a useful behavioral detail. However, it does not disclose overwrite behavior, file size limits, or encoding. Given annotations provide the safety profile, the description adds moderate value.

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 sentences, no wasted words. First sentence states the primary purpose; second adds a crucial behavioral note. Front-loaded and efficient.

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 simple write tool with three required parameters and no output schema, the description covers the core action and a key behavioral detail (directory creation). It could mention overwrite behavior or content handling, but the provided context is largely sufficient given the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All three parameters are described in the schema (100% coverage), earning a baseline of 3. The description adds that 'Creates parent directories as needed', which clarifies the effect of the 'path' parameter beyond its schema description ('Absolute path inside the sandbox'). This extra context elevates the score.

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?

Description clearly states 'write content to a file inside the sandbox', specifying verb and resource. It also mentions creating parent directories, which adds specificity. However, it does not explicitly differentiate from sibling tools like sandbox_fs_mkdir or sandbox_fs_read, so it loses a point for missing sibling differentiation.

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 on when to use this tool over alternatives. For example, it does not explain that it can overwrite files, or that it is suitable for both creating and updating files. Lacks any 'when not to use' or reference to sibling tools like sandbox_fs_mkdir for directory creation.

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/superradcompany/microsandbox-mcp'

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