finalize_document_upload
Step 2 of the create_document_upload_url flow: call this AFTER your shell has PUT the file to the upload_url. Confirms the object actually landed in storage, backfills its real file_size/mime_type, and (unless analyze:false) runs AI analysis the same way upload_document does. Required: document_id (from create_document_upload_url). Throws a clear error if the upload hasn't landed yet — retry after confirming the PUT succeeded. Returns { document_id, storage_path, mime_type, file_size, analyzed, description? }.
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": {
"document_id": "<document_id>"
},
"name": "finalize_document_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| analyze | No | Run AI text-extraction + summary after confirming the upload (default true). | |
| document_id | Yes | ID of the document |