Skip to main content
Glama

write_draft

Overwrite an existing draft Lua file of a War Selection mod (latest version by default) while backing up the previous content. Use after editing the draft in the game's developer mode.

Instructions

WRITE: overwrite the existing draft modsStorage/draft/_-.lua of a mod (latest draft version by default). The game creates that file when the mod script is opened with 'edit script' in developer mode; this tool never creates files and never touches published files in modsStorage. The previous content is backed up to the user data folder (draft-backups). Save/apply in the game.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
mod_idYes
versionNo
extensionNo.lua

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare write/not-read-only/not-idempotent but say nothing about scope or recoverability, and the description fills exactly that gap: it discloses the exact target path, that the previous content is backed up to the user data folder (draft-backups), that it never creates files, and that it never touches published files. This is rich, non-obvious behavioral context beyond the annotations.

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?

Front-loaded with a 'WRITE:' prefix and organized into purpose, precondition, constraints, and backup behavior. Every sentence carries information, though the file-path syntax is dense and could be parsed more easily.

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 covers the target file, overwrite semantics, backup destination, and scope exclusions, and reminds the user to 'Save/apply in the game'. Return-value behavior is unaddressed but partially implied by the save/apply note.

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 description coverage is 0%, so the description must carry the load. It explains the filename pattern that maps to mod_id/version and clarifies that version defaults to the latest draft and that the file uses the .lua extension; only the 'code' content parameter is left implicit. Good compensation for a low-coverage schema.

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 concrete verb ('WRITE: overwrite') and exact resource ('the existing draft modsStorage/draft/<id>_<version>-<hash>.lua'), distinguishing it from siblings by declaring what it will NOT do: 'never creates files and never touches published files'. An agent can tell this apart from scaffold_mod or other writers without opening a schema.

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

Usage Guidelines4/5

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

Gives the precondition for use ('The game creates that file when the mod script is opened with edit script in developer mode') and the default behavior ('latest draft version by default'), which clarifies the context in which the tool applies. It does not name an explicit alternative or when-not-to-use case, so it falls short of a 5.

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