clear_session
Reset all tracked identifiers to start fresh with a new project or clear consistency tracking in the Pyrefly MCP server.
Instructions
Clear all tracked identifiers and start fresh.
Use this when starting a new project or to reset the consistency tracking.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp_pyrefly/server.py:671-679 (handler)The 'clear_session' tool is defined as an MCP tool and clears the session tracker.
@mcp.tool() async def clear_session(context: Context | None = None) -> dict[str, str]: """ Clear all tracked identifiers and start fresh. Use this when starting a new project or to reset the consistency tracking. """ session_tracker.clear() return {"status": "cleared", "message": "Session tracking has been reset"}