context_update
Update a saved project context record's text, kind, tags, delivery, or expiry with revision-safe compare-and-swap; only passed fields change and conflicts prompt a re-read.
Instructions
Change a saved context record of the current project: its text, kind, tags, delivery or expiry. Only the fields you pass change; an empty string clears review_after, expires_at or superseded_by. Get context_id and the current revision from context_list; the update fails with revision_conflict if the record changed since, so read it again and retry. To retire a record in favour of a newer one, set superseded_by to the replacement's id.
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": {
"context_id": "<context_id>",
"expected_revision": "<expected_revision>"
},
"name": "context_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Optional replacement body. | |
| kind | No | Optional replacement kind: note, decision, instruction, or constraint. | |
| tags | No | Optional replacement tags. | |
| scope | No | Optional replacement instruction scope. | |
| title | No | Optional replacement title; must not be blank when provided. | |
| source | No | Optional replacement source: user, agent, or import. | |
| delivery | No | Optional replacement delivery mode: always, ranked, or manual. | |
| priority | No | Optional replacement instruction priority. | |
| context_id | Yes | Canonical UUIDv7 context record identifier. | |
| expires_at | No | Optional replacement RFC3339 expiry timestamp; empty clears it. | |
| visibility | No | Optional replacement visibility: shared or local_only. | |
| sensitivity | No | Optional replacement sensitivity: normal or private. | |
| review_after | No | Optional replacement RFC3339 review timestamp; empty clears it. | |
| superseded_by | No | Optional replacement UUIDv7; empty clears it. | |
| expected_revision | Yes | Positive current context revision required for compare-and-swap. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| context | No | ||
| schema_version | Yes |