Analyze comments
analyze_commentsEvidence for qualitative questions about comments, such as "why were people negative in the last 60 days" or "what do people ask about shipping". For the comments matching the filters, the result has counts by sentiment, tag, platform, language and day, the posts drawing most of them, frequent terms and two-word phrases (with lift against all comments of the range when filtered), and a balanced sample of comment texts spread over time and posts, de-duplicated, with ids and links. Posts and sampled comments on an ad carry the ad with its ad set and campaign (ids and names). Comments by the brand itself are excluded. The sample is random but repeatable for the same input. The texts carry the reasons; the counts say how representative they are.
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": {
"brand": "<brand>"
},
"name": "analyze_comments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| adId | No | ||
| from | No | ||
| isAd | No | ||
| tags | No | Only items carrying any of these tag slugs. | |
| brand | Yes | ||
| postId | No | Only comments on this post. | |
| search | No | Only items whose text contains this, case-insensitive (a plain substring, not a query language). | |
| adSetId | No | ||
| interval | No | auto | |
| language | No | Only items detected in this language code, e.g. "de". | |
| timeZone | No | ||
| platforms | No | ||
| adCampaign | No | ||
| sampleSize | No | Texts in the sample (5-150). The result stays under ~55,000 characters, so long texts can mean fewer items. | |
| sentiments | No | Only items with these sentiments. | |
| adCampaignId | No | ||
| includeCharts | No | ||
| maxTextLength | No | Characters kept per sampled text (60-500). | |
| includeReplies | No | Include replies to other comments. |