Skip to main content
Glama
Purgatory (p7y)
by csakaszamok

write_sandbox_file

Write a file into a sandbox, replacing any file of the same name and creating missing directories on its path.

Instructions

Upload a file into the sandbox's files (replaces one of the same name); missing folders on its path are made HTTP PUT /sandboxes/{name}/files/content

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "path": "<path>",
      "body": "<body>"
    },
    "name": "write_sandbox_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesThe file's content
nameYes
pathYesThe file to write, e.g. /root/app/config.json

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does disclose the two most important side effects: existing files of the same name are replaced, and missing parent folders are auto-created. It omits return behavior, any content-size/encoding constraints on the body, and permission requirements, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with the overwrite and folder-creation semantics front-loaded, plus the raw endpoint for precision. The trailing 'missing folders on its path are made' is slightly truncated/awkward, but nothing is wasted.

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

Completeness3/5

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

For a 3-required-param mutation tool with no annotations and no output schema, the description should say more about what happens on success and how `body` is encoded (plain text vs binary/base64). The destructive and directory-creation semantics are well covered; the rest is not.

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 67% — `path` and `body` are documented in the schema, but `name` is not. The appended HTTP route ('/sandboxes/{name}/files/content') indirectly clarifies that `name` is the sandbox, though the phrase 'replaces one of the same name' could momentarily be misread as `name` being the file name.

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?

States a specific verb and resource ('Upload a file into the sandbox's files') and makes clear this is the write counterpart to read_sandbox_file / list_sandbox_files / delete_sandbox_file. It does not name a sibling explicitly, but the write-vs-read distinction is unmistakable.

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

Usage Guidelines3/5

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

No explicit when-to-use / when-not-to-use guidance and no named alternatives (e.g. create_sandbox_folder for directory-only creation). Usage is implied by the verb and by the overwrite note, so an agent can infer intent but gets no routing help.

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