Skip to main content
Glama

Write Sandbox File

write_sandbox_file

Writes file contents inside a disposable sandbox, creating parent directories as needed. Use it to apply candidate fixes safely without altering 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?

No annotations are present, so the description must carry the behavioral burden. It discloses that writes only land in the sandbox copy, that parent directories are created automatically, and that no tool writes to the developer's project. It could also mention overwriting behavior or error conditions, but the most critical safety and side-effect information 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 paragraphs, each with a distinct purpose: core action, usage guidance, and safety note. The primary action is front-loaded, and every sentence adds value with no redundancy.

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 write tool with three required parameters and an existing output schema, the description covers the key use case, the safety boundary, and the recommended workflow. It tells the agent exactly when to use it and how to handle changes that should persist, leaving no critical gaps for correct invocation.

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 coverage is 100%, so each parameter is already documented. The description adds no parameter-specific semantics beyond what the schema provides, except implicitly through the behavior of creating parent directories. Per guidelines, a high-coverage schema warrants a baseline score of 3, and the description does not go beyond that.

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 the exact action (write a file inside the sandbox), the resource (sandbox), and the key behavior (creating parent directories). It also contrasts with the absence of any tool that writes to the developer's project, distinguishing it from the sibling set where no other write tool exists.

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 instructs when to use this tool ('USE THIS to apply a candidate fix') and when not to ('if a change is worth keeping, show them the diff from inspect_changes and let them apply it'). Also recommends it over shell heredocs, providing concrete selection criteria.

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

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