adkit_upload_file
Beta. Upload one file to Meta, Google, TikTok, LinkedIn, X, or Studio from a host-provided attachment, public HTTPS URL, or completed temporary upload. X currently supports JPEG and PNG images. When no attachment or public URL exists, a requested upload URL fills the same role. Base64 payloads and local file paths are not accepted. Report upload failures with adkit_feedback.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | File supplied automatically by a host that supports MCP attachments. Never construct this field. | |
| action | Yes | Use "upload" when the file is already attached, at a public URL, or in a completed temporary upload. Use "request_upload_url" only when the client cannot pass the file. | |
| source | No | One public URL or completed temporary upload. Do not use when the host supplied a file. | |
| filename | No | Filename for request_upload_url. | |
| accountId | No | Ad account for Meta, Google, TikTok, LinkedIn, or X. May be omitted when AdKit can resolve one account. | |
| projectId | No | Required. Get from adkit_projects. Auto-resolves only for single-project users. | |
| sizeBytes | No | Optional exact file size for request_upload_url. | |
| contentType | No | MIME type for request_upload_url, for example image/png or video/mp4. | |
| destination | No | Required for upload. The platform or Studio library that should receive the file. |