start_story
Programmatically initiate personalized reincarnation storytelling by providing a user ID to generate dynamic narrative paths based on character choices.
Instructions
Alternative way to start the story programmatically
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"user_id": "<user_id>"
},
"name": "start_story"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- main.py:202-216 (handler)The main handler function for the 'start_story' tool. It initializes the user's story state upon invocation and returns the initial reincarnation prompt.
@mcp.tool() def start_story(user_id: str) -> str: """Alternative way to start the story programmatically""" state = get_user_state(user_id) state.update({ "current_path": None, "story_step": 0, "choices_made": [], "user_answers": {}, "last_narrative": "", "current_context": "Beginning: User has died and is offered reincarnation", "story_started": True }) return str(arise_trigger_response()) + "\n\n" + str(initial_reincarnation_offer()) - main.py:202-202 (registration)The @mcp.tool() decorator registers the start_story function as an MCP tool.
@mcp.tool()