Update a Slaide document
update_documentUse this when the user wants to change an EXISTING Slaide document — update figures, rewrite a section, restyle, add or remove pages. Say precisely what should change and, if it matters, what must stay untouched; Slaide keeps a version history, so changes are reversible in the app. Read the document with get_document first and pass its version as expected_version: if someone else changed the document meanwhile you get a version_conflict instead of silently overwriting their work — re-read and decide, never just retry with a higher number. The run uses the same account limits as in Slaide. Returns a job_id immediately and works in the background; handle it like create_document (with a live progress card shown to the user, do not poll; otherwise poll get_job). Do NOT use it for a new document (use create_document).
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": {
"document_id": "<document_id>",
"instruction": "<instruction>"
},
"name": "update_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Narrow the change, e.g. 'page 4' or 'the revenue chart'. Everything else is left alone. | |
| document_id | Yes | Opaque id of the document to change, taken from search_documents, get_document or a job result. | |
| instruction | Yes | What should change, stated precisely, and what must stay untouched if that matters. | |
| idempotency_key | No | A key of your choosing; reuse it when you retry after a lost response so the edit is not applied twice. Omitted, the same request against the same document version within 24 hours returns the earlier job (marked `deduplicated`). | |
| expected_version | No | The `version` from your last get_document. If the document changed since, the call fails with version_conflict instead of overwriting. Omitted, the change is applied to whatever the current version is. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Present only when there is something to tell the user about this build; pass it on in your own words. | |
| job_id | Yes | Handle of the background job. Pass it to get_job or cancel_job. | |
| status | Yes | State of the job when this response was sent: queued, running, completed, partial, failed or cancelled. | |
| app_url | Yes | Link that opens the document in the Slaide web app. Share it with the user. | |
| document_id | Yes | The document the job works on. Opaque id of the document. Pass it to get_document, update_document or export_document. | |
| deduplicated | No | True when this request matched an earlier one and that earlier job is returned instead of a new one. | |
| poll_after_ms | Yes | Milliseconds to wait before the first get_job call. |