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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "clear_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output 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"}