write_doc_append
Append the next ordered chunk of an open stage, enforcing sequential parts and size limits so documents stay consistent. Refuses skipped parts, mismatched bytes, or chunks over 16000 characters without changing the document.
Instructions
Append the next ordered chunk of an open stage. part starts at 1 and increases by one. The same part with the same bytes is a no-op. A different byte string, a skipped part, or a chunk over 16000 characters is refused and the current document is unchanged.
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": {
"stage_id": "<stage_id>",
"part": "<part>",
"chunk": "<chunk>"
},
"name": "write_doc_append"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| part | Yes | The 1-based part index. The next part is next_part from the previous call. A whole number sent as text is accepted. | |
| chunk | Yes | The next slice of the document, at most 16000 characters. Chunks are concatenated in order at commit. | |
| source | No | Source tag. Must be the same source the stage was begun with. | |
| 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. | |
| stage_id | Yes | The stage_id write_doc_begin returned. | |
| 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). | |
| updated_by | No | Alias of `source`. Prefer `source`. |