AgentSkillsCN

nova-comments

管理NovaDB评论——创建、读取、更新、删除并搜索对象上的评论。当用户想要添加评论、查找评论,或管理评论线程时使用此功能。

SKILL.md
--- frontmatter
name: nova-comments
description: >
  Manage NovaDB comments — create, read, update, delete, and search comments on objects.
  Use when the user wants to add comments, find comments, or manage comment threads.

You have access to the NovaDB MCP server tools. This skill covers comment management via the CMS and Index APIs.

Body Format: XHTML with <div> Root

Comment bodies must be valid XHTML wrapped in <div>. Plain text and other root elements (<p>, <span>) cause HTTP 400.

code
"<div>Missing Email</div>"
"<div><p>Paragraph one</p><p>Paragraph two</p></div>"

Tools

OperationTool
Createnovadb_cms_create_comment(branchId, objectRef, body)
Readnovadb_cms_get_comment(commentId)
Listnovadb_cms_get_comments(branchRef?, objectRef?, user?)
Updatenovadb_cms_update_comment(commentId, body)
Deletenovadb_cms_delete_comment(commentId)
Searchnovadb_index_search_comments(branch, filter)
Countnovadb_index_count_comments(branch, filter)
Facetsnovadb_index_comment_occurrences(branch, ...)

Create

code
novadb_cms_create_comment(
  branchId=<branchId>,       # numeric
  objectRef=<objectId>,      # numeric
  body="<div>Text</div>",
  username="john.doe"        # optional, defaults to $cms
)

Search (Index API)

code
novadb_index_search_comments(
  branch="<branchId>",
  filter={ "searchPhrase": "...", "user": "...", "mentioned": "...", "objectTypes": [...] }
)

sortField: 0=Id, 1=User, 2=Created, 3=Modified, 4=ObjectId, 5=ObjectType. Pagination via skip/take.

Gotchas

  • <div> root is mandatory — other root elements or plain text cause HTTP 400
  • branchId and objectRef are numeric — not apiIdentifier or GUID
  • commentId is a string
  • CMS pagination uses take + continue token; Index pagination uses skip + take