Skip to main content
Glama

Directus MCP Server

by pixelsock

uploadFile

Upload files to Directus CMS using the MCP Server by providing a file URL, base64 data, and metadata. Supports file storage, naming, and MIME type specification for efficient file management.

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" }

Other Tools from Directus MCP Server

Related Tools

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/pixelsock/directus-mcp'

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