Count the open comments
count_open_comments
Counts the open comment threads on a site, the number the product shows on the comments badge.
Only open root threads count. Resolved and deleted threads are not counted, and neither are replies, so the number can be smaller than the number of threads list_comments returns. Threads opened by people outside the workspace through the shared link are counted too.
Use it to find out whether anything is left to address without reading every thread. Resolving a thread with resolve_comment takes it off the count, and reopen_comment puts it back. See Comments.
Request
Call it with a POST to https://api.modulify.ai/v1/count_open_comments, sending the inputs below as a JSON object. The token needs the comments:read scope.
It only reads and changes nothing, so retrying it is safe.
curl -X POST https://api.modulify.ai/v1/count_open_comments \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"projectId":"PROJECT_ID"}'Over MCP, the same method is the count_open_comments tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site id. |
Response
Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.