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_url, 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.
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": {
"bucket": "<bucket>",
"file_name": "<file_name>",
"content_base64": "<content_base64>"
},
"name": "upload_file"
}
}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. |