Skip to main content
Glama

write_file

Write files inside a Linux sandbox to stage scripts or input data for execution. Content is passed verbatim, using paths relative to /workspace or absolute.

Instructions

Write a file inside a sandbox. Use this to place a script or input data before running it. Paths are relative to /workspace unless absolute. Content of any kind is safe — it is transferred verbatim, not interpreted by a shell.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYese.g. `analysis.py` or `/workspace/data/input.json`.
contentYesFile contents.
encodingNoUse 'base64' to write binary content. Default 'utf8'.
sandbox_idYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does it well: it discloses path resolution relative to /workspace unless absolute, and guarantees content is transferred verbatim and not interpreted by a shell. It omits overwrite behavior and directory creation, but the key safety behavior is covered.

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?

Three short sentences, each contributing a distinct piece of information: what it does, when to use it, and path/safety semantics. No filler or redundancy.

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?

The description is nearly complete for a simple write tool: it covers purpose, usage context, path semantics, and content safety. It does not specify whether existing files are overwritten, whether parent directories are created, or what the success response is, which are the main remaining gaps given there is no output schema.

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?

Schema coverage is 75%, so the schema already documents most parameters. The description adds meaningful semantics beyond the schema by explaining path resolution (relative to /workspace unless absolute) and by clarifying that content is written verbatim, which is not stated in the 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 states a specific verb and resource ('Write a file inside a sandbox') and immediately clarifies the intended use: placing a script or input data before running it. This clearly separates it from siblings like read_file, list_files, and run_command.

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?

'Use this to place a script or input data before running it' gives explicit context for when the tool is appropriate. It implies the workflow with run_command and does not provide explicit exclusions or when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/fstandhartinger/sandbox-as-a-service-mcp'

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