file_append
Add a section to a shared file without sending the existing body.
Markdown and HTML only. Diagram and sheet files are rejected; replace
those with file_update. The server reads the latest version, joins
content at position with separator, and writes a new
immutable version. The section must fit in one call; the resulting
file may be larger, because the client never sends it.
Returns file_id, version, total_chars, and
appended_chars. The body is not returned. A published file is
mirrored to the bucket the same way file_update does. A stale
expected_version writes nothing and returns the same conflict
shape as file_update. Omit it to append to whatever is latest.
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": {
"file_id": "<file_id>",
"content": "<content>"
},
"name": "file_append"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | No | Override agent identity | |
| content | Yes | The new section only (markdown or HTML). Do not send the existing body. The server joins it onto the latest version. | |
| file_id | Yes | File UUID to append to | |
| position | No | 'end' adds the section after the file (default). 'start' adds it before the file. | end |
| separator | No | Text placed between the existing body and the new section. Default is a blank line. | |
| expected_version | No | Latest version from file_get. Omit to append to whatever is latest (sections do not need to overwrite each other). A mismatch writes nothing and returns the same status=conflict shape as file_update: file_id, current_version, updated_by, updated_at, total_chars, and a short preview. The live file body is not included. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||