Skip to main content
Glama
computercraft-mcp
by slashracer5

cc_write

Writes or appends UTF-8 text to a file on a ComputerCraft computer, overwriting by default. Use append mode for files larger than 100 KB and keep each call under that limit.

Instructions

Write (or append to) a file on the computer. Text is sent as UTF-8; keep each call under ~100 KB and use append=True for larger files. Overwrites without asking.

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": "cc_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
appendNo
contentYes
computerNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

The description adds behavior beyond the annotations: UTF-8 encoding, a ~100 KB per-call size limit, and the append escape hatch for larger payloads. "Overwrites without asking" is valuable disclosure of silent data loss, though it sits in mild tension with destructiveHint=false and an agent could read the annotation as reassurance that nothing is lost; the description should be treated as the authoritative warning here.

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 sentences with the action first, then the encoding/size constraint, then the safety warning. No filler, and every clause carries operational information.

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?

An output schema exists, so return values needn't be explained, and the write semantics are reasonably covered. Still missing for a mutation tool with an entirely undocumented schema: the meaning of `computer`, path resolution rules, whether missing parent directories are created, and what happens on failure or partial write.

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 description coverage is 0%, so the description must carry the load: it clarifies content encoding and the append flag's purpose and threshold, which is meaningful added meaning. It says nothing about the `computer` parameter (which target machine is written to) or about whether `path` is absolute vs relative, leaving two of four parameters unexplained in both places.

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?

"Write (or append to) a file on the computer" gives a specific verb plus resource and clarifies the dual write/append mode up front. It does not explicitly differentiate itself from siblings such as cc_push, cc_pull, or cc_read, so an agent must infer the boundary between local file write and bulk transfer.

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?

There is concrete guidance for choosing append=True over a plain overwrite (larger files, ~100 KB per call), which is real use-condition guidance for one parameter. However, there is no guidance on when to prefer this tool over cc_push, cc_batch, or cc_exec, and no stated prerequisites or when-not-to-use conditions.

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