Finish a file upload
postkey_finish_uploadPostkey: Adds the file sent to postkey_begin_upload's link to the Library, and answers its library_item_id (use it with postkey_attach_library_item or library_item_ids). Postkey checks that the whole file arrived and is no larger than the size it began with. Nothing arrived yet: send the file to the same link, then call this again. Link ran out or wrong size: start again with postkey_begin_upload. For a video, send meta with duration_sec, width and height: each platform's length limit is checked with them before posting.
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": {
"path": "<path>",
"title": "<title>",
"kind": "<kind>"
},
"name": "postkey_finish_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | What the file is. Only video and image files can go on a post. | |
| meta | No | For a video: { duration_sec (seconds, decimals allowed), width, height (pixels) }, for example from ffprobe. Anything else is ignored. | |
| path | Yes | The path postkey_begin_upload answered with, as it was. | |
| title | Yes | The file's title in the Library, 1 to 300 characters. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | false: refused (isError; code, message, guide_topic, url); no change. | |
| next | No | What to do next. | |
| note | No | Present when the file was already in the Library. | |
| size_bytes | No | The stored size. | |
| library_item_id | No | The new Library file's id. |