Directus MCP Server

by pixelsock
Verified

uploadFile

Upload files to Directus CMS API via MCP Server using file URLs or encoded data, specifying file names, MIME types, storage locations, and optional titles.

Instructions

Upload a file to Directus

Input Schema

NameRequiredDescriptionDefault
fileDataNoBase64 encoded file data (either fileUrl or fileData must be provided)
fileNameYesName of the file
fileUrlNoURL of the file to upload (either fileUrl or fileData must be provided)
mimeTypeNoMIME type of the file
storageNoStorage location (optional)
titleNoFile title (optional)
tokenNoAuthentication token (default from config)
urlNoDirectus API URL (default from config)

Input Schema (JSON Schema)

{ "properties": { "fileData": { "description": "Base64 encoded file data (either fileUrl or fileData must be provided)", "type": "string" }, "fileName": { "description": "Name of the file", "type": "string" }, "fileUrl": { "description": "URL of the file to upload (either fileUrl or fileData must be provided)", "type": "string" }, "mimeType": { "description": "MIME type of the file", "type": "string" }, "storage": { "description": "Storage location (optional)", "type": "string" }, "title": { "description": "File title (optional)", "type": "string" }, "token": { "description": "Authentication token (default from config)", "type": "string" }, "url": { "description": "Directus API URL (default from config)", "type": "string" } }, "required": [ "fileName" ], "type": "object" }

You must be authenticated.

Other Tools from Directus MCP Server

Related Tools

ID: t8xgans6q3