A 5e storytelling engine with an LLM DM

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>


+258 -29
4 changed files