GameTools
Constants
List of all tool names for reference
Class methods
Build the array of all game tools for use with Tool Runner.
Prompt caching: the tool schemas never change between turns, so the last tool is tagged with an ephemeral cache breakpoint. This caches the whole tools array server-side, cutting input-token cost and latency on repeat.
Create add companion tool. Locks in a named NPC so its name persists across turns instead of drifting (e.g. an imp familiar summoned once should keep its name for the rest of the adventure).
Create get companions tool (read-only).
Create inventory view tool (read-only)
Create get journal tool (read-only).
cache enables Anthropic prompt caching on this tool definition. It is set
on the LAST tool in the array (see build_tools) so the entire tool set is
treated as a single stable cached prefix — every turn sends the same 15
tool schemas, so caching them avoids reprocessing ~2k tokens per request.
Create current room tool (read-only)
Create character stats tool (read-only)
Create inspect item tool (read-only)
Create remember tool — writes a free-form fact to the journal so it persists across turns (NPC names not traveling with you, quest details, world lore, promises, passwords, ...).
Create remove companion tool.
Create remove from inventory tool