{
"event": "PreToolUse",
"tool_name": "mcp__mcp-db__db_select",
"tool_input": {
"query": "SELECT ca.scan_id, \n COUNT(*) as files,\n SUM(cq.issues_count) as issues,\n ROUND(AVG(cq.hygiene_score), 1) as avg_score,\n MAX(ca.scanned_at) as last_scan\nFROM code_analysis ca\nJOIN code_quality cq ON cq.analysis_id = ca.id\nGROUP BY ca.scan_id\nORDER BY last_scan DESC\nLIMIT 3",
"database": "ki_dev"
}
}
{
"tool_response": [
{
"type": "text",
"text": "{\n \"status\": \"success\",\n \"data\": [\n {\n \"scan_id\": \"54554f07-eb88-4989-8a2c-7c1b55e10506\",\n \"files\": 550,\n \"issues\": \"253\",\n \"avg_score\": \"94.8\",\n \"last_scan\": \"2025-12-27T15:40:32\"\n }\n ],\n \"row_count\": 1,\n \"error\": null,\n \"execution_ms\": 1\n}"
}
]
}