Replace the folders an Oliver chat is scoped to.
Scopes your own folder-scoped chat to exactly the folders named, as the Portal's scope change does: the folders it had are marked superseded, the new ones added, and a continuation run retries the chat's original request with the new scope (continuation_oliver_run_id; follow it with wait_oliver_run). Each folder is checked as in create_oliver_thread (422 reference_not_found or reference_forbidden naming the ID you sent) and again by the Portal. A chat that is not scoped to a folder is 409 (documents and dataviews are not replaced here). Naming the folders it already has changes nothing. If-Match is the thread's ETag from get_oliver_thread, evaluated under the thread's lock. A progressive thread is refused (403). Needs Accept Oliver Scope Proposals, Start Oliver Runs and Execute Oliver Tools, as the Portal's scope change does; callers without View Oliver Conversations receive a write receipt.
| |
|---|
| Scope | oliver:run |
| Asynchronous | No |
| MCP tool | replace_oliver_thread_contexts |
| Portal permissions | accept_oliver_scope_proposals, start_oliver_runs, execute_oliver_tools |
Parameters
| Name | In | Type | Required | Description |
|---|
oliver_thread_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional | |
If-Match | header | string | Optional | |
Request body
Responses
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
OliverThreadContext
| Field | Type | Required | Description |
|---|
dataview_id | string or null | Required | The dataview, for type dataview. |
document_id | string or null | Required | The document, for type document. |
folder_id | string or null | Required | The folder, for type folder. |
label | string or null | Required | What the Portal shows for the context: a document's number, a folder's or dataview's name. Read-only: ignored when sent. |
type | string | Required | document, folder or dataview. A context this API does not set (a search, a clustering run, a redaction) reads as unknown. |
type_code | string or null | Required | The stored type of a context whose type is unknown. Read-only. |
OliverThreadContextInput
| Field | Type | Required | Description |
|---|
dataview_id | string or null | Optional | The dataview, for type dataview. |
document_id | string or null | Optional | The document, for type document. |
folder_id | string or null | Optional | The folder, for type folder. |
label | string or null | Optional | What the Portal shows for the context: a document's number, a folder's or dataview's name. Read-only: ignored when sent. |
type | string | Required | document, folder or dataview. A context this API does not set (a search, a clustering run, a redaction) reads as unknown. |
type_code | string or null | Optional | The stored type of a context whose type is unknown. Read-only. |
OliverThreadContextSet
| Field | Type | Required | Description |
|---|
changed | boolean | Required | False when the chat was already scoped to exactly these folders: nothing was written and no run was started. |
contexts | array of OliverThreadContext | Required | What the chat is scoped to now. |
continuation_oliver_run_id | string or null | Required | The run that retries the original request with the new scope; null when nothing changed. |
OliverThreadContextsReplaceInput
| Field | Type | Required | Description |
|---|
contexts | array of OliverThreadContextInput | Required | The folders the chat is scoped to from now on, each {type: folder, folder_id}, replacing the folders it has. At least one; each must be readable by you (422 names the ID you sent) and needs folders:read. |
source_oliver_run_id | string or null | Optional | The run whose request is retried with the new scope; omit for the thread's latest run. |