b24_task_comments_list
List a task's comments from forum or chat storage, falling back to chat when the forum is empty and returning the source so empty results are trustworthy.
Instructions
List a task's comments, from wherever this portal actually keeps them.
Bitrix stores task comments in one of two places and does not tell you
which: the legacy forum topic (task.commentitem.getlist) or the task's
chat. On a chat-based portal forumTopicId is null and the forum method
answers with an empty list even when comments exist — confirmed live: a
comment added through b24_task_comment_add returned a real id, was visible
in the chat, and the forum method still reported nothing. Reading only the
forum therefore produces a false "no comments", which reads exactly like a
write that failed.
So: read the forum first, and when it comes back empty fall back to the
task chat. source says which one answered, so an empty result is
trustworthy rather than ambiguous.
Returns: JSON: {"comments": [...], "count": , "source": "forum"|"chat"|"none", "task_id": }. Chat-sourced entries carry "is_system": true for Bitrix's own notices (task created, time logged), which have no author.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "b24_task_comments_list"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Task id. | |
| limit | No | Max comments to return when they live in the task chat. | |
| webhook_url | No | Override the default incoming webhook for this call (https://<portal>/rest/<user_id>/<token>/). If omitted, uses personal_webhook, then the X-B24-Webhook HTTP header, then the BITRIX_WEBHOOK_URL env default. | |
| personal_webhook | No | Act as a specific user (their personal incoming webhook). Takes precedence over webhook_url. Required to write to the portal under that user's permissions. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |