MCP-Tasks Tools
Detaillierte Dokumentation aller 14 MCP-Tools.
Task-Management Tools
tasks_list
Listet Tasks mit optionalen Filtern auf. Token-optimiert durch Compact-Modus.
| Parameter | Typ | Required | Beschreibung |
|---|---|---|---|
| status | string | Nein | Filter: pending, in_progress, completed, failed, cancelled |
| type | string | Nein | Filter: human_task, ai_task, mixed |
| search | string | Nein | Volltextsuche in Titel/Beschreibung |
| limit | int | Nein | Max. Ergebnisse (1-100, default: 10) |
| offset | int | Nein | Pagination Offset |
| compact | bool | Nein | True (default): nur id/title/status/type. False: alle Felder |
Compact-Modus (default)
Reduziert Token-Verbrauch um ~90%. Nur wesentliche Felder:
# Kompakte Ausgabe (default)
tasks_list(status="pending")
# Response (~100 Tokens statt ~1000)
{
"success": true,
"tasks": [
{"id": 47, "title": "Token-Optimierung", "description": "tasks_list Response...", "type": "ai_task", "status": "pending"}
],
"total": 5,
"limit": 10,
"offset": 0,
"compact": true
}
Vollständige Ausgabe
# Alle Felder (für Details)
tasks_list(status="pending", compact=False)
# Response (alle 13 Felder pro Task)
{
"success": true,
"tasks": [
{"id": 47, "uuid": "...", "title": "...", "description": "...",
"type": "ai_task", "status": "pending", "created_by": "mcp-tasks",
"created_by_type": "ai", "parent_task_id": null, "due_date": null,
"created_at": "...", "updated_at": "...", "completed_at": null, "metadata": {}}
],
"total": 5,
"limit": 10,
"offset": 0,
"compact": false
}
tasks_get
Holt Details eines einzelnen Tasks inkl. Assignments und Results.
| Parameter | Typ | Required | Beschreibung |
|---|---|---|---|
| id | int | Ja | Task-ID |
# Beispiel
tasks_get(id=29)
# Response
{
"success": true,
"task": {...},
"assignments": [...],
"results": [...]
}
tasks_create
Erstellt einen neuen Task.
| Parameter | Typ | Required | Beschreibung |
|---|---|---|---|
| title | string | Ja | Aufgabentitel |
| description | string | Nein | Ausführliche Beschreibung |
| type | string | Nein | human_task, ai_task (default), mixed |
| parent_task_id | int | Nein | ID des Parent-Tasks |
| due_date | string | Nein | Fälligkeitsdatum (ISO 8601) |
# Beispiel
tasks_create(
title="Code Review für API",
description="Prüfe die neuen Endpunkte",
type="ai_task"
)
# Response
{
"success": true,
"task": {"id": 45, "title": "...", ...},
"message": "Task #45 created"
}
tasks_update
Aktualisiert Task-Felder.
| Parameter | Typ | Required | Beschreibung |
|---|---|---|---|
| id | int | Ja | Task-ID |
| title | string | Nein | Neuer Titel |
| description | string | Nein | Neue Beschreibung |
| type | string | Nein | Neuer Typ |
| due_date | string | Nein | Neues Datum (ISO 8601) |
tasks_status
Ändert den Status eines Tasks.
| Parameter | Typ | Required | Beschreibung |
|---|---|---|---|
| id | int | Ja | Task-ID |
| status | string | Ja | Neuer Status |
# Workflow-Beispiel
tasks_status(id=45, status="in_progress")
# ... Arbeit erledigen ...
tasks_status(id=45, status="completed")
tasks_assign
Weist einen Task einer Person oder KI zu.
| Parameter | Typ | Required | Beschreibung |
|---|---|---|---|
| id | int | Ja | Task-ID |
| assignee | string | Ja | Name der Person/KI |
| assignee_type | string | Ja | human, ollama, claude, anthropic_api |
| model_name | string | Nein | Modellname (bei KI) |
| notes | string | Nein | Anmerkungen |
# Beispiel
tasks_assign(
id=45,
assignee="mistral",
assignee_type="ollama",
model_name="mistral:latest"
)
tasks_result
Speichert ein Ergebnis für einen Task.
| Parameter | Typ | Required | Beschreibung |
|---|---|---|---|
| id | int | Ja | Task-ID |
| response | string | Ja | Antwort/Ergebnis |
| executor | string | Ja | Ausführende Instanz |
| executor_type | string | Ja | human, ollama, claude, anthropic_api |
| model_name | string | Nein | Verwendetes Modell |
| status | string | Nein | success (default), error, partial |
| tokens_input | int | Nein | Eingabe-Tokens |
| tokens_output | int | Nein | Ausgabe-Tokens |
| cost_usd | float | Nein | Kosten in USD |
| error_message | string | Nein | Bei Fehlern |
tasks_execute
Führt einen Task direkt mit lokalem Ollama aus.
| Parameter | Typ | Required | Beschreibung |
|---|---|---|---|
| id | int | Ja | Task-ID |
| model | string | Nein | Ollama-Modell (default: mistral) |
| auto_complete | bool | Nein | Task nach Erfolg abschließen |
# Beispiel
tasks_execute(id=45, model="codellama", auto_complete=True)
# Response
{
"success": true,
"result": {
"response": "...",
"tokens_input": 245,
"tokens_output": 512,
"duration_ms": 3400
},
"task_completed": true
}
tasks_delete
Löscht einen Task.
| Parameter | Typ | Required | Beschreibung |
|---|---|---|---|
| id | int | Ja | Task-ID |
tasks_statistics
Holt Statistiken über alle Tasks.
# Beispiel
tasks_statistics()
# Response
{
"success": true,
"statistics": {
"by_status": {"pending": 25, "completed": 120, ...},
"by_type": {"ai_task": 100, "human_task": 45},
"tokens": {"total_input": 50000, "total_output": 120000, "total_cost_usd": 2.50},
"model_usage": [{"model": "mistral", "count": 80, "tokens": 100000}]
}
}
Quality & Contract Tools
contracts_list
Listet alle verfügbaren Contracts auf.
# Beispiel
contracts_list()
# Response
{
"success": true,
"contracts": [
{"name": "betriebsdokumentation-pruefung_v1.1", "status": "active"},
{"name": "layered-architecture-pruefung_v1.0", "status": "active"}
]
}
contracts_validate
Führt eine Contract-Validierung aus.
| Parameter | Typ | Required | Beschreibung |
|---|---|---|---|
| contract | string | Ja | Contract-Name (betriebsdokumentation, layered_architecture) |
| path | string | Nein | Spezifischer Pfad |
# Beispiel
contracts_validate(contract="layered_architecture")
# Response
{
"success": true,
"validation": {
"contract": "layered_architecture",
"outcome": "passed", // oder: revision_required, rejected
"violations": {"critical": 0, "major": 0, "minor": 2},
"findings": [...]
}
}
quality_check
Führt PHP-Quality-Prüfungen aus.
| Parameter | Typ | Required | Beschreibung |
|---|---|---|---|
| path | string | Nein | Zu prüfender Pfad |
| checks | string | Nein | phpstan, cs-fixer, semgrep, all (default) |
| fix | bool | Nein | Automatisch korrigieren (nur cs-fixer) |
# Beispiel
quality_check(path="/var/www/dev.campus.systemische-tools.de/src", checks="phpstan")
# Response
{
"success": true,
"passed": true,
"results": {
"phpstan": {"passed": true, "issues": 0}
}
}
quality_report
Erstellt einen vollständigen Qualitätsbericht.
| Parameter | Typ | Required | Beschreibung |
|---|---|---|---|
| scope | string | Nein | full (default) oder changes_only |
| format | string | Nein | json (default) oder markdown |
# Beispiel
quality_report(format="markdown")
# Response (Markdown)
# Quality Report
Generated: 2025-12-20 10:00:00
## Overall Status: PASSED
## Quality Checks
- ✓ phpstan: 0 issues
- ✓ cs-fixer: 0 issues
- ✓ semgrep: 0 issues
## Contract Validations
- betriebsdokumentation: passed
- layered_architecture: passed
Error Responses
Alle Tools geben bei Fehlern ein einheitliches Format zurück:
{
"success": false,
"error": "Task 999 not found"
}
Logging
Jeder Tool-Aufruf wird automatisch geloggt:
| Status | Bedeutung |
|---|---|
success | Operation erfolgreich |
denied | Validierung fehlgeschlagen |
error | Technischer Fehler |
Verwandte Themen
- MCP-Tasks Übersicht
- Architektur
- Ollama - für tasks_execute