write_context
Store revisioned context bundles, documents, preferences, and one-time observations to keep scoped profile context auditable, requiring expected revisions and confirmation for sensitive defaults.
Instructions
Store a revisioned contextual bundle, document, preference or observation. Bundle meanings and defaults require exact user confirmation plus profile.write grants. Documents are untrusted supporting notes over readable ordinary profile facts; never include passwords, OTPs, mailbox content or financial values. Use observations for one-time choices. Profile intake and bundle creation can commit atomically. expected_revision=0 creates, later writes require the last revision. Restore only document revisions with unchanged evidence.
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": {
"kind": "<kind>",
"record_id": "<record_id>",
"data": "<data>",
"expected_revision": "<expected_revision>",
"target_origin": "<target_origin>",
"purpose": "<purpose>"
},
"name": "write_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | bundle: fields (semantic name to profile ID), subject, role, title, currentness (current/historical/unknown). document: bundle_refs, title, body (max 3000 characters). preference: one bundle_refs item, matching subject and role, optional valid_until (ISO date). observation: bundle_refs, outcome (used_once/accepted/corrected/rejected). Scope is exactly target_origin and purpose. No extra keys. | |
| kind | Yes | ||
| shared | No | Bundle meanings only: explicit approval to reuse this meaning across tasks. Does not grant access, change fact scopes or establish a default. Documents and preferences remain task-scoped. | |
| purpose | Yes | ||
| confirmed | No | ||
| record_id | Yes | ||
| target_origin | Yes | ||
| profile_entries | No | Exact approved ordinary profile entries: {record: write_records profile entry, expected_updated_at: null for new or exact prior timestamp}. Only with a confirmed bundle. | |
| restore_revision | No | ||
| expected_revision | Yes |