write_doc_begin
Start a staged write for documents too large for one write_doc call. Append each part, then commit them as a single revision.
Instructions
Open a staged write when a document will not fit in one write_doc argument. The stage is not a document and does not change the current revision. Send each part with write_doc_append, then write_doc_commit. A record (HANDOFF.md and any id in EMET_RECORD_DOCS) still needs supersedes and reason; commit writes one whole revision through write_doc. Limits: 16000 characters per part, 128 parts, 2000000 characters total, 30 minutes from begin, 4 open stages per writer. Same source, session, and writer stamp as write_doc.
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": {
"doc_id": "<doc_id>"
},
"name": "write_doc_begin"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| reason | No | Required on a record revision (at least 10 characters). Stored on the stage and passed to write_doc at commit. | |
| source | No | Source tag - which host produced this write. One name on every write since 2026-09-27. | |
| exchange | No | The exchange (turn) this write belongs to, counting from 1. A write for exchange n while exchange n-1 was never appended is refused by the session graph until n-1 is appended. | |
| session_id | No | Your transcript session id from emet_session_open. The session graph reads this session's state before the write and returns `session_graph.next` - the next step. A governed write with no session is refused (open one with emet_session_open and load_id). | |
| supersedes | No | Required when staging a new revision of a RECORD: the version currently in force. Stored on the stage and passed to write_doc at commit. | |
| updated_by | No | Alias of `source` (the older name, kept one release). Prefer `source`. |