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
| Name | Required | Description | Default | 
|---|---|---|---|
| fileData | No | Base64 encoded file data (either fileUrl or fileData must be provided) | |
| fileName | Yes | Name of the file | |
| fileUrl | No | URL of the file to upload (either fileUrl or fileData must be provided) | |
| mimeType | No | MIME type of the file | |
| storage | No | Storage location (optional) | |
| title | No | File title (optional) | |
| token | No | Authentication token (default from config) | |
| url | No | Directus 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"
}