Skip to main content
Glama

write_campaign

Writes a Left 4 Dead 2 campaign file from a mission name and modes with numbered chapters, rejecting invalid structures and overwriting only when explicitly allowed.

Instructions

Writes a campaign file from a name and a list of modes with numbered chapters. Refuses to overwrite unless overwrite is set, and refuses a structurally invalid campaign (no name, an empty mode, a map given with a path or extension) rather than writing one the game will not read. The file is written through the same write guard as every other writer.

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": {
      "name": "<name>",
      "modes": "<modes>"
    },
    "name": "write_campaign"
  }
}

Input Schema

NameRequiredDescriptionDefault
outNoDestination .txt, absolute or relative to the repo root.
nameYesThe mission "Name", e.g. "L4D2C1".
imageNoCampaign image, e.g. "maps/c1".
modesYes
authorNo
backupNoKeep a .bak beside an overwritten mission. Off by default: a staging directory is packed as-is, and a backup there would ship inside the addon.
dryRunNo
confirmNo
overwriteNo
descriptionNo
displayTitleNoLocalisation token or plain title.

Output Schema

NameRequiredDescriptionDefault
pathYes
bytesYes
modesYes
writtenYes
backupPathYes
chapterCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.24-alpha

TDQS

A3.6/5.0
Behavior3/5

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

Annotations carry only a title, so the description carries the full burden. It does valuable disclosure work — refusing overwrite by default, enumerating invalid structures (no name, empty mode, map with path or extension), and noting a shared write guard — but never explains confirm or dryRun semantics, and the write guard is referenced without saying what it gates.

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 sentences, front-loaded with the core action, then the refusal behavior. The clause listing invalid structures is dense but every item maps to a real failure mode; the trailing write-guard sentence is the least informative part.

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 an 11-parameter mutating writer with an output schema and no meaningful annotations, the description covers the highest-risk behaviors: overwrite protection and structural validation. Remaining gaps are confirm/dryRun mechanics and the destination/backup parameters, so it falls short of fully self-sufficient.

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?

With schema coverage at 45%, the description must compensate, and it does for the two required parameters: `name` and the `modes`/chapters structure are named, plus the key constraint that a map must not carry a path or extension. It says nothing about `out`, `confirm`, `dryRun`, `author`, `description`, or `displayTitle`.

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?

Opens with a specific verb+resource: "Writes a campaign file from a name and a list of modes with numbered chapters." The resource is distinctive enough to separate it from write_vmf/write_vscript/write_portal siblings, but it never names read_campaign or check_campaign as counterparts.

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?

Usage is implied rather than stated: it refuses to overwrite unless `overwrite` is set and rejects structurally invalid campaigns, which tells the agent what will fail. There is no explicit guidance on when to use this instead of check_campaign or read_campaign, nor any mention of the dryRun path for validation-first workflows.

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