upload_file
Upload files to a Prisme.ai workspace via local path, remote URL, or data URI. Returns file details including URL, ID, and MIME type.
Instructions
Upload a file to the Prisme.ai workspace's file storage. Returns the uploaded File object(s) with url, id, name, mimetype, size. The file source can be provided in one of three ways: path (local filesystem), url (remote URL fetched by the MCP), or dataUri (data:mime;base64,... string). Exactly one of these must be set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Remote URL to fetch and re-upload to Prisme. Mutually exclusive with `path` and `dataUri`. | |
| path | No | Local filesystem path to the file to upload. Mutually exclusive with `url` and `dataUri`. | |
| public | No | Set to true to grant public-read ACL. Default is true on the API side. | |
| dataUri | No | Data URI string (e.g. `data:image/png;base64,iVBORw0...`). Mutually exclusive with `path` and `url`. | |
| fileName | No | Override the file name stored on Prisme. Defaults to the basename of `path`/`url`, or `upload` for dataUri. | |
| metadata | No | Arbitrary metadata to attach to the file. | |
| shareToken | No | If true, the response includes a `shareToken` that can be appended as `?token=...` to bypass auth. | |
| contentType | No | Override the MIME type. Defaults to value detected from extension/dataUri, or `application/octet-stream`. | |
| environment | No | Optional environment name (from PRISME_ENVIRONMENTS) to use specific API URL and workspace | |
| workspaceId | No | Alternative: direct workspace ID (use workspaceName instead when possible) | |
| expiresAfter | No | Best-effort expiration delay in seconds. The file will be deleted on the next API restart after this delay. | |
| workspaceName | Yes | Workspace name that resolves to ID via PRISME_WORKSPACES or PRISME_ENVIRONMENTS mapping |