Skip to main content
Glama

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
NameRequiredDescriptionDefault
data_base64NoBase64-encoded file content. Use for small files (<100KB). For larger files, prefer file_path.
descriptionNoOptional description of the asset
file_pathNoAbsolute local filesystem path to read the file from. Preferred over data_base64 for large files — avoids MCP transport size limits.
filenameYesOriginal filename with extension,required
serve_pathYesURL path where file will be served (e.g., /images/logo.png),required

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jonradoff/lightcms'

If you have feedback or need assistance with the MCP directory API, please join our Discord server