file_update
Append a new version to an existing shared file.
Omit expected_version to append prior-max-plus-one. Pass the
version from file_get when editing a shared file so a
concurrent writer is not overwritten. A mismatch writes nothing and
returns status=conflict with the file id and a short preview,
not the file body. Re-read with file_get (offset / limit)
and retry. If the file is published, a successful new version is
eagerly mirrored to the Railway bucket. Old versions are never mutated.
To add a dated section to a large file, read the tail with a negative offset and call file_append instead of rewriting the whole body.
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_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | No | Override agent identity | |
| content | Yes | New file body (markdown, raw HTML, teamshared.diagram/v1 or teamshared.diagram/v2, or teamshared.sheet/v1 JSON/YAML) | |
| file_id | Yes | File UUID to update | |
| content_format | No | Override content format ('markdown', 'html', 'diagram', or 'sheet'); defaults to the file's current format | |
| expected_version | No | Latest version from file_get. Omit to append unconditionally. A mismatch writes nothing and returns status=conflict with 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 | |||