Skip to main content
Glama

batch_write

Write multiple files to a sandbox environment in a single operation, reducing overhead when scaffolding projects compared to writing files individually.

Instructions

Write multiple files to the sandbox in a single operation. Much faster than multiple write_file calls for scaffolding projects.

Args: files: JSON object mapping absolute paths to file contents. Example: {"/workspace/main.py": "print('hi')", "/workspace/config.yml": "port: 8080"} sandbox: Named sandbox (default "default")

Returns: Confirmation with file count and timing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYes
sandboxNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description should disclose behavioral traits. It mentions writing files and returning confirmation with count and timing, but does not state whether it overwrites existing files or what happens on error. This is adequate but lacks explicit overwrite and error behavior.

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 very concise: one sentence for purpose, one sentence for benefit, then structured arguments and returns. No unnecessary information, every part serves a purpose.

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

Completeness5/5

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

Given the tool's simplicity with two parameters, the description covers purpose, benefit, parameter details with example, and return value. It is complete for the tool's complexity, especially with no output schema but a clear description of returns.

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?

The schema has 0% description coverage, so the description compensates well. It explains the 'files' parameter as a JSON object mapping paths to contents, with an example, and clarifies the 'sandbox' parameter with its default value. This adds significant meaning beyond the raw 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?

The description clearly states the tool writes multiple files to the sandbox in a single operation, with a specific verb and resource. It is distinct from the sibling tool write_file which handles single files.

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?

The description explicitly says it is faster than multiple write_file calls for scaffolding projects, providing clear guidance on when to use it. However, it does not explicitly state when not to use it or mention the alternative for single-file writes.

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/bird/sandbox-mcp'

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