Skip to main content
Glama

Write Sandbox File

write_sandbox_file

Write file contents into a disposable sandbox to safely test candidate fixes; parent directories are created automatically, and changes remain isolated from the developer's project.

Instructions

Write a file inside the sandbox, creating parent directories as needed.

USE THIS to apply a candidate fix. Prefer it over shell heredocs: no quoting to get wrong.

SAFETY: writes land in the sandbox copy only. There is no tool here that writes to the developer's project -- if a change is worth keeping, show them the diff from inspect_changes and let them apply it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesWorkspace-relative path.
contentYesFull new contents of the file.
experiment_idYesThe experiment to write in.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

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

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden and does well by stating writes land 'in the sandbox copy only' and that 'There is no tool here that writes to the developer's project.' It also discloses automatic parent directory creation. It does not explicitly state overwrite behavior, but the schema's 'Full new contents' parameter description implies replacement.

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, purposeful sections: what it does, when to use it, and safety scope. Every sentence earns its place, and the core function is front-loaded before usage and safety notes.

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?

For a simple 3-parameter tool with fully described schema fields and an output schema, the description covers the action, side effects, use context, and safety boundary. Nothing essential for an agent to invoke it correctly is missing.

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?

Schema description coverage is 100%, so the schema fully documents all three parameters. The description adds minimal parameter-specific meaning beyond the schema, only noting parent directory creation for path and positioning content as a candidate fix. This meets the baseline but doesn't elevate it.

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?

Description opens with 'Write a file inside the sandbox' - a specific verb and resource that clearly distinguishes it from read_sandbox_file and other siblings. It adds meaningful scope with 'creating parent directories as needed' and ties the tool to applying candidate fixes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'USE THIS to apply a candidate fix' and instructs preferring it over shell heredocs because 'no quoting to get wrong.' It also clarifies when not to use it for permanent changes, directing the user to show the diff from inspect_changes instead, since no tool writes to the developer's project.

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

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