A 5e storytelling engine with an LLM DM
Something went wrong. Try again.
Fix roll() signature mismatch in sandbox and clean up run_code docs master
The sandbox's roll() only accepted notation, but build_tool_signatures() advertised the MCP version's signature which includes reason — so the DM tried passing reason and got a TypeError. Now _roll_host accepts reason too (ignores it, it's only for the CLI notification). Also cleaned up the run_code tool description: dropped the false claim that random is available (it's not in Monty), spelled out clearly that roll() -> dict while all other tools -> str, and showed how to use the dict keys for math. 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 31, 2026, 12:25 PM UTC) Commit 6fb7c167 6fb7c16788406edd2feb7579e353976b613b8d6e Parent 18204aa7 18204aa7432767c0b9f9aaab73ada8a7014b0179