write_document
Write full text content to a shared document by its document ID, replacing the entire document. Requires share and document IDs.
Instructions
Write content to a document by doc_id (doc shares only).
For folder shares, use upsert_file instead.
Args: share_id: UUID of the share (for ACL check). doc_id: Document UUID. content: Full text content to write (replaces entire document). key: Yjs shared type key. Default "contents".
Returns: JSON with doc_id, length.
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": {
"share_id": "<share_id>",
"doc_id": "<doc_id>",
"content": "<content>"
},
"name": "write_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | contents | |
| doc_id | Yes | ||
| content | Yes | ||
| share_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |