Skip to main content
Glama
saidsurucu

d20-mcp

by saidsurucu

roll_batch

Roll multiple dice expressions at once and receive all results in a single structured response. Use for combat rounds, character creation, and multiple checks.

Instructions

Roll multiple different dice expressions in a single efficient operation.

PURPOSE: Use this tool when you need to make several different dice rolls at once. Instead of calling the roll tool multiple times, batch them together for efficiency and to receive all results in a single structured response. Perfect for combat rounds, character creation, or any scenario requiring multiple distinct rolls.

WHEN TO USE:

  • Combat rounds: Roll attack, damage, and saving throws together

  • Character creation: Roll all 6 ability scores at once (6x "4d6kh3")

  • Multiple checks: Roll several different ability checks simultaneously

  • Efficiency: When you need 3+ different rolls, batching is more efficient

  • Organized results: Get all rolls back in a structured array

  • Mixed roll types: Different expressions with different modifiers/mechanics

WHEN NOT TO USE:

  • Single roll (use roll instead)

  • Need detailed AST for each roll (call roll_detailed multiple times)

  • Rolls are dependent on each other (roll one, check result, then decide next roll)

ERROR HANDLING: Each roll in the batch is evaluated independently. If one expression fails, it returns an error entry, but other rolls continue. Check the "success" field for each result:

  • success: true → Roll succeeded, has "total" and "result"

  • success: false → Roll failed, has "error" message

COMMON EXAMPLES:

Combat Round: ["1d20+5", "2d6+3", "1d20+2"] → Attack roll, damage roll, saving throw

Character Creation (6 ability scores): ["4d6kh3", "4d6kh3", "4d6kh3", "4d6kh3", "4d6kh3", "4d6kh3"] → Roll all six ability scores at once

Party Ability Checks: ["1d20+3", "1d20+1", "1d20+5", "1d20+0"] → Perception checks for 4 party members

Mixed Damage Types: ["2d6", "1d8", "3d4+2"] → Sword damage, fire damage, poison damage

With Advantage/Disadvantage: ["2d20kh1+5", "2d20kl1+2"] → Attack with advantage, save with disadvantage

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionsYesArray of dice expressions to evaluate
allow_commentsNoAllow comments after each expression
Behavior5/5

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

With no annotations provided, the description carries full burden. It discloses that each roll is independent, failure behavior (returns error entry, others continue), success/error fields, and that results come in a structured array. This goes well beyond what a typical tool description provides.

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 extremely well structured with clear sections (PURPOSE, WHEN TO USE, WHEN NOT TO USE, ERROR HANDLING, COMMON EXAMPLES). It is front-loaded with purpose. Some examples are repetitive and could be trimmed, but every section contributes to decision-making and usage. Slightly verbose yet consistently effective.

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?

There is no output schema, so the description explains return values ('structured array', 'success', 'total', 'result', 'error'). It covers error handling, use cases, alternatives, and provides examples. Combined with the detailed input schema, this is a fully self-sufficient description.

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

Parameters3/5

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

Schema coverage is 100%: expressions and allow_comments are already described. The description adds many examples for the expressions parameter, but does not add meaningful semantics for allow_comments beyond the schema. It provides useful context but does not heavily compensate since schema already covers both parameters.

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 clear, specific phrase: 'Roll multiple different dice expressions in a single efficient operation.' It distinguishes itself from sibling tools by explicitly contrasting with roll and roll_detailed, and the WHEN TO USE / WHEN NOT TO USE sections reinforce the unique batching behavior.

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?

Dedicated 'WHEN TO USE' and 'WHEN NOT TO USE' sections provide explicit context and alternatives. It names roll for single rolls, roll_detailed for AST needs, and warns against dependent rolls. This is exactly the kind of guidance needed for tool selection.

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