feat: add comment support (list, get, create, update, delete, check_new)
Adds 6 new MCP tools for managing Docmost page comments: - list_comments: list all comments on a page (content as Markdown) - get_comment: retrieve a single comment by ID - create_comment: create page-level or inline comment (Markdown input) - update_comment: update comment content (creator only) - delete_comment: delete a comment (creator or space admin) - check_new_comments: poll for new comments since a timestamp Implementation details: - New markdownToTiptapJson() utility in src/lib/markdown-to-json.ts - New filterComment() in src/lib/filters.ts - Supports inline comments, threaded replies via parentCommentId - README updated with comment tools documentation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,15 @@ A Model Context Protocol (MCP) server for [Docmost](https://docmost.com/), enabl
|
||||
- **`list_pages`**: List pages within a space (ordered by `updatedAt` descending).
|
||||
- **`get_page`**: Retrieve full content and metadata of a specific page.
|
||||
|
||||
### Comments
|
||||
|
||||
- **`list_comments`**: List all comments on a page with content converted to Markdown.
|
||||
- **`get_comment`**: Retrieve a single comment by ID.
|
||||
- **`create_comment`**: Create a page-level or inline comment. Content is provided as Markdown and automatically converted to ProseMirror JSON. Supports replies via `parentCommentId`.
|
||||
- **`update_comment`**: Update an existing comment's content (creator only).
|
||||
- **`delete_comment`**: Delete a comment (creator or space admin only).
|
||||
- **`check_new_comments`**: Check for new comments across a space (or a page subtree) since a given timestamp. Efficiently filters by `updatedAt` before fetching comments.
|
||||
|
||||
### Technical Details
|
||||
|
||||
- **Automatic Markdown Conversion**: Page content is automatically converted from Docmost's internal ProseMirror/TipTap JSON format to clean Markdown for easy agent consumption. Supports all Docmost extensions including callouts, task lists, math blocks, embeds, and more.
|
||||
|
||||
Reference in New Issue
Block a user