reset_session
Clear the current audit session to start fresh analysis, ensuring context isolation for accurate code review.
Instructions
Reset the current audit session.
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": "reset_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/main.py:217-222 (handler)The main handler function for the 'reset_session' tool. It is decorated with @mcp.tool() for registration and executes the reset logic by calling session.reset() on the global session state, returning a success message.
@mcp.tool() def reset_session() -> str: """Reset the current audit session.""" print("DEBUG: reset_session called", file=sys.stderr) session.reset() return "✅ Session reset successfully." - src/state.py:19-24 (helper)Supporting method in SessionState class that implements the actual session reset logic by clearing code, history, retries, and setting status to IDLE. Called by the reset_session tool handler.
def reset(self): """Reset the session state.""" self.current_code = None self.retry_count = 0 self.audit_history = [] self.status = "IDLE"