feat: add comment support (list, get, create, update, delete) #3

Closed
ITSalt wants to merge 3 commits from ITSalt/feat/comment-support into main

3 Commits

Author SHA1 Message Date
Max Nikitin
a8c8e0f40b feat: add check_new_comments tool for efficient comment polling
New tool that checks for comments created after a given timestamp.
Scoping options:
- By space (spaceId) — checks all pages in the space
- By subtree (parentPageId) — checks only descendants of a page

Uses updatedAt pre-filtering to minimize API calls: only pages
updated after the target timestamp are checked for comments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 14:24:49 +03:00
Max Nikitin
6cde1fddfc fix: stringify comment content and use cursor-based pagination
Docmost comment API requires `content` as a JSON string, not a JSON object.
Also, comments use cursor-based pagination (nextCursor/prevCursor) instead
of page-based pagination used by other endpoints.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:59:39 +03:00
Max Nikitin
a739d62318 feat: add comment support (list, get, create, update, delete)
Add 5 new MCP tools for managing Docmost page comments:
- list_comments: list all comments on a page (paginated)
- get_comment: retrieve a single comment by ID
- create_comment: create page-level or inline comments with replies
- update_comment: update existing comment content
- delete_comment: remove a comment

Comment content is automatically converted between Markdown (agent-facing)
and ProseMirror/TipTap JSON (Docmost API). Uses the existing
markdown-converter for reading and a new markdown-to-json utility
for writing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 12:33:39 +03:00