A 5e storytelling engine with an LLM DM
Something went wrong. Try again.
Add entity path index and write-through cache for faster tool calls master
Tool-heavy turns were doing 30+ filesystem existence checks per turn — every entity lookup tried 6 entity type directories sequentially. Now the MCP server builds a name→path index by globbing the world directory once at startup. All entity lookups are dict lookups. The index also has a write-through cache for parsed entity data. establish() and mark() update both the index and cache after writing, so subsequent reads in the same turn never hit disk. Everything is channeled through the same set of tools so the cache is always current. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author Chris Guidry Co-author Claude Opus 4.6 (1M context) Date (Mar 27, 2026, 9:46 PM UTC) Commit a347ac4b a347ac4bcbdacc637b839be7eb962304603c6815 Parent ff195103 ff195103c0077a5ae4796eaed6e2d018ec343895