{
"event": "PreToolUse",
"tool_name": "mcp__mcp-db__db_select",
"tool_input": {
"query": "SELECT \n CASE \n WHEN ca.file_path LIKE '%.py' THEN 'Python'\n WHEN ca.file_path LIKE '%.php' AND ca.file_path LIKE '%\/View\/%' THEN 'PHP View'\n WHEN ca.file_path LIKE '%.php' THEN 'PHP Core'\n ELSE 'Other'\n END as file_type,\n COUNT(*) as files_with_issues,\n SUM(cq.issues_count) as total_issues\nFROM code_quality cq\nJOIN code_analysis ca ON ca.id = cq.analysis_id\nWHERE cq.issues_count > 0\nGROUP BY file_type\nORDER BY total_issues DESC",
"database": "ki_dev"
}
}
{
"tool_response": [
{
"type": "text",
"text": "{\n \"status\": \"success\",\n \"data\": [\n {\n \"file_type\": \"Python\",\n \"files_with_issues\": 56,\n \"total_issues\": \"149\"\n },\n {\n \"file_type\": \"PHP Core\",\n \"files_with_issues\": 58,\n \"total_issues\": \"85\"\n },\n {\n \"file_type\": \"PHP View\",\n \"files_with_issues\": 16,\n \"total_issues\": \"36\"\n }\n ],\n \"row_count\": 3,\n \"error\": null,\n \"execution_ms\": 1\n}"
}
]
}