Upload a document
upload_document_base64A file the person attached in THIS chat is NOT available to you as bytes — never try to base64-encode it yourself (the call hangs and nothing arrives); use 'request_upload_link' and give the person the link instead. Save a SMALL file (≤2MB decoded) into the caller's personal documents directly from the conversation. Provide 'filename' and 'content_base64' (the file's bytes, base64-encoded). Optional 'mime' (validated against the allowlist — PDF, images png/jpg/gif/webp, Office xlsx/docx/pptx/xls/doc/ppt, text/csv; executables and scripts are refused by magic-byte sniff, not extension) and 'note_id' (auto-link the document to one of the caller's notes). The document lands in the caller's personal tenant and counts toward their document-storage quota. For anything larger than 2MB use 'request_upload_link' instead (a big file's base64 does not fit in the model context). Returns 'web_url' (where the person sees the file: «Особисте → Документи», block «Файли») and 'download_url' (signed, ~15 min) — give the person web_url. Additive; runs the propose→confirm write gate. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.
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": {
"filename": "<filename>",
"content_base64": "<content_base64>"
},
"name": "upload_document_base64"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mime | No | ||
| note_id | No | ||
| filename | Yes | ||
| content_base64 | Yes |