create-file
Creates a new attachment file from a local image or base64 data and returns the Markdown needed to embed it in a note.
Instructions
Create a new attachment file in the database from a local image file or from base64 image data. Returns the Markdown to embed the attachment in a note body. Prefer filePath over data: it keeps the image bytes out of the conversation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Base64-encoded image data, without a `data:` URI prefix. Use `filePath` instead whenever the image is already on disk. | |
| name | No | The file name. Defaults to the file name of `filePath`, or `image.<ext>` when `data` is given. | |
| filePath | No | Absolute path to a local image file to attach. Either this or `data` must be given. | |
| contentType | No | The MIME type of the image. Inferred from the `filePath` extension when omitted, so it is required with `data`. |