kiro_history_clear
Clear conversation history for a session to manage session data and maintain privacy in the Kiro CLI MCP Server environment.
Instructions
Clear conversation history for a session
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No | Optional session ID |
Implementation Reference
- src/kiro_cli_mcp/server.py:307-321 (handler)Executes the kiro_history_clear tool by retrieving the session and calling clear_history() on it.async def _handle_history_clear( session_manager: SessionManager, arguments: dict[str, Any] ) -> dict[str, Any]: """Handle kiro_history_clear tool call.""" session_id = arguments.get("session_id") session = await session_manager.get_or_create_session(session_id) session.clear_history() return { "success": True, "session_id": session.id, }
- src/kiro_cli_mcp/tools.py:127-139 (schema)Tool schema definition including name, description, and inputSchema for kiro_history_clear.{ "name": "kiro_history_clear", "description": "Clear conversation history for a session", "inputSchema": { "type": "object", "properties": { "session_id": { "type": "string", "description": "Optional session ID" } } } },
- src/kiro_cli_mcp/server.py:112-113 (registration)Registers the tool handler by dispatching to _handle_history_clear in the main call_tool handler.elif name == "kiro_history_clear": result = await _handle_history_clear(session_manager, arguments)