Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DEMOREEL_API_KEYNoAPI key to secure the API. If unset, the API is open and should only be used on localhost.
DEMOREEL_OFFLINENoSet to 1 to disable downloading radar images and render on a plain grid instead.0
DEMOREEL_DATA_DIRNoDirectory where demos, renders, and other data are stored.
DEMOREEL_PUBLIC_URLNoPublic URL of the demoreel server.
DEMOREEL_INGAME_ENABLEDNoSet to 1 to enable the in-game (first-person) renderer. Requires CS2, a GPU, and a desktop session.0
DEMOREEL_AUTO_RENDER_TOPNoNumber of top highlights to automatically render.
DEMOREEL_DEFAULT_RENDERERNoDefault renderer to use. 'auto' selects 'ingame' when available, otherwise 'radar'.auto

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

demoreel analyzes Counter-Strike 2 demos and produces highlight videos.

Concepts

  • match: one uploaded demo. get_match returns the scoreboard and its best highlights.

  • highlight: an editable clip definition = ordered segments, each {start_tick, end_tick, pov_steamid, speed, caption}. Ticks are demo ticks; seconds = ticks / tickrate (64 for CS2).

  • render: a video file produced from one highlight (or several = a "reel"). Renders are asynchronous: tools return a job_id; call get_job(job_id, wait_seconds=30) until done is true, then read video_url.

  • Editing a highlight never changes existing videos; they are flagged stale. Render again to see the edit.

  • Videos are branded automatically (the community's animated intro/outro, HUD with nameplate and kill counter, captions). First-person footage is recorded once and kept: trims, slow motion, captions and re-branding reuse it, so renderer: "ingame" often works even when the game is not available.

  • Slow motion: split a segment around the moment and set its speed (0.3–0.5 reads well for a final kill).

Typical flows

  • "What happened in this match?" -> list_matches -> get_match -> get_player_stats / list_rounds / get_round.

  • "Make X's clutch tighter and slow down the last kill" -> list_highlights -> get_highlight -> edit_highlight (trim / split_segment / set_speed) -> render_highlight -> get_job.

  • "Clip the moment at round 12 where Y throws the smoke" -> get_round to find ticks -> create_highlight.

  • "Give me a 5-clip montage of player Z" -> render_reel(player=Z, top=5) -> get_job.

  • "Bring in last Friday's games" -> list_source_matches() -> list_source_matches(source_id, only_missing=true) -> import_matches -> get_job for each -> get_match.

  • "What were the best plays this week?" -> get_feed.

  • "Who owns whom? Who cried the most last night? Give out the trophies" -> list_nights -> get_rivalries / get_trophies / get_chat_rankings (all take night=YYYY-MM-DD or match_id; no filter = every match) -> get_player_profile for one player across matches.

Players can be referred to by SteamID or by (part of) their in-game name.

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_matchesB

List analyzed matches (newest first) with map, score and status.

get_matchB

Match overview: status, map, teams, scoreboard (K/D/A, ADR, KAST, rating per player) and the top highlights. Start here.

get_player_statsB

Every stat of one player: rating, ADR, KAST, opening duels, trades, multi-kills, clutches, utility, per-weapon kills, CT/T split.

list_roundsA

One line per round: winner, reason, score, buys, bomb, first kill, tick range. Use get_round for the kill-by-kill detail.

get_roundB

Full detail of one round: every kill (tick, weapon, headshot, wallbang, smoke, trade…), clutches, bomb events, economy.

search_killsC

Search the kill log. All filters are optional and combined with AND.

list_highlightsA

Highlights of a match, best first, with video URL when rendered. score is 0-100 and tier S/A/B/C; featured plays are the curated best of each team plus stand-out plays - they get first-person videos, the others only 2D replays. get_highlight shows the score breakdown (feat, impact, style, economy, stakes, outcome). Pass featured=true for just the curated ones.

get_highlightA

Full highlight: description, every segment (ticks, POV, speed, caption), kill ticks and all its renders. Read this before editing.

set_featuredA

Promote a play to the featured ones (they get first-person videos when the match is produced) or remove it from them. Overrides the automatic curation and survives re-scoring.

rescore_matchA

Re-run the highlight scoring and curation on a match that is already analyzed (fast, the demo is not read again). Highlights keep their ids and videos; featured plays chosen by hand are kept.

create_highlightA

Create a custom highlight. Three ways: (1) segments = explicit list; (2) start_tick + end_tick (+ pov) for one continuous moment; (3) round_number + player to auto-clip that player's kills in that round. Returns the new highlight (not rendered yet).

edit_highlightA

Edit a highlight with a list of operations applied in order (all-or-nothing). Operations: trim{segment,start_delta_s,end_delta_s} · set_range{segment,start_tick,end_tick} · set_pov{segment|null,steamid} · set_speed{segment|null,speed} · set_caption{segment,caption} · add_segment{start_tick,end_tick,pov_steamid,speed,caption,index} · remove_segment{segment} · move_segment{segment,to} · split_segment{segment,at_tick} · set_meta{title,description,tags}. Segment indexes are 0-based. Example slow-motion on the last second of segment 0 that ends at tick 5000: [{op:'split_segment',segment:0,at_tick:4936},{op:'set_speed',segment:1,speed:0.5}]. Call render_highlight afterwards to produce the new video.

delete_highlightA

Delete a highlight definition (its rendered videos are kept).

render_highlightA

Render a highlight to an mp4 (asynchronous). renderer: 'auto' (in-game POV if this server can, else 2D), 'radar' (2D tactical replay; extra: {camera:'follow'|'full', zoom:1-3}) or 'ingame' (real CS2 footage, slower). Returns job_id; if wait_seconds > 0 it waits and includes video_url when done.

render_reelB

Render a reel: several highlights back to back in one video, with title cards. Pass highlight_ids for an explicit order, or let the server pick the top best (optionally only for one player).

get_jobA

Status of an analysis or render job. wait_seconds blocks until it finishes (max 120) — prefer this over polling in a tight loop.

get_renderC

A rendered video: status, video_url, thumbnail_url, size, and whether it is stale (highlight edited after rendering).

cancel_jobB

Cancel a queued or running job.

import_demoA

Analyze a demo file that already exists on the server's disk (inside one of the configured import folders). To upload from elsewhere use the REST API: POST /api/v1/matches (multipart field file). Returns match_id and job_id; wait with get_job, then call get_match.

get_feedA

The best plays that already have a video, across all matches, best first. Each item has the play (player, kind, round, tags), its match and the video_url. Use it to answer 'show me the best plays' or 'what did do lately' without walking every match.

list_source_matchesA

Sites this server can import matches from (for example the community's own match history), and for one source the matches it lists with their import status here. Call without source_id to list sources.

import_matchesA

Download and analyze matches from a source (see list_source_matches). Returns one job per match; wait with get_job, whose result carries the new match_id. Matches already imported or without a demo are reported in skipped.

produce_matchA

Make the videos of a match in one call: 2D replays ('radar') of every highlight and first-person POV ('ingame') of the featured ones - pov='all' records every play instead - in each shape ('16:9', '9:16' ready to post on phones, '1:1'). Videos that already exist and are up to date are skipped. First-person plays without recorded footage are captured together in one game session (capture_job_id, wait with get_job); their videos are queued when it finishes. detail explains anything that could not be queued (for example: recording is not enabled here).

get_brandA

Identity of this instance: the community's name, tagline, site, colours and logo. Videos carry this brand automatically (animated intro/outro built from the logo, HUD, captions); use the name and tone when writing titles or captions.

get_capabilitiesB

Server capabilities: which renderers are available here and why not.

list_nightsA

Nights of play, newest first: date, match ids, maps, how many players and rounds. A night is every match from noon to noon, so games after midnight count for the evening before. Use the date as night in get_trophies / get_rivalries / get_chat_rankings / get_player_profile.

get_rivalriesA

Who kills whom across matches. pairs: two players, kills of each on the other (score, the one ahead first), matches they faced each other, opening kills and knife/Zeus kills of each on the other, imbalance (0 even, 1 one-way). players: each player's nemesis ('carrasco', who beats him the most) and favourite victim ('freguês') as 'name (his kills-his deaths)'. No filter = every match; pass player for one player's rivalries. sort: duels (most kills between them) | diff | imbalance.

get_player_profileB

One player across matches: matches, wins, K/D/A, ADR, KAST and rating (weighted by rounds), HS%, clutches, opening duels, multi-kills, best plays (highlight ids and scores), fails by kind, nemesis and favourite victim, chat numbers and the last matches. No filter = every match he played.

get_trophiesA

Trophies of one match (match_id) or one night (night; default: the most recent night): MVP, clutch king, entry fragger, longest kill streak, longest drought, kills on 10 HP or less, friendly flasher, friendly fire, best and worst aim, died with the knife out, baiter, economist, headshot machine. Each has titles in Portuguese and English, the winner, the value, the numbers behind it and the runners-up; a trophy nobody deserved is left out.

get_chat_rankingsA

All-chat rankings for friends to tease each other (a word list, NOT moderation - it misses sarcasm). Podiums: toxic ('boca suja': swearing), whine ('chorão': cheating accusations, luck, complaining), death_cry (whining or swearing within 20 s of his own death - the real cry-baby number), talker ('tagarela': who types the most lines, whatever they say; no examples), laugh ('risadinha'), nice ('gente boa': praise, gg), shouting (caps). Each podium entry has the count, the rate per round played and one or two example lines (slurs masked). players has every count per player.

Prompts

Interactive templates invoked by user choice

NameDescription
make_highlight_reelTurn a match into a polished highlight reel, step by step.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 30 tools

Disambiguation4/5

Most tools map to clearly distinct resources or actions: matches, rounds, kills, highlights, players, jobs, renders, imports and analytics. A few pairs such as get_player_stats vs get_player_profile and get_feed vs list_highlights need the descriptions to separate them, but the boundaries are still workable.

Naming Consistency5/5

The tool set uses a consistent snake_case verb_noun pattern throughout: list_matches, get_match, create_highlight, render_reel, import_demo, get_player_profile, and so on. Minor variations like set_featured and produce_match still fit the same predictable convention.

Tool Count2/5

Thirty tools is heavy for an agent-facing surface, even though the server spans demo import, analysis, highlight editing, rendering, jobs and community analytics. Many related operations could be consolidated or grouped, and the size increases selection burden.

Completeness4/5

The surface covers the domain well: importing demos and source matches, match/round/kill/player analysis, highlight CRUD, featured curation, rendering, job status, feeds, trophies, rivalries and chat rankings. Minor gaps remain, such as no direct upload tool, no match deletion/metadata management, and limited source administration.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues