upload_asset
Upload or replace files in the LightCMS asset library. Supports large files via local paths and validates file types for security.
Instructions
Upload or replace an asset in the asset library. Re-uploading to the same serve_path replaces the existing file in place — no need to delete first.
Provide file content via one of:
file_path: Absolute local path to the file (preferred for files >100KB — avoids MCP transport size limits)
data_base64: Base64-encoded file content (fine for small files)
Validates file type and MIME type for security.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data_base64 | No | Base64-encoded file content. Use for small files (<100KB). For larger files, prefer file_path. | |
| description | No | Optional description of the asset | |
| file_path | No | Absolute local filesystem path to read the file from. Preferred over data_base64 for large files — avoids MCP transport size limits. | |
| filename | Yes | Original filename with extension,required | |
| serve_path | Yes | URL path where file will be served (e.g., /images/logo.png),required |