Skip to main content
Glama
vandewilly

MCP Dice Roller

by vandewilly

flip_coin

Simulate coin flips for decision-making or probability testing. Specify how many times to flip (1-100) and get the results.

Instructions

Flip a coin one or more times.

Args: times: Number of times to flip (1-100)

Returns: Results of the coin flip(s)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timesNo

Implementation Reference

  • The flip_coin tool handler implemented with @mcp.tool() decorator.
    def flip_coin(times: int = 1) -> dict:
        """
        Flip a coin one or more times.
    
        Args:
            times: Number of times to flip (1-100)
    
        Returns:
            Results of the coin flip(s)
        """
        if times < 1 or times > 100:
            return {"error": "Times must be between 1 and 100"}
    
        flips = [random.choice(["heads", "tails"]) for _ in range(times)]
    
        if times == 1:
            return {"result": flips[0]}
    
        heads_count = flips.count("heads")
        tails_count = flips.count("tails")
    
        return {
            "flips": flips,
            "count": {"heads": heads_count, "tails": tails_count},
            "total": times,
        }
Behavior2/5

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

No annotations provided, so description carries full burden. Mentions 'Returns: Results' but fails to specify format (heads/tails strings, booleans, integers?) or whether results are cryptographically random. 'Flip' implies read-only but this isn't explicit.

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?

Appropriately compact with clear Args/Returns structure. Main action stated immediately. No redundant text.

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

Completeness3/5

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

Adequate for a single-parameter tool, but lacks specificity on return value format since no output schema exists. The constraint 1-100 is documented but no rationale for upper limit provided.

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?

With 0% schema description coverage, the Args section effectively compensates by explaining 'times' represents number of flips and adds the 1-100 constraint not present in the schema. Could note that parameter is optional (has default).

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?

States specific action (flip) and resource (coin) clearly. Distinguishes from dice-rolling siblings by naming convention, though doesn't explicitly clarify when to choose coin vs dice vs pick_random.

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

Usage Guidelines2/5

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

No guidance on when to select this tool versus siblings like pick_random or roll_dice. No mention of prerequisites or constraints beyond the parameter range.

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