Skip to main content
Glama
saidsurucu

d20-mcp

by saidsurucu

roll

Roll dice using standard RPG notation and get the total result. Use for attack rolls, damage, ability checks, and saving throws in tabletop games.

Instructions

Roll dice using standard RPG notation and return the total result.

PURPOSE: Use this tool when you need a quick dice roll with just the total numeric result and a formatted output string. This is the most common tool for standard RPG scenarios like attack rolls, ability checks, saving throws, and damage calculations.

WHEN TO USE:

  • Making attack rolls (1d20+5)

  • Rolling damage (2d6+3, 8d6)

  • Ability checks and saves (1d20+modifier)

  • Any roll where you just need the total

  • Quick single rolls without needing detailed breakdown

WHEN NOT TO USE:

  • If you need to see individual die results, use roll_detailed instead

  • If you need to make multiple different rolls, use roll_batch instead

  • If you just want to validate syntax without rolling, use validate_syntax instead

SUPPORTED NOTATION:

  • Basic: 1d20, 3d6, d20 (equivalent to 1d20)

  • Arithmetic: 1d20+5, 2d6-1, 3d6*2, 1d20/2

  • Keep highest/lowest: 4d6kh3 (keep highest 3), 4d6kl1 (keep lowest 1)

  • Drop: 4d6p1 (drop lowest 1, equivalent to kh3)

  • Reroll: 1d20rr<10 (reroll until ≥10), 1d20ro1 (reroll 1s once)

  • Exploding: 1d6e (explode on max), 1d6e6 (explode on 6)

  • Min/Max: 1d20mi10 (minimum 10), 1d20ma20 (maximum 20)

  • Complex: (1d4+1)*2, (1d6, 3, 2d4)

COMMON EXAMPLES:

  • D&D Attack Roll: "1d20+5" → Check if hits AC

  • Ability Score: "4d6kh3" → Roll 4d6, keep highest 3

  • Fireball Damage: "8d6" → Total fire damage

  • Sneak Attack: "1d20+7" for attack, then "1d6+3d6" for damage

  • Critical Hit: "2d8+6" (doubled dice)

  • With Advantage: "2d20kh1" (roll 2d20, keep highest)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesDice expression to evaluate (e.g., '1d20+5', '4d6kh3')
allow_commentsNoAllow comments after the expression (e.g., '1d20 fire damage')
Behavior4/5

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

With no annotations, the description takes on the full burden of explaining behavior. It clearly states that the tool returns 'the total result and a formatted output string' and notes this is for 'quick single rolls without needing detailed breakdown,' implying it does not expose individual dice. The extensive supported notation list also sets expectations for accepted inputs. However, it does not disclose failure behavior for invalid expressions, which would round out the transparency.

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

Conciseness4/5

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

The description is long but well-structured with clear sections (Purpose, When to Use, Supported Notation, Examples). Every section earns its place given the tool's syntactic complexity. It is front-loaded with the core purpose, and the examples are illustrative rather than filler. A slight redundancy exists between 'Common Examples' and the notation list, but overall it remains efficient.

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

Completeness5/5

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

This tool has no output schema and no annotations, yet the description covers purpose, usage boundaries, supported syntax, typical examples, and distinctions from all three sibling tools. It tells an agent exactly what to expect (total result and formatted string) and how to construct valid expressions. For a tool with this many notation variants, the description is remarkably complete.

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?

Schema coverage is 100%, so the parameters are already documented. The description adds significant value by providing a comprehensive list of notation examples and explaining how allow_comments works with a concrete example ('1d20 fire damage'). This enriches the bare schema definitions with practical usage context, going beyond the baseline of 3.

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

Purpose5/5

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

The description opens with a specific verb and resource: 'Roll dice using standard RPG notation and return the total result.' It clearly distinguishes itself from siblings by naming roll_detailed, roll_batch, and validate_syntax as alternatives, and by emphasizing this is the 'most common tool for standard RPG scenarios.' This leaves no ambiguity about what the tool does.

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

Usage Guidelines5/5

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

The description devotes dedicated WHEN TO USE and WHEN NOT TO USE sections, explicitly listing scenarios like attack rolls, ability checks, and damage calculations. It also names exact alternative tools for each exclusion, such as 'use roll_detailed instead' for individual die results. This exceeds basic guidance and gives an agent clear decision criteria.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/saidsurucu/d20-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server