Skip to main content
Glama

Roll dice

roll-dice

Roll dice formulas in Foundry VTT and get total plus individual die results. Optionally post to chat with flavor text, using actor data for @ references.

Instructions

Roll a free formula in Foundry, in any game system, e.g. "2d6+3" or "4d6kh3". Returns the total and every single die result. With actorId, @ references use that actor's roll data. Nothing is posted unless toChat is true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flavorNoText shown with a posted roll
toChatNoPost the roll to the chat. Default false: nothing is posted
actorIdNoActor id or exact name whose roll data fills @ references
formulaYesFoundry roll formula
rollModeNoWho sees a posted roll: publicroll everyone, gmroll Gamemasters (default), blindroll Gamemasters only and hidden from the roller, selfroll only the bridge user

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv14.2609.4

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, the description discloses the return value (total and every die result), the @-reference resolution behavior, and the key side effect: nothing is posted unless toChat is true. This gives an agent a clear behavioral model despite the sparse annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences pack the primary action, examples, return behavior, actorId behavior, and posting side effect with no filler. The most important information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter tool with full schema coverage and no output schema, the description covers formula syntax, return behavior, actor scoping, and chat side effect. It does not specify a structured return shape or enumerate all rollMode implications, but the schema covers the enum and the description is sufficient for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema already documents all 5 parameters (100% coverage), so the baseline is 3. The description adds value by giving formula syntax examples and explaining how actorId affects @ references, which is not fully captured in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ('Roll a free formula in Foundry') with concrete examples ('2d6+3', '4d6kh3'), making the tool's action clear. It does not explicitly name sibling roll tools like roll-actor-check or roll-initiative, so it stops short of full differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It establishes a general use case: rolling arbitrary formulas in any game system. The actorId conditional ('@ references use that actor's roll data') provides context but no explicit guidance about when to choose roll-dice over sibling roll tools or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools