# upload_comment_attachment

Source: https://modulify.ai/docs/mcp/comments/upload-comment-attachment

Attaches one or more images to a comment or a reply.

- Title: Attach an image to a comment
- Scope: `comments:write`
- Access: Makes changes

Every item needs all three of `file`, `filename` and `type`. An item missing any of them is dropped before anything is uploaded, and a call left with no items is refused.

Only PNG, JPEG and WEBP are accepted, up to 30 MB each, and a comment holds at most 5 attachments in total. A call that would take the comment past that total is refused as a whole. A file that is too large or the wrong type is dropped silently rather than failing the call, so compare the returned list against what you sent.

Every uploaded image gets a world-readable public URL, and the tool tells the client never to attach anything private. The Comments panel does not show attached images and people viewing the site through its shared link never see them, but `list_comment_attachments` reads them back. See [Comments](https://modulify.ai/docs/editor/comments#from-an-ai-client-over-mcp).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `commentId` | string | Yes | The comment or reply to attach them to. |
| `files` | array of objects | Yes | The images to attach, at most 5 items. Each item needs all three of `file` (the image as a base64 data URL, such as `data:image/png;base64,...`), `filename` (such as `screenshot.png`) and `type` (the MIME type, `image/png`, `image/jpeg` or `image/webp`), or it is dropped. |