Skip to main content
Glama
aliyun-agent-sandbox-mcp

aliyun-agent-sandbox-mcp

Write a file

file_write
Destructive

Create or overwrite files inside an Alibaba Cloud sandbox, with parent directories created automatically; optionally append content instead of replacing it.

Instructions

Create or overwrite a file inside the sandbox. Parent directories are created automatically.

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

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path inside the sandbox, e.g. /home/user/main.py.
appendNoAppend instead of overwriting (implemented as read + write).
contentYesFull UTF-8 file content.
sandbox_idNoSandbox ID, e.g. sbx-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (returned by sandbox_create).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so the safety profile is largely covered. The description does add useful behavior beyond them - automatic parent directory creation and sandbox-confined writes - but says nothing about data loss on overwrite or the read+write implementation caveat of append mode, which the schema mentions. Solid but not rich.

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 short sentences, front-loaded with the destructive verb and scope, with no filler. Efficient, though the second sentence could have been spent on the overwrite warning rather than a detail the schema already implies.

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 mutation tool with full schema coverage, destructive annotations and no output schema, the core calling information is present. What is missing is the practical consequence of overwriting an existing file and any hint about the result of the call, leaving an agent to infer risk from the word "overwrite".

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 path, content, append and sandbox_id are all documented in the schema, making 3 the baseline. The one sentence with parameter relevance (parent directories are created automatically) reinforces path semantics, but append - the parameter that most changes behavior - gets no treatment in the description.

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?

Specific verb+resource ("Create or overwrite a file") plus scope ("inside the sandbox"), which clearly separates it from file_read, file_list and file_remove by name alone. It stops short of naming an alternative or noting that append mode exists, so it is clear but not fully differentiated.

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?

No when-to-use or when-not-to-use guidance: it never says to check with file_read first, never warns that this clobbers existing content in a way file_rename or file_make_dir would not, and never points to the append option. The reader must infer the overwrite hazard from the word "overwrite".

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