MCP-Contracts Tools
Alle 9 verfügbaren MCP-Tools für Contract-Management.
Übersicht
| Tool | Beschreibung |
|---|---|
contracts_list | Contracts auflisten mit Filtern |
contracts_get | Contract nach ID oder Name abrufen |
contracts_create | Neuen Contract erstellen |
contracts_update | Contract aktualisieren (neue Version) |
contracts_deprecate | Contract als deprecated markieren |
contracts_validate | Validierung gegen Scope ausführen |
contracts_history | Änderungshistorie abrufen |
contracts_violations | Letzte Validierungen/Violations |
contracts_statistics | Statistiken über alle Contracts |
contracts_list
Listet Contracts mit optionalen Filtern auf.
| Parameter | Typ | Default | Beschreibung |
|---|---|---|---|
status | string | - | Filter: draft, active, deprecated |
search | string | - | Volltextsuche in Name/Scope |
compact | bool | True | True = nur id/name/version/status |
limit | int | 20 | Max. Ergebnisse (1-100) |
# Alle aktiven Contracts (kompakt)
contracts_list(status="active")
# Suche mit vollständigen Daten
contracts_list(search="architecture", compact=False)
contracts_get
Holt einen Contract nach ID oder Name.
| Parameter | Typ | Default | Beschreibung |
|---|---|---|---|
id | int | - | Contract-ID |
name | string | - | Contract-Name (alternativ zu ID) |
version | string | - | Spezifische Version (optional) |
include_history | bool | False | Änderungshistorie einschließen |
include_validations | bool | False | Letzte Validierungen einschließen |
# Nach ID
contracts_get(id=1)
# Nach Name mit Historie
contracts_get(name="CSS Contract", include_history=True)
contracts_create
Erstellt einen neuen Contract.
| Parameter | Typ | Default | Beschreibung |
|---|---|---|---|
name | string | required | Eindeutiger Contract-Name |
yaml_content | string | required | YAML-Inhalt des Contracts |
version | string | "1.0" | Versionsnummer |
scope_description | string | - | Kurzbeschreibung des Scopes |
status | string | "active" | draft, active, deprecated |
contracts_update
Aktualisiert einen Contract (erstellt neue Version mit Historie).
| Parameter | Typ | Default | Beschreibung |
|---|---|---|---|
id | int | required | Contract-ID |
yaml_content | string | required | Neuer YAML-Inhalt |
new_version | string | required | Neue Versionsnummer |
change_description | string | required | Beschreibung der Änderung |
contracts_deprecate
Markiert einen Contract als deprecated.
| Parameter | Typ | Beschreibung |
|---|---|---|
id | int | Contract-ID |
contracts_validate
Führt eine Validierung gegen den Contract-Scope aus.
| Parameter | Typ | Default | Beschreibung |
|---|---|---|---|
id | int | - | Contract-ID |
name | string | - | Contract-Name (alternativ) |
path | string | - | Spezifischer Pfad (optional) |
triggered_by | string | "mcp" | Auslöser: mcp, sync, manual, hook |
# Validierung nach Name
contracts_validate(name="layered-architecture-pruefung_v1.0")
contracts_history
Holt die Änderungshistorie eines Contracts.
| Parameter | Typ | Beschreibung |
|---|---|---|
id | int | Contract-ID |
contracts_violations
Holt die letzten Validierungen/Violations.
| Parameter | Typ | Default | Beschreibung |
|---|---|---|---|
id | int | - | Contract-ID |
name | string | - | Contract-Name (alternativ) |
limit | int | 10 | Max. Anzahl Ergebnisse |
contracts_statistics
Holt Statistiken über alle Contracts.
contracts_statistics()