get_upload_url
Get a presigned URL for direct file upload. This avoids sending file data through MCP, saving tokens.
Flow:
Call get_upload_url(page_id, filename, mime_type) → returns upload_url, file_id, s3_key
Use Bash to upload: curl -X PUT -H 'Content-Type: <mime_type>' --upload-file /path/to/file '<upload_url>'
Call confirm_upload(file_id, s3_key, filename, mime_type, page_id) → creates file record and block
The upload_url expires in 15 minutes. Supported types: images (png, jpg, gif, webp), PDFs, Office docs, text files, and email exports (.eml, .emlx, .msg, .mbox). Use the returned mime_type for the PUT Content-Type header and confirm_upload.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | The UUID of the page to attach the file to | |
| filename | Yes | Original filename (e.g., 'screenshot.png') | |
| mime_type | Yes | MIME type (e.g., 'image/png', 'application/pdf', 'message/rfc822', 'application/mbox', 'application/vnd.ms-outlook') |