# create_comment

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

Leaves a new review comment pinned to a spot on the preview of a site.

- Title: Leave a comment on a site
- Scope: `comments:write`
- Access: Makes changes

`x`, `y` and `zoom` are required and place the pin. `x` and `y` are fractions of the preview between 0 and 1, and `zoom` is the preview zoom the pin was placed at. Pass `anchor` as well when the comment is about a specific element, so the pin follows that element rather than a fixed spot.

The anchor needs both `Selector` and `PagePath`, and `PagePath` must start with `/`. An anchor missing either, or with any other `PagePath`, is dropped silently and the comment is created unanchored, with the call still reporting success.

The comment is attributed to you. Every workspace member sees it, as does anyone holding the site's shared link while viewers can comment. The text is at most 1,000 characters, and text that is empty or longer than that is refused.

Mentioning a teammate does not email them from here. A mention only sends mail when it is written in the product, so anyone you name sees it when they next open the thread. For the mention to resolve to a person, it takes the composer token form `@Name{userId}` with their real user id from `list_workspace_members`, and a plain `@name` is just text. The tool tells the client to mention someone only when you asked it to. See [Comments](https://modulify.ai/docs/editor/comments#leave-a-comment).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `content` | string | Yes | The comment text, at most 1,000 characters. An empty string is refused. |
| `x` | number | Yes | Where the pin sits across the preview, 0 at the left edge and 1 at the right. |
| `y` | number | Yes | Where the pin sits down the preview, 0 at the top and 1 at the bottom. |
| `zoom` | number | Yes | The preview zoom the pin was placed at, normally 1. |
| `anchor` | object | No | Ties the pin to one element so it survives layout changes. Its fields are `PagePath` (the page the element is on, starting with `/`, such as `/pricing`), `Selector` (a CSS selector for the element), `OffsetX` and `OffsetY` (where inside the element the pin sits, 0 to 1), and `DocX` and `DocY` (a fallback position on the page, 0 to 1, used when the element is gone). Leave it out for a comment about the page in general. |