Skip to main content
Glama
study-flamingo

D&D MCP Server

start_combat

Initiate a D&D combat encounter by specifying participants with initiative order to manage turn-based battles in your campaign.

Instructions

Start a combat encounter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
participantsYesCombat participants with initiative order

Implementation Reference

  • The main handler function for the 'start_combat' tool. It takes a list of participant dictionaries, sorts them by initiative, updates the game state to enter combat mode with the initiative order and sets the first turn, then returns a formatted string with the initiative order and current turn.
    def start_combat(
        participants: Annotated[list[dict], Field(description="Combat participants with initiative order")]
    ) -> str:
        """Start a combat encounter."""
        # Sort by initiative (highest first)
        initiative_order = sorted(participants, key=lambda x: x.get("initiative", 0), reverse=True)
    
        storage.update_game_state(
            in_combat=True,
            initiative_order=initiative_order,
            current_turn=initiative_order[0]["name"] if initiative_order else None
        )
    
        order_text = "\n".join([
            f"{i+1}. {p['name']} (Initiative: {p.get('initiative', 0)})"
            for i, p in enumerate(initiative_order)
        ])
    
        return f"**Combat Started!**\n\n**Initiative Order:**\n{order_text}\n\n**Current Turn:** {initiative_order[0]['name'] if initiative_order else 'None'}"
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Start') but doesn't explain what starting a combat entails—such as whether it initializes a state, requires specific permissions, affects other game elements, or has side effects. This leaves critical behavioral traits unspecified for a mutation tool.

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?

The description is a single, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core action without unnecessary elaboration, earning a top score for brevity and clarity in structure.

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

Completeness2/5

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

Given the complexity of starting a combat encounter (a mutation with potential game state impacts), no annotations, and no output schema, the description is incomplete. It fails to address what the tool returns, how it interacts with other tools like 'end_combat', or any behavioral nuances, leaving significant gaps for the agent to operate effectively.

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?

The schema description coverage is 100%, with the parameter 'participants' documented as 'Combat participants with initiative order'. The description adds no additional meaning beyond this, so it meets the baseline of 3 where the schema handles parameter documentation adequately without extra value from the description.

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

Purpose3/5

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

The description 'Start a combat encounter' clearly states the verb ('Start') and resource ('a combat encounter'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'end_combat' or 'next_turn' beyond the obvious directional difference, leaving room for ambiguity about what specifically distinguishes this tool from related combat operations.

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 is provided on when to use this tool versus alternatives. The description lacks context about prerequisites (e.g., whether a combat must not already be active), exclusions, or relationships with siblings like 'end_combat' or 'next_turn', leaving the agent to infer usage based on tool names alone.

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/study-flamingo/gamemaster-mcp'

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