roll_detailed
Get a complete breakdown of any dice roll, including individual die values, kept/dropped dice, and the full AST structure. Ideal for debugging complex rolls, character creation, and transparent gameplay.
Instructions
Roll dice with comprehensive breakdown including AST structure and individual die values.
PURPOSE: Use this tool when you need to see exactly what happened during a dice roll, including which specific values each die showed, which dice were kept or dropped, and the complete Abstract Syntax Tree (AST) structure of the roll. Perfect for debugging, transparency, and understanding complex roll mechanics.
WHEN TO USE:
Character creation: See which specific values you rolled for ability scores (4d6kh3)
Debugging: Understand why a complex roll gave a particular result
Transparency: Show players exactly what each die rolled
Learning: Understand how keep/drop/reroll mechanics work
Complex rolls: Analyze multi-step expressions with nested operations
Statistical analysis: See individual die distributions
WHEN NOT TO USE:
Simple rolls where you only need the total (use roll instead)
Multiple different rolls (use roll_batch instead)
You don't need the AST complexity for basic gameplay
AST STRUCTURE EXPLANATION: The "ast" field contains a tree structure representing the roll:
"type": Type of node (Expression, Dice, Number, etc.)
"total": Numeric value of this node
"number": Number of dice rolled (for Dice nodes)
"size": Dice size, e.g., 6 for d6 (for Dice nodes)
"values": Array of individual die results with "value" and "kept" (true/false)
"children": Nested operations (for complex expressions)
INDIVIDUAL DIE RESULTS: The "values" array shows each die roll:
{"value": 4, "kept": true} → This die was kept in the final result
{"value": 2, "kept": false} → This die was dropped (e.g., in 4d6kh3)
COMMON EXAMPLES:
Character Stats: "4d6kh3" → See which 3 of 4 dice were kept
Advantage: "2d20kh1" → See both d20 results, know which was kept
Reroll Analysis: "4d6rr1" → See which dice were rerolled
Exploding Dice: "3d6e" → See which dice exploded and their chain
Complex Expression: "(1d4+1)*2d6kh1" → Full breakdown of nested operations
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | Dice expression to evaluate | |
| allow_comments | No | Allow comments after the expression |