get_story_status
Retrieve the current status and state of your interactive reincarnation story, including narrative progress and character development based on your choices.
Instructions
Get current story status and state
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes |
Implementation Reference
- main.py:340-350 (handler)The core handler function that implements the logic for the 'get_story_status' tool. It retrieves the user's story state using get_user_state and returns it as a formatted JSON string.def get_story_status(user_id: str) -> str: """Get current story status and state""" state = get_user_state(user_id) return json.dumps({ "story_started": state["story_started"], "current_path": state["current_path"], "story_step": state["story_step"], "choices_made": state["choices_made"], "current_context": state["current_context"], "has_answers": len(state["user_answers"]) > 0 }, indent=2)
- main.py:339-339 (registration)The @mcp.tool() decorator registers the get_story_status function as an MCP tool, making it available for invocation.@mcp.tool()
- main.py:12-24 (helper)Helper function used by get_story_status to retrieve or initialize the user's persistent story state from the global story_states dictionary.def get_user_state(user_id: str) -> Dict[str, Any]: """Get or create user story state""" if user_id not in story_states: story_states[user_id] = { "current_path": None, "story_step": 0, "choices_made": [], "user_answers": {}, "last_narrative": "", "current_context": "", "story_started": False } return story_states[user_id]