Send a page file
upload_page_fileSends one chunk of one file of an open upload. A file goes up in as many chunks as it needs, each at most 196608 bytes before encoding, numbered from 0, with chunks the total for the file; a file that fits is one chunk, chunk 0 of 1. data is the chunk's bytes as UTF-8 text (encoding "utf8") or base64 (encoding "base64", for images, fonts and any file that is not plain text). Sending a chunk again replaces it. Only paths in the upload's manifest are accepted, and the bytes are checked against the manifest's sha256 when the upload is submitted. Nothing becomes visible. Requires the pages:write scope. Publishing, unpublishing and changes to the live profile are made only by the owner, in Entry.
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": {
"entryId": "<entryId>",
"uploadId": "<uploadId>",
"path": "<path>",
"chunk": "<chunk>",
"chunks": "<chunks>",
"encoding": "<encoding>",
"data": "<data>"
},
"name": "upload_page_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The chunk's bytes in the stated encoding. At most 196608 bytes once decoded. | |
| path | Yes | A file's path inside the bundle: relative, / between folders, letters, digits, dot, underscore and hyphen only, at most 200 characters, such as index.html or assets/app.js. | |
| chunk | Yes | This chunk's number, counting from 0. | |
| chunks | Yes | How many chunks the whole file goes up in: its size divided by 196608, rounded up (at least 1). | |
| entryId | Yes | The Entry's id (starts with ent_), as returned by list_entries. | |
| encoding | Yes | "utf8" for text, "base64" for binary files. | |
| uploadId | Yes | The upload's id, as returned by start_page_revision. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Only when the call failed (isError): the error code, e.g. conflict, forbidden, not_found, validation_failed, rate_limited. | |
| path | No | The file this chunk belongs to. | |
| chunks | No | How many chunks the file has in all. When received equals chunks the file is complete. | |
| details | No | Only when the call failed: conflict has revision, forbidden has requiredScope, rate_limited has retryAfter (seconds), validation_failed has problems; a refused page bundle has errors (code, path, detail, fix for each) and a stale page revision has revision. | |
| message | No | Only when the call failed: what went wrong and what to do. | |
| received | No | How many of the file's chunks Entry now holds. |