upload-files
Upload files
Uploads go through DAM (https://imagekit.io/mcp/dam).
Never put file bytes in the conversation or a tool argument. No base64, data URIs, Buffers, or streams. That burns tokens and fails for large files.
How an upload works
An upload is a multipart/form-data POST to ImageKit's upload endpoint, authorized by a short-lived, single-use signature. The DAM server only signs. The file goes straight from where it lives to ImageKit: from the user's machine for a local file, or fetched by ImageKit for a public URL. Your job is to get a signature for each file and make sure the POST runs where the file is.
Which tool
| Situation | Call |
|---|---|
| You can run shell commands in the user's environment (one file or many, local paths or public URLs) | create_upload_signatures_in_bulk, then run the returned uploadCommand. |
| No shell, and the user wants to pick a file on their computer (the client can show MCP Apps) | upload_file with no parameters. Opens a picker (filename, folder, tags, custom metadata). |
| The user will run the upload themselves elsewhere and needs the signed form fields | create_upload_signature; they POST each file with its formFields. |
Prefer create_upload_signatures_in_bulk whenever there is a shell, even for a single file: the signed tokens never enter the conversation, and one command uploads everything and reports a status line per file.