Skip to main content
Glama

write_addon_file

Writes text source files (.js, .cfg, .vmat, panorama XML/CSS) into a Source 2 addon for cs2 or deadlock; use overwrite=true to replace an existing file.

Instructions

Write a text source file (.js, .cfg, .vmat, .vdata, panorama .xml/.css, ...) into an addon. Binary/compiled assets are produced by Valve's tools, not written here. Use overwrite=true to replace.

Input Schema

NameRequiredDescriptionDefault
gameNoGame id: one of cs2, deadlockcs2
nameYesAddon name: lowercase [a-z0-9_], e.g. 'jump_arena'
pathYesPath inside the addon, e.g. 'scripts/jump_arena.js'
contentYes
overwriteNo

Output Schema

NameRequiredDescriptionDefault
pathYes
sizeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false), so the description adds value by explaining the scope boundary against Valve's tooling and disclosing that replacement is opt-in via overwrite — consistent with destructiveHint=false. It does not cover error behavior when a file exists and overwrite is false, or whether parent directories are created, which would round this to a 5.

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, front-loaded with the verb-and-resource statement, then the scope exclusion, then the overwrite directive. No filler.

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?

An output schema exists, so return values need not be explained, and annotations cover safety. The write semantics, supported file types, and overwrite behavior are all present; only directory auto-creation and the failure mode for an existing file without overwrite are unstated.

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 60%; game, name, and path are documented in the schema, while content and overwrite are not. The description explains overwrite's semantics (must be explicitly set to replace an existing file), which is genuinely additive, but adds nothing for content or for how path interacts with the allowed file types.

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 description uses a specific verb ('write'), a specific resource ('text source file'), enumerates the concrete file types it handles (.js, .cfg, .vmat, panorama .xml/.css), and explicitly states what it does not handle (binary/compiled assets). This lets an agent separate it from read_addon_file and scaffold_addon without reading the schema.

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?

The only explicit conditional is 'Use overwrite=true to replace', which governs a parameter rather than tool selection. It never says when to choose this over read_addon_file or scaffold_addon, so the agent must infer usage from the file-type list.

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