Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
S2DOCS_DBNoThe SQLite index file.$S2DOCS_DATA_DIR/s2docs.db
S2DOCS_DATA_DIRNoDirectory holding the index, workspace and captured logs. Never relative to the cwd../data when running from a source checkout, otherwise a per-user directory (~/.local/share/s2docs, or %LOCALAPPDATA%\s2docs on Windows)
S2DOCS_REAP_SECNoSeconds between orphan-run reaper passes (<= 0 disables the periodic task).60
S2DOCS_STUCK_SECNoPhase age (seconds) after which a fresh host lock reads STUCK.1800
S2DOCS_WORKSPACENoLocal addon sources written by the build tools.$S2DOCS_DATA_DIR/workspace
S2DOCS_AUTH_TOKENNoWhen set, mutating /api requests and every /mcp request must present this token. Read once at startup; restart the server to rotate it. With the variable unset the behaviour is unchanged: no auth.unset (auth off)
S2DOCS_STUCK_PHASESNoJSON object of per-phase stuck thresholds, merged over the built-in defaults.built-in per-phase defaults

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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_gamesA

List supported games with their currently indexed build and patch version.

server_infoA

This server's DB identity: db_path, data_dir, pid, started_at and version, plus status.

    Compare it against the other server's `GET /api/health` before writing so two servers pointed
    at different data dirs (a split store) are caught instead of silently diverging.
search_docsA

Full-text search across everything. Each hit's key feeds the detail tool for its kind: convar/command→get_convar(name), entity→get_entity('side:classname'), schema_class/schema_enum→ get_schema_class('module:Name'), event→get_game_event, script→get_script_api, pulse→search_pulse, example→get_example(key), doc→get_doc(key). With game set, general docs are included too.

get_convarA

Get a console variable or command: default, min/max, flags (cheat, replicated, ...) and help text.

list_convarsB

List console variables/commands, filtered by substring and/or flag.

get_entityA

Get a Hammer entity: keyvalues (with choices), inputs and outputs, including inherited ones. defined_in shows which base declares each member.

find_entities_with_ioA

Find entity classes (including base classes) that declare an input or output with this name. Subclasses inherit it too, so check candidates with get_entity.

get_schema_classA

Get an engine schema class or enum: fields with types, defaults and metadata, the inheritance chain and direct subclasses. Use it for networked fields, VData keys (Deadlock abilities) and plugin offsets.

list_schema_classesB

List schema classes/enums by name substring, module, kind or declared field.

get_game_eventA

Get a game event's fields and types (the effective definition after core/game/mod overrides).

list_game_eventsB

List game events, optionally filtered by a substring of the name or description.

get_script_apiA

Look up the CS2 cs_script (point_script) JavaScript API. A type name returns the type with all members, including inherited ones. Anything else returns the matching members with signature and docs. Instance is the Domain type.

list_script_typesA

List every top-level cs_script type: the Instance const, classes, interfaces, enums and type aliases.

search_pulseC

Search Pulse (Valve's visual scripting) node bindings: entity inputs/outputs and functions.

diff_buildsA

Show what changed between two ingested builds, at member granularity: one row per added/ removed/changed schema field, entity member, game-event field, script symbol, convar, Pulse binding or Hammer class. Each entry carries group (the parent class/entity/event/library) so members cluster under it; before/after hold only that member's own value. counts gives the exact per-section added/removed/changed breakdown ({section: {added, removed, changed}}), taken BEFORE the per-section limit cap, so it stays true even when sections is truncated to the first limit entries; totals[section] is the sum of that section's three counts. Use it after a game patch to find code or configs that might break.

list_examplesA

List example scripts (Valve's cs_script_demo samples) with the API each one uses.

get_exampleA

Get the full source of an example script. Prefer adapting these Valve-written patterns.

get_docA

Get a community documentation page (source2.wiki) as Markdown, with its URL and license for citation.

list_docsA

Browse community documentation pages (titles, URLs) without bodies.

validate_cs_scriptA

Type-check a cs_script with the TypeScript compiler against this build's Valve point_script.d.ts. Errors with category unknown_api mean the method/property does not exist — fix before shipping. needs_type_narrowing gives the subclass to cast to. ALWAYS run this before handing a script to the user.

validate_cfgA

Check every command in a .cfg against the indexed convars/commands: unknown names (with suggestions), out-of-range values, cheat/devonly flags, and client-vs-server context.

scaffold_addonA

Create a new addon in the local workspace (content/csgo_addons// with scripts/, maps/, materials/, ...), a starter cs_script, Valve's point_script.d.ts + tsconfig.json, and a README with the Hammer setup steps. Fails if the addon already exists.

build_modelA

Write a Source 2 model document (.vmdl) for a mesh that is already inside the addon.

    `mesh` is addon-relative (e.g. models/probe/probe.dmx). The document copies the shape the
    game's own compiler accepts — compile it on a host with resourcecompiler afterwards
    (build_start). Returns the written path. Use overwrite=true to replace an existing .vmdl.
list_addonsB

List addons in the local workspace.

get_addonB

Show an addon's local root and file list.

read_addon_fileB

Read a text file from an addon in the workspace.

write_addon_fileA

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.

list_workflowsA

List orchestration workflows: multi-step recipes (research → design → build → validate → test → document) that chain this server's tools and prompts. Start one with start_project.

start_projectA

Start a persistent orchestration project and get the first ready step(s). Progress is stored on the server, so any later session can continue with next_step(project_id).

next_stepA

Get the ready step(s) of a project: instructions, tools to use, rendered prompt text and the gate the server will check when the step is marked done.

update_stepA

Record progress on a step and get the next brief. Marking 'done' runs the step's gate (e.g. all addon scripts must type-check); if it fails you get the problems back — fix them and retry.

get_projectB

Full project state: every step's status, notes, artifacts and recent events.

list_projectsB

List orchestration projects (most recently updated first).

get_prompt_textA

Render one of this server's prompts as text, for clients that can't fetch MCP prompts mid-task.

list_hostsA

List registered test/build hosts with their facts (shell, GPU, paths) and current lock state. CHECK THIS before driving any host: a fresh lock means another session/workstream owns it. Each lock carries phase (what the owner is doing), phase_age_sec and stuck — the SERVER marks a lock STUCK when its heartbeat is fresh but the phase has not moved past the configured threshold (liveness is not progress). Treat lock.stuck=true as "the owner may be hung".

get_hostB

One host's registry entry: ssh target, shell flavor, probed facts, and lock.

register_hostA

Register (or update) a test/build host. Upsert: omitted fields keep their previous values.

probe_hostA

SSH to the host, run the probe script (GPU, RAM, processes, CS2 path/build) and store the facts. Use before planning work on a host — e.g. to see if a game or a heavy GPU process is running.

claim_hostA

Claim exclusive use of a host. Fails if another owner holds a fresh lock — a stale lock (heartbeat older than its TTL, e.g. from a crashed worker) is taken over automatically. Always report a phase (what you are doing); the server flags a lock STUCK when its heartbeat is fresh but the phase has not moved for too long, so keep the phase current (pass a new phase to heartbeat_host) as you progress. Heartbeat while you work; release with release_host when done.

heartbeat_hostA

Refresh your lock's heartbeat so it doesn't go stale mid-task. Heartbeating the SAME phase does not clear stuck-ness (that is the point); report a new phase as your work moves on.

release_hostA

Release a host lock. Always call this when finished with a host.

build_startA

Start a server-owned build run on a host: acquires the host lease, runs the command over SSH and returns a run id immediately. Do NOT poll with sleeps — use build_wait(run_id) or build_status. The host lease is released automatically when the run reaches a terminal status. The lease's phase is the run kind (e.g. 'compile'), so a run whose compile hangs while its heartbeat stays fresh reads STUCK on list_hosts — the server, not the client, decides that.

build_statusA

One build run's record: status, exit code, parsed summary counts, material guard and artifacts.

    `warnings` carries the MATERIAL GUARD findings when the log referenced missing/reserved materials
    (Valve's `_vrf/` subtree, or another map's `maps/<other>/` subtree): counts per kind plus the first
    few offending paths. Such a run can still be 'succeeded' — the resourcecompiler exits 0 and the map
    then error-renders as a red/black checkerboard, so treat a non-None `warnings` as NOT clean.
build_logA

Tail a build run's log. The log is UTF-16 (resourcecompiler) — this decodes it for you, returning the detected encoding, whether the tail was truncated, and any MATERIAL GUARD warnings found in the full log (see build_status).

build_waitA

Block (server-side, no client sleep loop) until the run finishes, then return its record. Raises if it is still running after timeout_sec. With strict_materials, a run whose log has material-guard warnings is an error even though its status is 'succeeded'.

build_cancelA

Cancel a run: mark it cancelled and release its host lease (terminates the process when this server owns it).

build_listA

Recent build runs (newest first), optionally one host and/or active only.

deploy_pushA

Copy files to a host and verify what landed (Get-FileHash over SSH). Returns a deploy id whose entries carry the server-checked md5 + verified flags. Call deploy_verify later to re-check.

    The push takes the host lease for the copy+verify window: a host held by another owner is a
    conflict (pass that owner if it is you), a free host is claimed as 'deploy:<id>' and released
    when the copy finishes. Inside an orchestration project the project already holds the lease as
    'project:<project_id>', so pass that as `owner` (the `cs2_live_test` deploy step does).
deploy_verifyB

Re-check a recorded deployment's MD5s on the host and update its status.

deploy_listB

Recent deployments (newest first), optionally one host.

add_evidenceA

Record structured evidence for a step. This is what the evidence gate checks — a step with an evidence gate CANNOT be marked done until at least one non-note row exists for it. Use kind='note' only for a supplementary remark (it does not satisfy the gate).

    Pass `step_id` to attach the row to a project step, or omit it to record evidence at project
    level (a measurement, a console transcript, a negative result). A step-less row satisfies no
    step gate, by design.
list_evidenceA

List evidence rows (newest first), optionally filtered by project, step and/or kind.

test_startA

Start a server-side test session (state=running). Claims the host lease when a host is given. Mirror the state onto the in-game TEST STATUS HUD yourself via iso_test start over netcon.

test_stepA

Set the running session's current step (the HUD strip's iso_test step). Running runs only.

test_finishA

Finish a running session pass/fail (the HUD's iso_test pass|fail): releases the host lease and records a console-transcript evidence row on the linked project when there is one.

test_clearB

Dismiss a session (iso_test off): state=idle, releasing a still-held host lease.

test_statusA

One test run's record, or the current active run when no id is given.

list_test_runsB

Recent test sessions (newest first), optionally filtered by state.

job_listB

Jobs newest first. status='active' means queued + running. Each row carries error/crash counts.

job_getB

One job with its full timeline (events), links to test runs/builds/deploys/evidence and artifacts.

job_screenshotsA

A job's screenshots tied to their step and verdict (seq, step, reason, url, web_url, verdict, dimensions) — the image context a reviewer pulls after a run. Filter by step/reason.

job_enqueueA

Enqueue a job (validated intake -> queued). The intake is the gate: every missing required field comes back in one error with a field list. Set host_choice='ask' to queue unassigned.

job_nextA

The head queued job for a host, only when that host's lease is free. Errors (with the holder) when a fresh lock blocks it, and when the host's queue is empty.

job_assignB

Set (or move) a queued job's host and queue order.

job_startB

queued -> running, recording the worker and started_at. A second call is a conflict.

job_eventA

Append one timeline event. phase updates the job's current phase; error/crash require a message and SHOULD carry data.log_tail so the job page can expand the failure in a .

job_attachA

Copy a local file into the job's artifacts (MCP runs on the Mac). Append-only: no overwrite. Images also record a screenshot event automatically.

job_request_screenshotA

Ask the runner for a screenshot: an info event plus params.pending_shot=true. The runner polls the job and answers by uploading an artifact, which clears the flag.

job_linkB

Attach a canonical record the job is about (a test run, build, deploy, evidence row or project).

job_verdictA

Answer the running job's current step with a human verdict (pass | fail | skip). Writes a human-confirm evidence row through the same path as POST /api/evidence (so the confirm push files fire) and appends a milestone event. The job must be running and link a test run, else the call is a conflict.

job_finishA

Close out a running/queued job. Gate: summary must carry what, why, learned and next, each non-empty and <=600 chars; otherwise the call is rejected with the offending field names. status='inconclusive' is the honest close-out for a run that ended without a pass/fail verdict (a step-gated demo the user stopped answering) — it is NOT a pass.

job_restatusA

Correct a FINISHED job's terminal status (terminal -> terminal), for a mis-recorded close-out — e.g. a run that finished 'passed' but never got a verdict. reason is mandatory and lands as a milestone timeline event. The job must already be terminal (a queued/running job finishes or is cancelled) and the target must differ from the current status, else the call is a conflict.

job_cancelA

queued/running -> cancelled; the reason is recorded as a timeline event.

Prompts

Interactive templates invoked by user choice

NameDescription
cs2_scriptAuthor a JavaScript cs_script for a CS2 map, grounded in the current point_script.d.ts API.
hammer_io_logicBuild map logic from entities, keyvalues and input/output connections (no scripting).
server_configProduce a .cfg of convars/commands for a goal, verified against the convar index.
deadlock_modPlan a Deadlock addon (VPK) or server plugin using schema/VData and entity data.
orchestrateKick off a persistent, gated project chaining the research, prompt, build and validate tools.
cs2_map_rebuildA pre-flight checklist for decompile/rebuild work, baking in reserved paths, nodraw physics-surface materials and the material guard.
explain_symbolExplain a convar, entity, schema class, event or script API symbol with sources.

Resources

Contextual data attached and managed by the client

NameDescription
point_script.d.tsValve's TypeScript declarations for cs_script. Copy next to your scripts for IntelliSense.
cs_script tsconfig.jsonValve's tsconfig.json for cs_script editing (target ES version used by CS2).

TDQS

B3.2/5.0

Scored across 73 tools

Disambiguation3/5

Most tools target distinct resources and actions, and the long descriptions clarify boundaries between docs, builds, jobs, hosts, tests, and projects. However, with 73 tools there is meaningful cross-domain overlap and potential confusion among job/test/project/evidence lifecycle tools and among related build/deploy/test list/status/finish operations.

Naming Consistency3/5

All names use snake_case, which helps readability, and many tools are grouped by domain prefixes such as job_, build_, deploy_, and test_. But the convention mixes noun_verb domain-prefixed names (job_list, build_start) with generic verb_noun names (list_projects, get_host), so it is readable but not fully consistent.

Tool Count1/5

The server exposes 73 tools, which is far beyond a well-scoped set for a single MCP server. Even though the surface spans several subdomains, the count is extreme and creates a heavy selection and maintenance burden.

Completeness4/5

The surface is broad and covers most major workflows: documentation lookup, schema/entity/script queries, addon creation and editing, build/deploy/test lifecycle, host management, jobs, evidence, and projects. Minor gaps remain, such as addon/file deletion or project cleanup operations, but core workflows are well covered.

Maintenance

ActivityMaintained
ResponsivenessNo issues