end_combat
End the current combat encounter in a Dungeons & Dragons campaign to advance the narrative and manage game sessions.
Instructions
End the current combat encounter.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "end_combat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/gamemaster_mcp/main.py:636-644 (handler)The `end_combat` tool handler, decorated with `@mcp.tool` for registration. It ends combat by updating the game state to set `in_combat=False`, clearing `initiative_order` and `current_turn`, and returns a confirmation message.
@mcp.tool def end_combat() -> str: """End the current combat encounter.""" storage.update_game_state( in_combat=False, initiative_order=[], current_turn=None ) return "Combat ended."