put_document
[Documents]
Create or replace a complete document conditionally. Omitted fields use defaults. Retain requestId after an ambiguous response.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| collectionId | string | Yes | Collection ID from list_collections. |
| document | json | Yes | A nonblank body or nonempty data object is required. The complete normalized mutable document must fit 65536 JSON bytes. Omitted fields use replacement defaults. |
| ifRevision | string | Yes | Use "absent" to create, or the current revision to replace. A stale revision returns revision_conflict. |
| key | string | Yes | Stable document key, unique in its collection. |
| requestId | string | Yes | A fresh UUID for each change. After an ambiguous response, retry with the same requestId and identical arguments; a changed payload returns request_conflict. |
| spaceId | string | Yes | Workspace ID from list_spaces. |
Examples
Replace the sample IDs with values from your store. Use a fresh UUID for each requestId.
Save a decision as a new document.
Arguments
{
"spaceId": "11111111-1111-4111-8111-111111111111",
"collectionId": "33333333-3333-4333-8333-333333333333",
"key": "deploy-window",
"document": {
"title": "Deploy window",
"body": "Production deploys run Tuesday 10:00–12:00 CET.",
"tags": [
"deploy"
]
},
"ifRevision": "absent",
"requestId": "44444444-4444-4444-8444-444444444444"
}Full MCP request
Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "put_document",
"arguments": {
"spaceId": "11111111-1111-4111-8111-111111111111",
"collectionId": "33333333-3333-4333-8333-333333333333",
"key": "deploy-window",
"document": {
"title": "Deploy window",
"body": "Production deploys run Tuesday 10:00–12:00 CET.",
"tags": [
"deploy"
]
},
"ifRevision": "absent",
"requestId": "44444444-4444-4444-8444-444444444444"
}
}
}