Skip to main content
Glama
alicenjr

Dynamic Reincarnation Story

by alicenjr

record_answers_and_choose_path

Records user responses to determine their afterlife journey, selecting personalized reincarnation paths for interactive storytelling experiences.

Instructions

Record user's answers and choose their reincarnation path

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
answersYes
path_choiceYes
user_idYes

Implementation Reference

  • main.py:228-265 (handler)
    The handler function for the 'record_answers_and_choose_path' tool. Decorated with @mcp.tool() for registration. Records the user's three answers, validates and sets the reincarnation path (revenge, bilbo, or luffy) based on path_choice (1-3), updates the user's story state, and returns a narrative confirmation message.
    @mcp.tool() def record_answers_and_choose_path(user_id: str, answers: List[str], path_choice: int) -> str: """Record user's answers and choose their reincarnation path""" state = get_user_state(user_id) if not state["story_started"]: return "Please start the story first by typing 'Arise'." if len(answers) != 3: return "Please provide exactly three answers, one for each question." # Record answers state["user_answers"] = { "betrayal_wound": answers[0], "adventure_desire": answers[1], "freedom_calling": answers[2] } # Choose path paths = {1: "revenge", 2: "bilbo", 3: "luffy"} if path_choice not in paths: return "Invalid path choice. Please choose 1, 2, or 3." state["current_path"] = paths[path_choice] state["story_step"] = 0 state["current_context"] = f"Beginning {state['current_path']} path after reincarnation" return f""" Your answers have been recorded and your path chosen. **Path Selected:** {paths[path_choice].title()} The entity now understands your soul's true desires and will transport you to your new life. "I see... your soul cries out for {['vengeance', 'adventure', 'freedom'][path_choice-1]}. Very well. Prepare yourself for rebirth into the {paths[path_choice]} path." The world dissolves around you as the reincarnation process begins... """

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/alicenjr/Dynamic-Reincarnation-mcp'

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