Append to Document
append_to_documentAdd text to the end (or the start) of a document you own or can edit without resending the rest of it. The existing content is never touched. Works on Markdown, CSV and Mermaid documents; for JSON, SVG or HTML use edit_document. Pass if_match (a revision such as "r12" from an earlier read) to refuse the write if the document changed since, or on_conflict: "merge" to add to the latest content anyway. Pass an idempotency_key (any string up to 128 characters) so a retry returns the original result instead of adding the text twice. Each change is saved as a new version in the document history. Fails if the document would go over your plan's size limit, and respects the owner's per-document AI permission (read-only or suggestions-only).
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": {
"slug": "<slug>",
"content": "<content>"
},
"name": "append_to_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The slug of the document to add to | |
| content | Yes | The text to add. A line break is inserted between it and the existing text when needed. | |
| if_match | No | Revision (such as "r12") from your last read. If the document has changed since, nothing is written. | |
| position | No | Where to add it. Default "end". | |
| on_conflict | No | When if_match is out of date: "fail" (default) writes nothing; "merge" adds to the latest content anyway. | |
| idempotency_key | No | Any string up to 128 characters. A retry with the same key returns the original result instead of writing again. |