Skip to main content
Glama

write_file

Save spec.js, scene.js, or crew notes (.md/.json) with syntax/spec validation before saving; previous versions are kept in .history.

Instructions

Write spec.js (script, voice, music, sound cues), scene.js (the three.js scene) or a crew note (.md/.json). JS is syntax-checked and the spec validated before saving; the old version is kept in .history.

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": {
      "slug": "<slug>",
      "file": "<file>",
      "content": "<content>"
    },
    "name": "write_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesspec.js, scene.js, or e.g. treatment.md, cast.json, shots.json, grade.json
slugYesepisode slug, e.g. the-cursed-tape (or an example slug for read-only tools)
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Since there are no annotations, the description carries the full burden and provides highly valuable operational context: it states that JS files are syntax-checked and validated before saving, and that historical versions are preserved in .history.

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?

It is a highly efficient, dense single sentence. Every clause—file types, validation, history—serves a functional purpose and is well-frontloaded.

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

Completeness4/5

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

For a mutation tool with no output schema, the description provides comprehensive operational context regarding validation and versioning. The specific naming of supported file extensions/types also adds to its completeness.

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?

The description clarifies the acceptable values for the 'file' parameter (e.g., spec.js, crew note .md/.json) which adds necessary context and examples beyond what the schema provides.

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?

The purpose is extremely clear: to write specific files like spec.js, scene.js, or notes. It specifies the content types and clearly identifies the functional purpose of the tool.

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?

It implies usage (use it when you need to create/save these specific files) but does not offer explicit guidance contrasting this tool against sibling reading or list tools. The usage is implied rather than directed.

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