file_get
Fetch a shared file's latest version.
Returns version. Pass it as expected_version on file_update
when you edit a shared file. total_chars is the full size in
characters.
Omit offset and limit to return the whole file. This result
is not compressed: a shortened file is not the file you asked for.
For a large file, pass offset and limit (characters, at most
32000) and read it in pieces. A negative offset counts from the
end, so the latest section can be read without the rest of the
document. truncated is true when content is not the whole
file. Includes public_url (the /s/{slug} link) when published.
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>"
},
"name": "file_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum characters of content to return (1-32000). Omit together with offset to return the whole file. Pass offset and limit to read a large file in pieces. The next page starts at offset + returned_chars. | |
| offset | No | Character index into the latest version. 0 is the start. A negative offset counts from the end (offset=-4000 and limit=4000 is the last 4000 characters). Omit together with limit to return the whole file. | |
| file_id | Yes | File UUID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||