{
"event": "PostToolUse",
"tool_name": "Read",
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/mcp-servers\/mcp_code\/db.py",
"content": "\"\"\"DB-Wrapper für mcp-code - nutzt Shared Infrastructure.\"\"\"\n\nfrom config import Config\nfrom shared.infrastructure import SimpleDbConnection\n\n\ndef execute_query(query: str, params: tuple = None, max_rows: int = 100) -> list:\n \"\"\"Fuehrt Query aus und gibt Ergebnisse zurueck.\"\"\"\n with SimpleDbConnection.get_connection(Config) as conn:\n with conn.cursor() as cursor:\n cursor.execute(query, params or ())\n return cursor.fetchmany(max_rows)\n\n\ndef execute_single(query: str, params: tuple = None) -> dict | None:\n \"\"\"Fuehrt Query aus und gibt einzelnes Ergebnis zurueck.\"\"\"\n rows = execute_query(query, params, max_rows=1)\n return rows[0] if rows else None\n",
"numLines": 19,
"startLine": 1,
"totalLines": 19
}
}
}