Skip to main content
Glama

sandbox_write_file

Writes a text file into a project's sandbox, creating parent directories and resolving relative paths against /workspace/work.

Instructions

Write a text file into a project's sandbox, creating parent directories. Relative paths resolve against /workspace/work.

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": {
      "project": "<project>",
      "path": "<path>",
      "content": "<content>"
    },
    "name": "sandbox_write_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile path inside the sandbox.
contentYesFile contents.
projectYesInstalled project: its slug, or its id such as "github:owner/name".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses side effects beyond the schema: parent directories are created, and relative paths resolve against /workspace/work. It omits important behavior such as whether an existing file is overwritten, content encoding, size limits, and permission requirements.

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?

Two short sentences, front-loaded with the action and scoping, then the path-resolution rule. No filler or redundancy.

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?

Adequate for a simple three-parameter write tool with a fully documented schema, but with no annotations and no output schema the description should at least state overwrite behavior and what a successful call returns or errors on.

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 100%, so the baseline is 3, but the description adds genuine meaning by specifying how relative paths are resolved (/workspace/work), which the schema's 'File path inside the sandbox' does not state.

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 ('Write a text file into a project's sandbox') and names the container scope (project). An agent can distinguish it from sandbox_read_file without opening the schema, though it never contrasts itself with siblings explicitly.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, no mention of alternatives such as sandbox_exec for generating files, and no prerequisites (e.g., whether the project must be installed). Usage is only implied by the verb 'Write'.

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