Skip to main content
Glama
vandewilly

MCP Dice Roller

by vandewilly

roll_multiple

Roll dice multiple times using standard notation to generate results and statistics for tabletop gaming or probability testing.

Instructions

Roll the same dice multiple times.

Args: notation: Dice notation (e.g., '1d20+5') times: Number of times to roll (1-20)

Returns: Dictionary with all roll results and statistics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notationNo1d6
timesNo

Implementation Reference

  • The implementation of the `roll_multiple` MCP tool, which performs a series of dice rolls based on a provided notation and calculates statistics.
    @mcp.tool()
    def roll_multiple(notation: str = "1d6", times: int = 1) -> dict:
        """
        Roll the same dice multiple times.
    
        Args:
            notation: Dice notation (e.g., '1d20+5')
            times: Number of times to roll (1-20)
    
        Returns:
            Dictionary with all roll results and statistics
        """
        if times < 1 or times > 20:
            return {"error": "Times must be between 1 and 20"}
    
        results = []
        totals = []
    
        for i in range(times):
            roll_result = roll_dice(notation)
            if "error" in roll_result:
                return roll_result
            results.append(roll_result)
            totals.append(roll_result["total"])
    
        return {
            "notation": notation,
            "times": times,
            "results": results,
            "totals": totals,
            "statistics": {
                "min": min(totals),
                "max": max(totals),
                "sum": sum(totals),
                "average": round(sum(totals) / len(totals), 2),
            },
        }
Behavior4/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 return structure ('Dictionary with all roll results and statistics') and input constraints ('1-20' range for times), but omits error handling behavior or randomness guarantees.

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?

Front-loaded purpose statement followed by structured Args/Returns sections. No redundant text, though the explicit 'Args:' and 'Returns:' labels add slight verbosity for an MCP context.

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 2-parameter utility with no output schema, the description adequately covers inputs and return format. The 'statistics' mention hints at computed values returned, providing sufficient context for invocation.

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

Parameters5/5

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

Schema has 0% description coverage, but the Args section fully compensates: 'notation' includes syntax example ('1d20+5') and 'times' includes valid range (1-20). Complete semantic documentation despite empty schema.

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?

Description opens with specific verb ('Roll') and resource ('dice'), explicitly scoping to 'multiple times' which distinguishes it from sibling tool 'roll_dice'. Clear and unambiguous purpose statement.

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?

The phrase 'multiple times' implies use when repeated rolls are needed, but there is no explicit comparison to 'roll_dice' or guidance on when to prefer this over single rolls. Usage is implied but not explicitly guided.

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/vandewilly/mcp-dice-roller'

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