add_death
Schedule a character's canonical death at a specified chapter with given circumstances and optional death style. Ensures story continuity by formalizing plot events in the guarded chapter pipeline.
Instructions
Schedule a canonical death.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| character | Yes | ||
| chapter | Yes | ||
| circumstances | Yes | ||
| death_style | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/storywright_mcp/workflow.py:199-205 (handler)Core handler logic that appends a DeathEntry to the project's death_schedule and saves.
def add_death(character: str, chapter: int, circumstances: str, death_style: str = "") -> str: proj, _ = require_project() proj.death_schedule.append( DeathEntry(character=character, chapter=chapter, circumstances=circumstances, death_style=death_style) ) save_project_and_continuity() return f"Death scheduled: {character} in chapter {chapter}" - DeathEntry data class schema used by add_death.
@dataclass class DeathEntry: character: str chapter: int circumstances: str death_style: str = "" - src/storywright_mcp/app.py:101-104 (registration)MCP tool registration of 'add_death' via @mcp.tool() decorator.
@mcp.tool() async def add_death(character: str, chapter: int, circumstances: str, death_style: str = "") -> str: """Schedule a canonical death.""" return workflow.add_death(character, chapter, circumstances, death_style)