Upload file
upload_fileUpload a file to AssetLab storage by sending its bytes inline (base64). The AssetLab backend performs the storage upload server-side - use this tool when the client cannot PUT directly to Supabase Storage (e.g. Claude integrations whose outbound network blocks arbitrary supabase.co hosts). Returns { path, bucket, file_size, content_type }. After uploading, pass path to the appropriate record tool (update_asset image_url, create_asset_document file_path, update_work_order image_url, create_attachment file_path, create_project_document file_path, create_contract_document file_path). Server limit is ~10 MB decoded; MCP arg ceiling effectively caps file size around 700 KB-1 MB. For larger files, use create_upload_url instead. Requires upload_urls:write scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucket | Yes | Storage bucket (required). Use "asset-images" for asset photos, "attachments" for work-order/PM attachments. | |
| file_name | Yes | File name including extension (required) | |
| content_type | No | MIME type (e.g. image/jpeg, application/pdf). Defaults to application/octet-stream. | |
| content_base64 | Yes | File contents base64-encoded (required). Data URI prefixes like "data:image/png;base64," are stripped automatically. |