{
"event": "PreToolUse",
"tool_name": "mcp__mcp-docs__docs_update",
"tool_input": {
"id": 30,
"content": "<nav class=\"breadcrumb\">\n <a href=\"\/docs\">Dokumentation<\/a> » <a href=\"\/docs\/ki-tasks\">KI-Tasks<\/a> » API-Referenz\n<\/nav>\n\n<h1>API-Referenz<\/h1>\n<p class=\"doc-meta\"><strong>Erstellt:<\/strong> 2025-12-20 | <strong>Aktualisiert:<\/strong> 2025-12-31<\/p>\n\n<p>REST-API für das KI-Task-Management System.<\/p>\n\n<div class=\"info-box\">\n<strong>Hinweis:<\/strong> Diese API ist die <strong>PHP Web-API<\/strong>, implementiert in <code>Controller\\Api\\TaskController<\/code>. \nSie ist unabhängig vom MCP-Tasks Server (Python), der via Claude Code MCP-Protokoll angesprochen wird.\n<\/div>\n\n<table>\n <tr><th>Implementierung<\/th><td>Controller\\Api\\TaskController<\/td><\/tr>\n <tr><th>Base-URL<\/th><td>https:\/\/dev.campus.systemische-tools.de\/api\/v1\/tasks<\/td><\/tr>\n <tr><th>Format<\/th><td>JSON<\/td><\/tr>\n <tr><th>Authentifizierung<\/th><td>Keine (lokales Netzwerk)<\/td><\/tr>\n<\/table>\n\n<h2>Endpoints<\/h2>\n\n<h3>Tasks<\/h3>\n<table>\n <tr><th>Methode<\/th><th>Endpoint<\/th><th>Beschreibung<\/th><\/tr>\n <tr><td>GET<\/td><td>\/api\/v1\/tasks<\/td><td>Liste aller Tasks<\/td><\/tr>\n <tr><td>GET<\/td><td>\/api\/v1\/tasks\/{id}<\/td><td>Task-Details<\/td><\/tr>\n <tr><td>POST<\/td><td>\/api\/v1\/tasks<\/td><td>Task erstellen<\/td><\/tr>\n <tr><td>PUT<\/td><td>\/api\/v1\/tasks\/{id}<\/td><td>Task aktualisieren<\/td><\/tr>\n <tr><td>DELETE<\/td><td>\/api\/v1\/tasks\/{id}<\/td><td>Task löschen<\/td><\/tr>\n <tr><td>GET<\/td><td>\/api\/v1\/tasks\/statistics<\/td><td>Statistiken<\/td><\/tr>\n<\/table>\n\n<h3>Zuweisungen & Ergebnisse<\/h3>\n<table>\n <tr><th>Methode<\/th><th>Endpoint<\/th><th>Beschreibung<\/th><\/tr>\n <tr><td>POST<\/td><td>\/api\/v1\/tasks\/{id}\/assign<\/td><td>Task zuweisen<\/td><\/tr>\n <tr><td>PUT<\/td><td>\/api\/v1\/tasks\/{id}\/status<\/td><td>Status ändern<\/td><\/tr>\n <tr><td>GET<\/td><td>\/api\/v1\/tasks\/{id}\/results<\/td><td>Ergebnisse abrufen<\/td><\/tr>\n <tr><td>POST<\/td><td>\/api\/v1\/tasks\/{id}\/results<\/td><td>Ergebnis speichern<\/td><\/tr>\n <tr><td>POST<\/td><td>\/api\/v1\/tasks\/{id}\/execute<\/td><td>KI-Ausführung<\/td><\/tr>\n<\/table>\n\n<h2>GET \/api\/v1\/tasks<\/h2>\n<p>Listet alle Tasks mit optionalen Filtern.<\/p>\n\n<h4>Query-Parameter<\/h4>\n<table>\n <tr><th>Parameter<\/th><th>Typ<\/th><th>Beschreibung<\/th><\/tr>\n <tr><td>status<\/td><td>string<\/td><td>pending, in_progress, completed, failed, cancelled<\/td><\/tr>\n <tr><td>type<\/td><td>string<\/td><td>human_task, ai_task, mixed<\/td><\/tr>\n <tr><td>search<\/td><td>string<\/td><td>Suche in Titel\/Beschreibung<\/td><\/tr>\n <tr><td>limit<\/td><td>int<\/td><td>Max. Anzahl (default: 50)<\/td><\/tr>\n <tr><td>offset<\/td><td>int<\/td><td>Offset für Paginierung<\/td><\/tr>\n<\/table>\n\n<h4>Beispiel<\/h4>\n<pre><code>curl \"https:\/\/dev.campus.systemische-tools.de\/api\/v1\/tasks?status=pending&limit=10\"<\/code><\/pre>\n\n<h4>Response<\/h4>\n<pre><code>{\n \"success\": true,\n \"data\": [\n {\n \"id\": 1,\n \"uuid\": \"abc-123-...\",\n \"title\": \"Analyse durchführen\",\n \"type\": \"ai_task\",\n \"status\": \"pending\",\n \"created_by\": \"root\",\n \"created_at\": \"2025-12-20 10:00:00\"\n }\n ],\n \"meta\": {\n \"total\": 42,\n \"limit\": 10,\n \"offset\": 0\n }\n}<\/code><\/pre>\n\n<h2>POST \/api\/v1\/tasks<\/h2>\n<p>Erstellt einen neuen Task.<\/p>\n\n<h4>Request-Body<\/h4>\n<pre><code>{\n \"title\": \"Analyse durchführen\", \/\/ required\n \"description\": \"Details...\", \/\/ optional\n \"type\": \"ai_task\", \/\/ optional: human_task, ai_task, mixed\n \"created_by\": \"user\", \/\/ optional\n \"created_by_type\": \"human\", \/\/ optional: human, ai\n \"due_date\": \"2025-12-31 23:59:59\", \/\/ optional\n \"parent_task_id\": 1, \/\/ optional\n \"metadata\": {\"key\": \"value\"} \/\/ optional\n}<\/code><\/pre>\n\n<h4>Beispiel<\/h4>\n<pre><code>curl -X POST https:\/\/dev.campus.systemische-tools.de\/api\/v1\/tasks \\\n -H \"Content-Type: application\/json\" \\\n -d '{\n \"title\": \"Daten analysieren\",\n \"type\": \"ai_task\"\n }'<\/code><\/pre>\n\n<h4>Response (201 Created)<\/h4>\n<pre><code>{\n \"success\": true,\n \"data\": {\n \"id\": 2,\n \"uuid\": \"def-456-...\",\n \"title\": \"Daten analysieren\",\n \"status\": \"pending\",\n ...\n }\n}<\/code><\/pre>\n\n<h2>GET \/api\/v1\/tasks\/{id}<\/h2>\n<p>Gibt Task-Details inkl. Zuweisungen, Ergebnisse und Subtasks zurück.<\/p>\n\n<h4>Response<\/h4>\n<pre><code>{\n \"success\": true,\n \"data\": {\n \"task\": { ... },\n \"assignments\": [ ... ],\n \"results\": [ ... ],\n \"subtasks\": [ ... ]\n }\n}<\/code><\/pre>\n\n<h2>POST \/api\/v1\/tasks\/{id}\/assign<\/h2>\n<p>Weist einen Task einem Bearbeiter zu.<\/p>\n\n<h4>Request-Body<\/h4>\n<pre><code>{\n \"assignee\": \"ollama\", \/\/ required\n \"assignee_type\": \"ollama\", \/\/ required: human, ollama, claude, anthropic_api\n \"model_name\": \"mistral\", \/\/ optional\n \"assigned_by\": \"user\", \/\/ optional\n \"notes\": \"Bitte priorisieren\" \/\/ optional\n}<\/code><\/pre>\n\n<h2>PUT \/api\/v1\/tasks\/{id}\/status<\/h2>\n<p>Ändert den Task-Status.<\/p>\n\n<h4>Request-Body<\/h4>\n<pre><code>{\n \"status\": \"in_progress\", \/\/ required\n \"updated_by\": \"user\", \/\/ optional\n \"updated_by_type\": \"human\" \/\/ optional\n}<\/code><\/pre>\n\n<h4>Erlaubte Übergänge<\/h4>\n<table>\n <tr><th>Von<\/th><th>Nach<\/th><\/tr>\n <tr><td>pending<\/td><td>in_progress, cancelled<\/td><\/tr>\n <tr><td>in_progress<\/td><td>completed, failed, cancelled<\/td><\/tr>\n <tr><td>completed\/failed\/cancelled<\/td><td>(keine)<\/td><\/tr>\n<\/table>\n\n<h2>POST \/api\/v1\/tasks\/{id}\/execute<\/h2>\n<p>Führt einen Task mit KI aus.<\/p>\n\n<h4>Request-Body<\/h4>\n<pre><code>{\n \"executor_type\": \"ollama\", \/\/ optional: ollama, anthropic_api\n \"model\": \"mistral\", \/\/ optional\n \"auto_complete\": true, \/\/ optional: Task nach Erfolg abschließen\n \"additional_context\": \"...\" \/\/ optional: Zusätzlicher Kontext\n}<\/code><\/pre>\n\n<h4>Response<\/h4>\n<pre><code>{\n \"success\": true,\n \"data\": {\n \"id\": 1,\n \"task_id\": 2,\n \"executor\": \"ollama\",\n \"model_name\": \"mistral\",\n \"response\": \"Die Analyse ergab...\",\n \"tokens_input\": 150,\n \"tokens_output\": 420,\n \"tokens_total\": 570,\n \"duration_ms\": 12500,\n \"status\": \"success\"\n }\n}<\/code><\/pre>\n\n<h2>Error-Responses<\/h2>\n<pre><code>\/\/ 400 Bad Request\n{\n \"success\": false,\n \"error\": \"Title is required\"\n}\n\n\/\/ 404 Not Found\n{\n \"success\": false,\n \"error\": \"Task not found\"\n}\n\n\/\/ 500 Internal Server Error\n{\n \"success\": false,\n \"error\": \"Database connection failed\"\n}<\/code><\/pre>\n\n<h2>Vergleich: PHP API vs MCP-Tasks<\/h2>\n<table>\n <tr><th>Aspekt<\/th><th>PHP Web-API<\/th><th>MCP-Tasks Server<\/th><\/tr>\n <tr><td>Zugriff<\/td><td>HTTP REST (curl, Browser)<\/td><td>Claude Code MCP-Protokoll<\/td><\/tr>\n <tr><td>Implementierung<\/td><td>PHP Controller<\/td><td>Python MCP Server<\/td><\/tr>\n <tr><td>Pfad<\/td><td>\/api\/v1\/tasks<\/td><td>tasks_list(), tasks_create()<\/td><\/tr>\n <tr><td>Verwendung<\/td><td>Web-Anwendungen, Scripts<\/td><td>Claude Code Sessions<\/td><\/tr>\n<\/table>\n\n<h2>Änderungshistorie<\/h2>\n<table>\n <tr><th>Datum<\/th><th>Änderung<\/th><\/tr>\n <tr><td>2025-12-31<\/td><td>Klarstellung: PHP Web-API vs MCP-Tasks Server, Host in Beispielen korrigiert<\/td><\/tr>\n <tr><td>2025-12-20<\/td><td>Initial erstellt<\/td><\/tr>\n<\/table>"
}
}
{
"tool_response": [
{
"type": "text",
"text": "{\n \"success\": true,\n \"doc\": {\n \"id\": 30,\n \"parent_id\": 29,\n \"slug\": \"ki-tasks-api\",\n \"path\": \"\/ki-tasks\/ki-tasks-api\",\n \"title\": \"API\",\n \"description\": \"REST-API für das KI-Task-Management System.\",\n \"content\": \"<nav class=\\\"breadcrumb\\\">\\n <a href=\\\"\/docs\\\">Dokumentation<\/a> » <a href=\\\"\/docs\/ki-tasks\\\">KI-Tasks<\/a> » API-Referenz\\n<\/nav>\\n\\n<h1>API-Referenz<\/h1>\\n<p class=\\\"doc-meta\\\"><strong>Erstellt:<\/strong> 2025-12-20 | <strong>Aktualisiert:<\/strong> 2025-12-31<\/p>\\n\\n<p>REST-API für das KI-Task-Management System.<\/p>\\n\\n<div class=\\\"info-box\\\">\\n<strong>Hinweis:<\/strong> Diese API ist die <strong>PHP Web-API<\/strong>, implementiert in <code>Controller\\\\Api\\\\TaskController<\/code>. \\nSie ist unabhängig vom MCP-Tasks Server (Python), der via Claude Code MCP-Protokoll angesprochen wird.\\n<\/div>\\n\\n<table>\\n <tr><th>Implementierung<\/th><td>Controller\\\\Api\\\\TaskController<\/td><\/tr>\\n <tr><th>Base-URL<\/th><td>https:\/\/dev.campus.systemische-tools.de\/api\/v1\/tasks<\/td><\/tr>\\n <tr><th>Format<\/th><td>JSON<\/td><\/tr>\\n <tr><th>Authentifizierung<\/th><td>Keine (lokales Netzwerk)<\/td><\/tr>\\n<\/table>\\n\\n<h2>Endpoints<\/h2>\\n\\n<h3>Tasks<\/h3>\\n<table>\\n <tr><th>Methode<\/th><th>Endpoint<\/th><th>Beschreibung<\/th><\/tr>\\n <tr><td>GET<\/td><td>\/api\/v1\/tasks<\/td><td>Liste aller Tasks<\/td><\/tr>\\n <tr><td>GET<\/td><td>\/api\/v1\/tasks\/{id}<\/td><td>Task-Details<\/td><\/tr>\\n <tr><td>POST<\/td><td>\/api\/v1\/tasks<\/td><td>Task erstellen<\/td><\/tr>\\n <tr><td>PUT<\/td><td>\/api\/v1\/tasks\/{id}<\/td><td>Task aktualisieren<\/td><\/tr>\\n <tr><td>DELETE<\/td><td>\/api\/v1\/tasks\/{id}<\/td><td>Task löschen<\/td><\/tr>\\n <tr><td>GET<\/td><td>\/api\/v1\/tasks\/statistics<\/td><td>Statistiken<\/td><\/tr>\\n<\/table>\\n\\n<h3>Zuweisungen & Ergebnisse<\/h3>\\n<table>\\n <tr><th>Methode<\/th><th>Endpoint<\/th><th>Beschreibung<\/th><\/tr>\\n <tr><td>POST<\/td><td>\/api\/v1\/tasks\/{id}\/assign<\/td><td>Task zuweisen<\/td><\/tr>\\n <tr><td>PUT<\/td><td>\/api\/v1\/tasks\/{id}\/status<\/td><td>Status ändern<\/td><\/tr>\\n <tr><td>GET<\/td><td>\/api\/v1\/tasks\/{id}\/results<\/td><td>Ergebnisse abrufen<\/td><\/tr>\\n <tr><td>POST<\/td><td>\/api\/v1\/tasks\/{id}\/results<\/td><td>Ergebnis speichern<\/td><\/tr>\\n <tr><td>POST<\/td><td>\/api\/v1\/tasks\/{id}\/execute<\/td><td>KI-Ausführung<\/td><\/tr>\\n<\/table>\\n\\n<h2>GET \/api\/v1\/tasks<\/h2>\\n<p>Listet alle Tasks mit optionalen Filtern.<\/p>\\n\\n<h4>Query-Parameter<\/h4>\\n<table>\\n <tr><th>Parameter<\/th><th>Typ<\/th><th>Beschreibung<\/th><\/tr>\\n <tr><td>status<\/td><td>string<\/td><td>pending, in_progress, completed, failed, cancelled<\/td><\/tr>\\n <tr><td>type<\/td><td>string<\/td><td>human_task, ai_task, mixed<\/td><\/tr>\\n <tr><td>search<\/td><td>string<\/td><td>Suche in Titel\/Beschreibung<\/td><\/tr>\\n <tr><td>limit<\/td><td>int<\/td><td>Max. Anzahl (default: 50)<\/td><\/tr>\\n <tr><td>offset<\/td><td>int<\/td><td>Offset für Paginierung<\/td><\/tr>\\n<\/table>\\n\\n<h4>Beispiel<\/h4>\\n<pre><code>curl \\\"https:\/\/dev.campus.systemische-tools.de\/api\/v1\/tasks?status=pending&limit=10\\\"<\/code><\/pre>\\n\\n<h4>Response<\/h4>\\n<pre><code>{\\n \\\"success\\\": true,\\n \\\"data\\\": [\\n {\\n \\\"id\\\": 1,\\n \\\"uuid\\\": \\\"abc-123-...\\\",\\n \\\"title\\\": \\\"Analyse durchführen\\\",\\n \\\"type\\\": \\\"ai_task\\\",\\n \\\"status\\\": \\\"pending\\\",\\n \\\"created_by\\\": \\\"root\\\",\\n \\\"created_at\\\": \\\"2025-12-20 10:00:00\\\"\\n }\\n ],\\n \\\"meta\\\": {\\n \\\"total\\\": 42,\\n \\\"limit\\\": 10,\\n \\\"offset\\\": 0\\n }\\n}<\/code><\/pre>\\n\\n<h2>POST \/api\/v1\/tasks<\/h2>\\n<p>Erstellt einen neuen Task.<\/p>\\n\\n<h4>Request-Body<\/h4>\\n<pre><code>{\\n \\\"title\\\": \\\"Analyse durchführen\\\", \/\/ required\\n \\\"description\\\": \\\"Details...\\\", \/\/ optional\\n \\\"type\\\": \\\"ai_task\\\", \/\/ optional: human_task, ai_task, mixed\\n \\\"created_by\\\": \\\"user\\\", \/\/ optional\\n \\\"created_by_type\\\": \\\"human\\\", \/\/ optional: human, ai\\n \\\"due_date\\\": \\\"2025-12-31 23:59:59\\\", \/\/ optional\\n \\\"parent_task_id\\\": 1, \/\/ optional\\n \\\"metadata\\\": {\\\"key\\\": \\\"value\\\"} \/\/ optional\\n}<\/code><\/pre>\\n\\n<h4>Beispiel<\/h4>\\n<pre><code>curl -X POST https:\/\/dev.campus.systemische-tools.de\/api\/v1\/tasks \\\\\\n -H \\\"Content-Type: application\/json\\\" \\\\\\n -d '{\\n \\\"title\\\": \\\"Daten analysieren\\\",\\n \\\"type\\\": \\\"ai_task\\\"\\n }'<\/code><\/pre>\\n\\n<h4>Response (201 Created)<\/h4>\\n<pre><code>{\\n \\\"success\\\": true,\\n \\\"data\\\": {\\n \\\"id\\\": 2,\\n \\\"uuid\\\": \\\"def-456-...\\\",\\n \\\"title\\\": \\\"Daten analysieren\\\",\\n \\\"status\\\": \\\"pending\\\",\\n ...\\n }\\n}<\/code><\/pre>\\n\\n<h2>GET \/api\/v1\/tasks\/{id}<\/h2>\\n<p>Gibt Task-Details inkl. Zuweisungen, Ergebnisse und Subtasks zurück.<\/p>\\n\\n<h4>Response<\/h4>\\n<pre><code>{\\n \\\"success\\\": true,\\n \\\"data\\\": {\\n \\\"task\\\": { ... },\\n \\\"assignments\\\": [ ... ],\\n \\\"results\\\": [ ... ],\\n \\\"subtasks\\\": [ ... ]\\n }\\n}<\/code><\/pre>\\n\\n<h2>POST \/api\/v1\/tasks\/{id}\/assign<\/h2>\\n<p>Weist einen Task einem Bearbeiter zu.<\/p>\\n\\n<h4>Request-Body<\/h4>\\n<pre><code>{\\n \\\"assignee\\\": \\\"ollama\\\", \/\/ required\\n \\\"assignee_type\\\": \\\"ollama\\\", \/\/ required: human, ollama, claude, anthropic_api\\n \\\"model_name\\\": \\\"mistral\\\", \/\/ optional\\n \\\"assigned_by\\\": \\\"user\\\", \/\/ optional\\n \\\"notes\\\": \\\"Bitte priorisieren\\\" \/\/ optional\\n}<\/code><\/pre>\\n\\n<h2>PUT \/api\/v1\/tasks\/{id}\/status<\/h2>\\n<p>Ändert den Task-Status.<\/p>\\n\\n<h4>Request-Body<\/h4>\\n<pre><code>{\\n \\\"status\\\": \\\"in_progress\\\", \/\/ required\\n \\\"updated_by\\\": \\\"user\\\", \/\/ optional\\n \\\"updated_by_type\\\": \\\"human\\\" \/\/ optional\\n}<\/code><\/pre>\\n\\n<h4>Erlaubte Übergänge<\/h4>\\n<table>\\n <tr><th>Von<\/th><th>Nach<\/th><\/tr>\\n <tr><td>pending<\/td><td>in_progress, cancelled<\/td><\/tr>\\n <tr><td>in_progress<\/td><td>completed, failed, cancelled<\/td><\/tr>\\n <tr><td>completed\/failed\/cancelled<\/td><td>(keine)<\/td><\/tr>\\n<\/table>\\n\\n<h2>POST \/api\/v1\/tasks\/{id}\/execute<\/h2>\\n<p>Führt einen Task mit KI aus.<\/p>\\n\\n<h4>Request-Body<\/h4>\\n<pre><code>{\\n \\\"executor_type\\\": \\\"ollama\\\", \/\/ optional: ollama, anthropic_api\\n \\\"model\\\": \\\"mistral\\\", \/\/ optional\\n \\\"auto_complete\\\": true, \/\/ optional: Task nach Erfolg abschließen\\n \\\"additional_context\\\": \\\"...\\\" \/\/ optional: Zusätzlicher Kontext\\n}<\/code><\/pre>\\n\\n<h4>Response<\/h4>\\n<pre><code>{\\n \\\"success\\\": true,\\n \\\"data\\\": {\\n \\\"id\\\": 1,\\n \\\"task_id\\\": 2,\\n \\\"executor\\\": \\\"ollama\\\",\\n \\\"model_name\\\": \\\"mistral\\\",\\n \\\"response\\\": \\\"Die Analyse ergab...\\\",\\n \\\"tokens_input\\\": 150,\\n \\\"tokens_output\\\": 420,\\n \\\"tokens_total\\\": 570,\\n \\\"duration_ms\\\": 12500,\\n \\\"status\\\": \\\"success\\\"\\n }\\n}<\/code><\/pre>\\n\\n<h2>Error-Responses<\/h2>\\n<pre><code>\/\/ 400 Bad Request\\n{\\n \\\"success\\\": false,\\n \\\"error\\\": \\\"Title is required\\\"\\n}\\n\\n\/\/ 404 Not Found\\n{\\n \\\"success\\\": false,\\n \\\"error\\\": \\\"Task not found\\\"\\n}\\n\\n\/\/ 500 Internal Server Error\\n{\\n \\\"success\\\": false,\\n \\\"error\\\": \\\"Database connection failed\\\"\\n}<\/code><\/pre>\\n\\n<h2>Vergleich: PHP API vs MCP-Tasks<\/h2>\\n<table>\\n <tr><th>Aspekt<\/th><th>PHP Web-API<\/th><th>MCP-Tasks Server<\/th><\/tr>\\n <tr><td>Zugriff<\/td><td>HTTP REST (curl, Browser)<\/td><td>Claude Code MCP-Protokoll<\/td><\/tr>\\n <tr><td>Implementierung<\/td><td>PHP Controller<\/td><td>Python MCP Server<\/td><\/tr>\\n <tr><td>Pfad<\/td><td>\/api\/v1\/tasks<\/td><td>tasks_list(), tasks_create()<\/td><\/tr>\\n <tr><td>Verwendung<\/td><td>Web-Anwendungen, Scripts<\/td><td>Claude Code Sessions<\/td><\/tr>\\n<\/table>\\n\\n<h2>Änderungshistorie<\/h2>\\n<table>\\n <tr><th>Datum<\/th><th>Änderung<\/th><\/tr>\\n <tr><td>2025-12-31<\/td><td>Klarstellung: PHP Web-API vs MCP-Tasks Server, Host in Beispielen korrigiert<\/td><\/tr>\\n <tr><td>2025-12-20<\/td><td>Initial erstellt<\/td><\/tr>\\n<\/table>\",\n \"status\": \"published\",\n \"sort_order\": 1,\n \"depth\": 1,\n \"created_at\": \"2025-12-20T11:13:58\",\n \"updated_at\": \"2025-12-31T10:03:00\"\n },\n \"message\": \"Document #30 updated\"\n}"
}
]
}