Skip to main content
Glama
study-flamingo

D&D MCP Server

next_turn

Advance combat to the next turn in Dungeons & Dragons campaigns to manage encounter flow and track initiative order.

Instructions

Advance to the next turn in combat.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'next_turn' tool. It advances the current turn in an ongoing combat by finding the next participant in the initiative order and updating the game state. The @mcp.tool decorator also handles registration.
    @mcp.tool
    def next_turn() -> str:
        """Advance to the next turn in combat."""
        game_state = storage.get_game_state()
        if not game_state or not game_state.in_combat:
            return "Not currently in combat."
    
        if not game_state.initiative_order:
            return "No initiative order set."
    
        # Find current turn index and advance
        current_index = 0
        if game_state.current_turn:
            for i, participant in enumerate(game_state.initiative_order):
                if participant["name"] == game_state.current_turn:
                    current_index = i
                    break
    
        next_index = (current_index + 1) % len(game_state.initiative_order)
        next_participant = game_state.initiative_order[next_index]
    
        storage.update_game_state(current_turn=next_participant["name"])
    
        return f"**Next Turn:** {next_participant['name']}"
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('advance to next turn') but doesn't explain what this entails - whether it changes initiative order, triggers automatic effects, updates character states, or has side effects. For a mutation tool with zero annotation coverage, this is insufficient.

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, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it immediately understandable without unnecessary elaboration.

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?

For a combat progression tool with no annotations and no output schema, the description is inadequate. It doesn't explain what 'advancing to the next turn' actually does operationally, what state changes occur, or what the agent should expect after invocation. Given the complexity of combat systems, more behavioral context is needed.

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?

The tool has zero parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't discuss parameters since none exist, maintaining focus on the tool's purpose.

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?

The description clearly states the action ('advance to') and resource ('next turn in combat'), making the purpose immediately understandable. However, it doesn't distinguish this tool from sibling combat tools like 'start_combat' or 'end_combat' in terms of when each should be used in the combat flow.

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?

The description provides no guidance on when to use this tool versus alternatives like 'end_combat' or 'update_game_state', nor does it specify prerequisites such as requiring combat to be active. It simply states what the tool does without contextual usage information.

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