Skip to main content
Glama
vandewilly

MCP Dice Roller

by vandewilly

pick_random

Select a random item from a comma-separated list of options for decision-making, game mechanics, or random selection tasks.

Instructions

Pick a random option from a comma-separated list.

Args: options: Comma-separated list of options (e.g., "pizza, burger, sushi")

Returns: The randomly selected option

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
optionsYes

Implementation Reference

  • The pick_random tool handler, which takes a comma-separated string of options and returns a random selection, with basic validation for input length.
    def pick_random(options: str) -> dict:
        """
        Pick a random option from a comma-separated list.
    
        Args:
            options: Comma-separated list of options (e.g., "pizza, burger, sushi")
    
        Returns:
            The randomly selected option
        """
        option_list = [opt.strip() for opt in options.split(",") if opt.strip()]
    
        if len(option_list) < 2:
            return {"error": "Please provide at least 2 comma-separated options"}
    
        if len(option_list) > 100:
            return {"error": "Maximum 100 options allowed"}
    
        choice = random.choice(option_list)
    
        return {
            "options": option_list,
            "selected": choice,
            "total_options": len(option_list),
        }
Behavior4/5

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

With no annotations provided, the description carries the full burden, successfully explaining the input format, providing a concrete example ('pizza, burger, sushi'), and stating the return value. It lacks disclosure of edge case behavior (empty strings, whitespace handling) but covers the core mechanic well.

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?

Uses efficient structured formatting with 'Args:' and 'Returns:' labels. Every sentence earns its place—the example is illustrative, the return description is clear, and there is no redundancy or unnecessary verbosity.

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 single-parameter tool without output schema, the description is nearly complete, covering input format and return value. Minor gap in not explicitly stating this is a non-destructive pure function, which would be helpful given the lack of annotations.

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?

The schema has 0% description coverage (only 'title' and 'type' provided), so the description fully compensates by explaining the 'options' parameter requires a comma-separated list and providing syntax example, adding essential semantic meaning beyond the 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?

The description clearly states the specific action ('Pick a random option') and the resource type ('comma-separated list'), distinguishing it from numeric siblings like roll_dice and flip_coin by specifying text-based option selection.

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?

While the 'comma-separated list' format implicitly signals this is for arbitrary text selection (vs. dice/coin tools), there is no explicit guidance comparing when to use this versus siblings like roll_dice for numeric ranges or flip_coin for binary decisions.

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