war-selection-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| WS_GAME_DIR | No | Game directory | C:\Program Files (x86)\Steam\steamapps\common\War Selection |
| WS_LOG_PATH | No | Log file or directory containing it. Defaults to <WS_GAME_DIR>\gen\, then %LOCALAPPDATA% and Documents | |
| WS_MCP_DATA_DIR | No | Server data folder: live API index, game snapshots, draft backups. Defaults to %LOCALAPPDATA%\war-selection-mcp; on Linux ~/.local/share/war-selection-mcp | |
| WS_MCP_AUTO_SNAPSHOT | No | 0 disables the game snapshot on server start | 1 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| game_infoB | Game paths (WS_GAME_DIR), engine version, number of cached mods, draft folder and log presence. |
| list_modsA | List mods: published cache in modsStorage (id, versions, latest, kinds, sizes) and developer-mode drafts in
modsStorage/draft ( |
| get_modB | Source of a mod. mod_id like 'mod-6gqH17D5rDl' or '6gqH17D5rDl'; version defaults to latest; kind 'lua' or 'prm'. source: 'auto' (developer-mode draft in modsStorage/draft if present, else published cache), 'draft' or 'cache'. |
| search_mod_codeB | Regex search (case-insensitive) across cached mod code and drafts; returns file:line with context lines. |
| game_data_queryB | Query Cache/Projects/WarSelection JSON (gameplay, visual, legacyIds, preload, styles, main, render, interfaces/...).
Use |
| search_apiA | Search the API index: the live dump imported with import_api_dump (current engine) when present,
with the bundled index as fallback (wsunitstats.com WSUS tree v258.4018 + verified notes from the
api-cheatsheet). kind: 'function', 'event', 'field' or 'note'. Result |
| search_guideA | Search the bundled Russian modding guide (guide-ru.md); returns section, line and snippet. |
| read_logB | Tail of a game log (default gen/log.txt; also log_prev.txt, lagDiagnostics.log, ...) searched in likely locations; optional regex filter. Reports clearly where it looked if the log is missing. WS_LOG_PATH overrides the location. |
| lint_modA | Static check of mod Lua code (pass |
| diff_modA | Unified diff between two cached versions of a mod (default: previous vs latest). draft=true compares published version v1 (default latest) with the developer-mode draft in modsStorage/draft. |
| log_errorsA | Parse Lua errors in gen/log.txt ('Lua program ... run (Error) failed' blocks and [string "..."]:N: lines),
group repeats, and map them to cached mods (chunk preview match + mods active at that moment).
|
| find_examplesB | Real usages of an API name across cached mods with file:line context, e.g. 'f_addCircle', 'landscape.zones.f_addCircle', 'root.f_recreateModifiedUnitTypes'. Underscore paths are matched too. |
| list_events_usageA | Which addMod events each cached mod registers (latest versions), with totals per event.
Optional |
| scaffold_modA | Starter code built from guide recipes taken from working mods (returned, never written).
Call without |
| unit_lookupA | Find unit types by legacy id or asset path substring (legacyIds.json) with their build rules from gameplay.json (cost, health). Example: 'worker', '201', 'airplane'. |
| api_dump_scriptA | Lua script for the in-game developer console / a dev-mode mod that dumps the |
| import_api_dumpA | Parse WSDUMP lines from gen/log.txt (or |
| api_index_statusA | Which API index is active (live dump or bundled), its engine version, entry counts, imported dumps, and whether it is stale compared to engine-version.txt in the game folder. |
| snapshot_gameA | Store a snapshot of the game state in the user data folder (never the game folder): hashes of all Cache/Projects/WarSelection JSON files and engine-version.txt, normalized content of gameplay.json, visual.json, legacyIds.json, main.json, render.json, preload.json, and the active API index. Skipped when nothing changed since the latest snapshot unless force=true. Also taken automatically on server start. |
| diff_game_versionsA | Structured diff between two snapshots (default: previous vs latest; a/b accept a snapshot id, id prefix or engine version). Sections: changed files, unit types (legacyIds), build rules (cost, health, ...), researches and upgrades, auras, unit overrides, API index added/removed/changed signatures. Takes a new snapshot first if the game changed. With a single snapshot it explains that the next update produces the diff. The full diff is written to the data folder (diffs/). |
| mod_impactB | Which cached mods and drafts reference what changed between two snapshots: removed/renamed unit type ids (unitType[id]), changed build rules (build[i]), researches/upgrades ([i]), removed or changed API functions and fields. Returns file:line with the code line and the reason. |
| log_tailA | Follow gen/log.txt: returns lines written since |
| watch_log_startA | Start a background watcher on gen/log.txt (from the current end, or from_start=true). It parses Lua run/compile errors and engine warnings, maps them to the draft or cached mod source (explicit /modsStorage path or [string "..."] chunk preview) with a code excerpt, and survives log recreation at game start. Read events with watch_log_poll. |
| watch_log_pollA | New watcher events after |
| watch_log_stopA | Stop the background log watcher. Collected events stay available to watch_log_poll. |
| write_draftA | 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. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 26 tools
Most tools target clearly distinct actions and resources, but the several log-related tools (read_log, log_tail, log_errors, watch_log_poll) and some search tools (search_mod_code vs find_examples) risk misselection. Descriptions largely clarify the boundaries, but minor overlap remains.
Snake_case is used throughout, but the naming pattern is inconsistent: many are verb_noun (search_mod_code, read_log, list_mods) while others are noun_noun (game_data_query, log_errors, api_index_status, mod_impact). The names are readable but do not follow a single predictable convention.
At 26 tools, the set exceeds the 25-tool threshold for 'too many' and includes several closely related log-watching and diagnostics tools that could be consolidated. The broad modding domain justifies many tools, but the count is heavy for an MCP server.
The tool surface covers searching, linting, diffing, log analysis, API indexing, unit lookup, and draft writing, with few obvious gaps for the core modding workflow. Missing a way to create or delete published mods and some write operations are limited to drafts, but agents can work around these limitations.