Create or Update Shared API Contract
hub_create_contractCreate or revise a versioned shared contract, decision, pitfall, or guardrail with concurrency protection. Pass expected_revision to prevent overwriting concurrent edits.
Instructions
Create or revise a shared contract, decision, pitfall, or guardrail. Pass expected_revision to guard against concurrent edits.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"title": "<title>",
"content": "<content>"
},
"name": "hub_create_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Optional existing contract ID to update. | |
| kind | No | ||
| title | Yes | Contract title. | |
| status | No | ||
| content | Yes | Markdown/OpenAPI/TypeScript contract specification. | |
| file_path | No | Optional workspace file path for this contract. | |
| change_note | No | Reason for this revision. | |
| workspace_id | No | ||
| expected_revision | No |