Skip to content
The archive is in testingEverything you make here, accounts and runs included, will be wiped before launch on 1 October 2026.

The agent's tools and settings

claude-sonnet-5 on Claude CodeRead the log

Tools

ToolDescriptionParameters
slay_the_spire_execRun async JavaScript against Slay the Spire through Communication Mod; `sts` is in scope. Use `return <value>` for results. Read the state (`await sts.state()`), then act: `sts.play(i, target)`, `sts.end()`, `sts.choose(x)`, `sts.proceed()`, `sts.cancel()`, `sts.potion(...)`, `sts.key(...)`, `sts.wait(n)`, or `sts.command('<raw>')`. Every action returns the state the game settled in.
code
string JavaScript executed as an async function body with `sts` in scope.
slay_the_spire_documentationReturn the complete supported JavaScript API reference for the `sts` object used inside slay_the_spire_exec. Call this when exact methods, arguments, option fields, or result types are needed.none
slay_the_spire_screenshotCapture a full-resolution screenshot of Slay the Spire. By default it is returned as an image. Pass `savePath` to save the image to that file instead, without returning the image to the agent.
savePath (optional)
string Optional file path where the image should be saved instead of returned; relative paths use the broker's working directory, missing parent directories are created, and existing files are overwritten.

Instructions

AGENTS.md

Slay the Spire, AI assisted

You play Slay the Spire through three tools: sts_documentation (read it first), sts_exec (JavaScript with sts in scope) and sts_screenshot. The game is turn-based and paused between your commands; take the time you need, but every command counts. Play the run that has been started for you to the end: defeat the boss of Act 3 (and the Heart if the run allows it). If you die, call sts.restart(): it starts a new run with the same seed, so the map, the encounters and the rewards are the same and what you learned still applies; the new run counts from the beginning and the session clock keeps running. The Secret Portal event in act 3 is not allowed: never enter the portal (it skips the rest of the act); leave it, the tools refuse the other choice anyway. After the victory the session ends by itself. Do not press Continue or start runs any other way, do not change settings, and do not look up information outside the game.

What the documentation tool returned

documentation.md

The whole text

Slay the Spire API

sts is in scope in sts_exec. Slay the Spire is turn-based and waits for you: nothing happens between your commands. Every call returns the full game state after the game settled.

State

await sts.state() (alias sts.observe()) returns { available_commands, ready_for_command, in_game, game_state }. game_state has screen_type, one of EVENT, CHEST, SHOP_ROOM, REST, CARD_REWARD, COMBAT_REWARD, MAP, BOSS_REWARD, SHOP_SCREEN, GRID, HAND_SELECT, GAME_OVER, COMPLETE, NONE (NONE during a fight: the combat itself is in combat_state), screen_state (the choices and details of that screen), room_phase (COMBAT, EVENT, COMPLETE, INCOMPLETE), floor, act, act_boss, current_hp, max_hp, gold, deck, relics, potions, map, choice_list and, in combat, combat_state with hand, draw_pile, discard_pile, exhaust_pile, player (energy, block, powers), monsters (current_hp, block, intent, move_adjusted_damage, move_hits, powers) and turn. available_commands lists what you may do right now.

Commands

  • await sts.play(cardIndex, targetIndex?): play the card at cardIndex (1-based, as in the hand) on monster targetIndex (0-based) when the card needs a target.
  • await sts.end(): end the turn.
  • await sts.potion("use" | "discard", slot, targetIndex?).
  • await sts.choose(indexOrName): pick from choice_list (0-based index or the choice's name) on map, reward, event, shop, rest and card screens.
  • await sts.proceed() / await sts.confirm(): the right-hand button (continue, confirm).
  • await sts.cancel() / await sts.skip() / await sts.leave() / await sts.back(): the left-hand button.
  • await sts.key("Confirm" | "Cancel" | "Map" | "Deck" | "Draw_Pile" | "Discard_Pile" | "Exhaust_Pile" | "End_Turn" | "Up" | "Down" | "Left" | "Right" | "Drop_Card" | "Card_1".."Card_10"): presses that key.
  • await sts.click(x, y, "left" | "right"): a mouse click at (x, y) in the game's own 1920x1080 space ((0,0) is the top left corner, (1920,1080) the bottom right, whatever the window resolution). It also moves the cursor. Everything on a screen is reachable with choose, proceed and cancel; a click is for what those do not offer.
  • await sts.wait(frames): let the game run for that number of frames, or until the game state changes, whichever comes first.
  • await sts.command("PLAY 1 0"): any raw Communication Mod command.
  • await sts.screenshot(): the game window as an image (the state is the ground truth; the picture is for orientation).
  • await sts.restart(): only after a death (screen_type GAME_OVER without victory): a new run with the same seed (same map, encounters and rewards). Every other command is refused until you restart.

sts.choose() refuses to enter the Secret Portal event (act 3): only "leave" is accepted there.

Commands that are not in available_commands are rejected with an error; read the state first. The run has already been started for you (character, ascension and seed are fixed); do not start a new one yourself.

Runtime and game settings

UPSTREAM.json

game-config
communication_mod
repo
https://github.com/ForgottenArbiter/CommunicationMod
version
1.2.1
jar
https://github.com/ForgottenArbiter/CommunicationMod/releases/download/v1.2.1/CommunicationMod.jar
sha256
12b99249eccfd5245ddb0b6b7575e1a1dfba0ce0ed6fad5bd5bbd4a303897ef5
sts_version
11-30-2020
mts_version
3.18.1
dependencies
basemod
license
MIT, Copyright (c) 2019 ForgottenArbiter
modthespire
workshop_id
1 605 060 445
license
MIT, Copyright (c) 2018 Anthony Moore
basemod
workshop_id
1 605 833 019
license
MIT, Copyright (c) 2018 t-larson
sts_lightspeed
repo
https://github.com/gamerpuppy/sts_lightspeed.git
commit
7476a81954020087da31d41d16fddf475746ec2d
commit_date
2024-08-10T14:30:50-07:00
license
MIT, Copyright (c) 2021 gamerpuppy (LICENSE.md; a copy is in lightspeed/LICENSE)
used_by
lightspeed/build.sh (the combat oracle and the aas planner)

mcp.template.json

runtime-config
mcpServers
slay_the_spire
3 fields
command
node
args
--permission--allow-fs-read=__REPO__/packages/core--allow-fs-read=__REPO__/games/slay-the-spire--allow-fs-read=__RUN_DIR__--allow-fs-write=__RUN_DIR____REPO__/packages/core/src/broker.mjs
env
5 fields
AAS_STS_GAME_ROOT
__ENV__
AAS_STS_SEED
__ENV__
AAS_GAME_MODULE
__REPO__/games/slay-the-spire/plugin.mjs
AAS_RUN_DIR
__RUN_DIR__
AAS_ALLOWED_ENDPOINTS
127.0.0.1:27183

settings.json

runtime-config
permissions
allow
mcp__slay_the_spire__slay_the_spire_documentationmcp__slay_the_spire__slay_the_spire_screenshotmcp__slay_the_spire__slay_the_spire_exec
deny
BashWebFetchWebSearchAgentReadEditWriteNotebookEditGlobGrepSkillTodoWrite
defaultMode
acceptEdits
enableAllProjectMcpServers
yes
enabledMcpjsonServers
slay_the_spire