Skip to content

Using It With An AI Agent

Josh Dionne edited this page Sep 14, 2026 · 4 revisions

Generated from the thetowersdk repository. Edits made here are overwritten on the next push — change the source file instead.

Using It With An AI Agent

There's an MCP server in mcp/. Point your agent at it and it can read the real API and the real game data instead of guessing at both.

claude mcp add thetowersdk -- node ./node_modules/thetowersdk/mcp/server.mjs

Any MCP client works — it speaks stdio.

Or by config file:

{
  "mcpServers": {
    "thetowersdk": {
      "command": "node",
      "args": ["./node_modules/thetowersdk/mcp/server.mjs"]
    }
  }
}
Tool Ask it for
list_exports · get_export What exists, and one table previewed rather than dumped
describe_schema A table's declared shape, not one guessed from a sample row
decode_save · run_extractor What is in a playerInfo.dat, and one reader's output
define_term What an acronym means, and whether it is ambiguous
calc_list · calc_describe · calc_run · calc_chart · calc_graph Every calculator: find it, read its inputs, run it, chart it, see what feeds it
plan_effective_path An Effective Path, with the candidates it left out and why
wiki_search · wiki_page How a mechanic actually behaves, from the community wiki
sdk_sandbox_run A scratchpad over what the package ships — list, read an export, run a calculator, format, decode
begin_mechanic_task · record_mechanic_note · record_work_status · compliance_contract A mechanics compliance session, with notes and a ledger written to docs/mechanics-map/

The graph, trust and debug tools (sdk_graph_*, trust_*, sdk_debug_* and a few others) run scripts from the repository this package is developed in. An installed server leaves them out of tools/list rather than advertising tools that cannot run.

The Tower Oracle

A knowledge graph of game mechanics, shipped with the package as its own MCP module. Nodes are mechanics, edges are the relationships between them, and every claim carries its source and whether anything here has verified it. It answers how a mechanic behaves, what it interacts with, and the specific ways it has been misread before.

Tool Ask it for
oracle_traps Call this first. Every known way this mechanic has been got wrong
oracle_expand What an acronym means, from a closed set — GT+, CF, DW, BH
oracle_brief A short orientation on a mechanic before you model it
oracle_get · oracle_search One node in full, or find the node by phrasing
oracle_map How a mechanic connects to the rest of the game
oracle_footguns Cross-cutting mistakes not tied to one mechanic
oracle_coverage How well a compartment is actually covered
oracle_contradictions Claims that disagree, ranked by source authority

Three properties shape how you read its answers:

  • claimType marks every claim objective or sentiment, keeping measured values and community opinion distinguishable.
  • oracle_coverage reports how well a compartment is covered, so an empty oracle_traps result can be read as unexercised or as clean rather than guessed at.
  • oracle_contradictions surfaces claims that disagree, ranked by source authority (gamesavecodeusersheetwikiexternal-repo), and returns both values.

oracle_expand resolves acronyms from a closed set, so an unknown shorthand returns as unknown.

Two tools worth knowing

plan_effective_path runs any family and variant without a scratch script — { family: "economy", variant: "time", steps: 5 }. It plans from a zero config, so read it for structure: which candidates a variant offers, and why the rest are excluded. Pass a wrong variant and it names the ones that exist rather than returning an empty result.

wiki_page is the one to reach for before describing game behavior. This package supplies values, not semantics — a table says a number changes, not what it means or what it interacts with. wiki_search { query } finds the title, wiki_page { title, section? } reads it. Pages are cached after first read; set TOWER_WIKI_DIR to a directory of slug.md files to serve them offline, and every response says whether it came from local, cache or fandom.

Agent instructions live in AGENTS.md, which ships with the package; CLAUDE.md and .github/copilot-instructions.md point at the same file.


Clone this wiki locally