Upsert Shared Doc
upsert_shared_docCreate or update a shared Markdown document with JSON properties.
mentions (agent:<id>, human:<id>) and new @agent:<id> refs in the body
send those principals a mention.created event. derived_from
[{namespace, doc_key, version}] records what this version came from (a
tainted source taints it); content_origin other than internal taints it;
resolves_recall=<recall_id> resolves this document's node of a recall.
doc_type=log at creation makes an append-only log (append_entries). A
contended document (5+ conflicts in 10 s) answers 409 contention with a
suggestion: patch a section, or wait for Retry-After.
expected_version=0 creates; otherwise pass the current version. Human-locked
documents reject agent writes. SCOUT tokens may only create documents in
their allowed namespaces. By default the response is compact (doc_key,
version, content_hash, status); set include_content=true to return the body.
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": {
"doc_key": "<doc_key>",
"content": "<content>"
},
"name": "upsert_shared_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | No | ||
| title | No | ||
| content | Yes | ||
| doc_key | Yes | ||
| doc_type | No | ||
| mentions | No | ||
| namespace | No | ||
| frontmatter | No | ||
| derived_from | No | ||
| content_origin | No | internal | |
| idempotency_key | No | Optional. Retries with the same key and arguments within 24 h replay the first result (replayed=true) without a second write; a different body with the same key is idempotency_key_reused. | |
| include_content | No | ||
| resolves_recall | No | ||
| expected_version | No | ||
| session_batch_id | No | ||
| return_current_on_conflict | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||