Upsert Many
upsert_manyCreate or update up to 25 documents in one call.
Each item accepts doc_key, content, title, frontmatter, expected_version,
namespace, agent and session_batch_id. atomic=true: if any item fails the
whole batch rolls back and the error names failed_indexes; atomic=false:
each item succeeds or fails on its own. The default is atomic=false under
API 2026-11 and all-or-nothing before it. results[] has one entry per item
in order (ok, version, content_hash, noop, or error) with succeeded/failed
counts. Up to 25 items and 4 MiB of content (413 batch_too_large); a
document twice in one batch is 422 duplicate_key_in_batch.
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": {
"items": "<items>"
},
"name": "upsert_many"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| atomic | No | ||
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||