Skip to main content
Glama

Write a file in a machine

instabox_write_file

Create or replace a file inside a running cloud machine, automatically creating parent directories and overwriting existing content; supports utf8 or base64 content with optional permissions.

Instructions

Create or replace a file inside a RUNNING machine, creating parent directories. Implemented over exec (base64 on stdin), so it is limited to about 700 KB of content; for bigger files use instabox_exec with curl/git inside the machine. Overwrites without asking. Relative paths start at /data/home.

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

Input Schema

NameRequiredDescriptionDefault
idYesMachine ID (m_...) or its unique name
modeNoOctal permissions to apply, e.g. 0755
pathYesAbsolute path, or relative to /data/home
contentYesFile content
encodingNoHow `content` is encoded (use base64 for binary)utf8

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations it discloses the hard ~700 KB size ceiling, the underlying exec/base64 implementation that causes it, and that it overwrites without confirmation. Those are exactly the traits an agent needs before a write, and none of them are recoverable from the structured fields.

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?

Four short sentences, zero filler: capability and parent-directory behavior first, then the size limit and its workaround, then overwrite warning, then path semantics. Each sentence carries a distinct, decision-relevant fact.

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 5-parameter write tool with no output schema, the description covers the precondition (running machine), the size constraint, the escape hatch, the overwrite semantics, and path resolution. Nothing needed to call 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 coverage is 100%, so path, mode, encoding, and id are already documented, and the description's '/data/home' note duplicates the path description. The only added value is implicitly tying the encoding choice to the size limit; otherwise the schema does the work, so baseline 3 applies.

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?

States a specific verb and resource ('Create or replace a file inside a RUNNING machine') plus a side effect ('creating parent directories'). It is clearly distinguishable from instabox_list_files and instabox_exec without opening any schema.

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?

Gives an explicit when-not and names the alternative: files above ~700 KB must go through instabox_exec with curl/git. It also implies the machine must be running, which is the key precondition for choosing this tool at all.

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