Skip to content

Using It With An AI Agent

github-actions[bot] edited this page Nov 26, 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.

In Claude Desktop, install thetowersdk.mcpb from the latest release. It carries the server and the package, so nothing else needs installing.

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

Any MCP client works — it speaks stdio.

Or by config file:

{
  "mcpServers": {
    "thetowersdk": {
      "command": "node",
      "args": ["./node_modules/@beardedunicorn/thetowersdk/mcp/server.mjs"]
    }
  }
}
Tool Ask it for
list_exports · get_export What exists, and one table previewed rather than dumped
find_rows The rows you want from one table — filtered, searched, paged
describe_schema A table's declared shape, not one guessed from a sample row
decode_save · run_extractor · read_save_field What is in a tool_export.json, one reader's fields, and one field's data a page at a time
battle_history Every run in a save's history, with coins per hour and an average
next_unlocks The next workshop unlock, ultimate weapon and ultimate weapon plus, and each running lab's rush price, beside the balance that pays for each
coin_bonus The Battle tab's Total Coin Bonus row by row, at any tier, and what a change to one input does to it
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, see which chart it draws and what feeds it
chart_rows The published rows behind a chart
chart_series One series the catalogs hold, as {x, y} points by id
save_series A save's history as {x, y} points: runs and tournaments by date, records by tier
form_calc The site's form calculators — fields, defaults, and a run
patch_notes The developers' patch notes: search them, or find when something first appeared
plan_effective_path An Effective Path, with the candidates it left out and why — from zero, or from a save for the economy family
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 (game › save › code › user › sheet › wiki › external-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