civ-v-llm-harness
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
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 |
|---|---|
| referenceA | What things do, in two books. book="rules" (the default): the rule book of this very game, read once from its
database (mods and DLC included) and cached -- every unit, building, wonder, project, process, promotion, social
policy and ideology tenet, technology, belief, resource, terrain, feature, improvement, specialist and unit
action, with its numbers. book="playbook": how to play through these tools (the turn loop, batches, blockers,
diplomacy, the house rules, the action table). Read-only, usable while it is not my turn. Use it to learn what a
choice means; use state for the live numbers (its chooser rows carry only the enum, the name and live numbers,
never this text) and question for what a popup asks.
|
| turnA | The clock: my seat's turn loop, one action per call.
Actions:
status -- whose turn it is, the |
| stateA | Read the game as my seat sees it: the empire, units, cities, civs and city-states, the map, the league, spies, the screens, and the choices open to me (research, policies, beliefs, trade routes). Read-only, no side effect, usable while it is not my turn. Use it before an order (its rows ARE the orders) and after one to verify; use reference for what things do, question for what a popup asks, turn for the turn's own state.
How to call: |
| orderA | An order to something I own: |
| questionA | What the game is asking right now, so answer() can settle it. Read-only; takes nothing. Use it whenever a reply's |
| answerA | Answer what the game is asking: settle the one popup, leader screen or deal that question() shows, and nothing else. |
| notebookA | My memory, kept beside the game per seat and surviving a context reset or a restart: free-text notes, assignments (what a unit or city is for) and standing orders (a unit's plan the harness carries out over the coming turns). Use it for what future-me must know; the game itself holds no plan. Notes and assignments move nothing; a standing order does: give_order and resume_order run its first steps NOW (a move spends this turn's movement, a build starts) and carry on at the start of each of my turns. action, with its args -- remember {text, tag?, replace_id?}: write a note (returns it with its id; new notes ride on the next briefing / finish); recall {tag?, limit?}: list notes; forget {note_id}: delete a note for good. assign {role, purpose, unit_ids? / city_ids?}: give units or cities a purpose that shows in their state rows; assignments: list them; amend {assignment_id, purpose? / role?}; close {assignment_id}. give_order {unit_id, steps, interrupt?, purpose?, replace_id?}: steps is a list of at most 6, in order -- {kind: 'move', x, y}, {kind: 'build', build: 'FARM'}, {kind: 'heal', hp: 80}, {kind: 'hold', mission: 'fortify' | 'sleep' | 'alert'} (last) -- each step runs at most once per turn and the next starts as soon as one completes (a move that arrives starts its build the same turn); it never attacks, declares war or ends the turn, and pauses with a reason when a hostile comes near, the unit is hurt or a step is refused; one open order per unit (replace_id replaces it). orders: the plans with their status; cancel_order / resume_order {order_id}. Not this tool: a one-off move is order(to='unit'); a popup is answer; the board is state. Usable while it is not my turn. Returns {ok: true, ...} with the row written or the rows listed, or {ok: false, err, accepts, example} (an unknown action or a missing argument; nothing is written). A note written on a turn later than the one on screen (a save was loaded) comes back marked later_timeline. |
| batchA | Many orders in one call, in order, with the turn left open: actions is a list of {tool, args} rows -- the rows every read hands back ( |
| sessionA | Saves, loads and the seat of this game session: keep a state before a risky turn, open another save, leave a finished game, say which hotseat seat this server plays. It never plays a turn; use turn for that. Side effects: a load replaces the game on screen for everyone on it, and a hotseat game loads paused until turn(action='wait'); the notebook is per game and seat, so it follows a save of the same game and is not touched by a load. action -- save: a quick save of the game on screen into the one quick-save slot (each finished turn's autosave overwrites that slot, so copy a save you want kept); load {filename}: open that save (a name as the game lists it, without the single/ prefix; the refusal lists the legal ones), replacing the unsaved state, so save first; load_latest: open the newest save, whichever game it is; main_menu: leave the game for the main menu (the game_over gate's way out); seat {seat}: which human seat (0 or 1) this server plays in a hotseat game -- a server pinned with --seat refuses a change onto the other human seat, and never move onto the seat on screen. Returns {ok: true, saved / loaded, turn, seat, screen} or {ok: false, err} naming why (an unknown filename with the list, a seat that is someone else's, a game operation already running). In a game with other people ask the human before loading. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| play_turn | Play one turn of Civilization V through the civ5 tools. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| reference | The rule book: what every unit, building, tech, policy, promotion, belief, resource, terrain, improvement and unit action does, from this game's database. Markdown. |
| playbook | How to play through this harness: the turn loop, the blocker table, verification habits. |
TDQS
Scored across 9 tools
Each tool owns a distinct slice of the loop: order (single mutation), answer (popup settlement), state/reference/question (three different reads), turn (clock), batch (multi-order), notebook (memory), session (saves/seat). The descriptions go further than most servers by including explicit "Not this tool" sections (e.g. order vs batch vs turn(finish), answer vs order) so the nearest-neighbour confusions are pre-empted.
All nine names are single lowercase words with no prefixes, suffixes, casing or separator mixing (order, answer, batch, session...), which is highly predictable. The only weakness is that they are bare nouns rather than verb_noun, so a few (state, notebook, reference) don't self-describe their action as immediately as a verb would.
Nine tools for a game harness spanning mutation, reads, popup resolution, turn management, batching, persistence and session control is tight and every tool has a clear distinct job. Complexity is pushed into per-tool `action`/`what` sub-selectors rather than into more top-level tools, which is the right trade-off here.
The lifecycle is essentially covered: read board/rules/prompts, issue orders singly or batched, settle every popup, advance/wait the turn, keep notes and standing orders, save/load/seat. The one plausible gap is that session only saves, loads and reassigns seats — there is no operation for starting a new game, which a full session lifecycle would normally include.