create_chronulus_session
Initiates a new forecasting session by defining a use case with context (situation) and specific requirements (task), generating a unique session_id for AI-powered predictions.
Instructions
A tool that creates a new Chronulus Session and returns a session_id
When to use this tool:
Use this tool when a user has requested a forecast or prediction for a new use case
Before calling this tool make sure you have enough information to write a well-defined situation and task. You might need to ask clarifying questions in order to get this from the user.
The same session_id can be reused as long as the situation and task remain the same
If user wants to forecast a different use case, create a new session and then use that
How to use this tool:
To create a session, you need to provide a situation and task that describe the forecasting use case
If the user has not provided enough detail for you to decompose the use case into a situation (broad or background context) and task (specific requirements for the forecast), ask them to elaborate since more detail will result in a better / more accurate forecast.
Once created, this will generate a unique session_id that can be used to when calling other tools about this use case.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | A short descriptive name for the use case defined in the session. | |
| situation | Yes | The broader context for the use case | |
| task | Yes | Specific details on the forecasting or prediction task. |
Implementation Reference
- src/chronulus_mcp/session.py:8-42 (handler)The handler function that creates a new Chronulus Session using the provided name, situation, and task, handles errors, and returns the session ID.async def create_chronulus_session( name: Annotated[str, Field(description="A short descriptive name for the use case defined in the session.")], situation: Annotated[str, Field(description="The broader context for the use case")], task: Annotated[str, Field(description="Specific details on the forecasting or prediction task.")], ctx: Context ) -> str: """Creates a new Chronulus Session A Chronulus Session allows you to use Chronulus Agents. To create a session, you need to provide a situation and task. Once created, this will generate a unique session id that can be used to when calling the agents. Args: name (str): A short descriptive name for the use case defined in the session. situation (str): The broader context for the use case. task (str): The specific prediction task. Returns: str: The session ID. """ try: chronulus_session = Session( name=name, situation=situation, task=task, verbose=False, ) except Exception as e: error_message = f"Failed to create chronulus session with the following error: \n\n{e}" _ = await ctx.error(message=error_message) return error_message return chronulus_session.session_id
- src/chronulus_mcp/__init__.py:35-51 (schema)Defines the detailed description string for the create_chronulus_session tool, explaining usage, inputs, and when to use it.CREATE_SESSION_DESCRIPTION = """ A tool that creates a new Chronulus Session and returns a session_id When to use this tool: - Use this tool when a user has requested a forecast or prediction for a new use case - Before calling this tool make sure you have enough information to write a well-defined situation and task. You might need to ask clarifying questions in order to get this from the user. - The same session_id can be reused as long as the situation and task remain the same - If user wants to forecast a different use case, create a new session and then use that How to use this tool: - To create a session, you need to provide a situation and task that describe the forecasting use case - If the user has not provided enough detail for you to decompose the use case into a situation (broad or background context) and task (specific requirements for the forecast), ask them to elaborate since more detail will result in a better / more accurate forecast. - Once created, this will generate a unique session_id that can be used to when calling other tools about this use case. """
- src/chronulus_mcp/__init__.py:54-54 (registration)Registers the create_chronulus_session handler as a tool in the FastMCP server instance.mcp.add_tool(create_chronulus_session, description=CREATE_SESSION_DESCRIPTION)