Goal
Fetch comments on specific posts or across recent posts to monitor conversations, identify response opportunities, and detect policy violations.
Which Agents Use This
- engagement — Monitor for questions to answer, compliments to acknowledge
- moderator — Scan for spam, harassment, or policy violations
- custom — Any agent needing comment monitoring
Hard Rules
- MUST provide either post_id OR account_id (not neither)
- SHOULD calculate spam_score and sentiment for each comment
- SHOULD flag has_response to avoid duplicate replies
- Filter options help agents prioritize (unanswered, flagged, spam_suspected)
Steps
1. Validate input
- Verify post_id OR account_id provided
- Validate since timestamp if provided
2. Fetch comments
- If post_id: fetch comments for that post
- If account_id: fetch comments across recent posts
- Apply since filter
- Apply filter (unanswered, flagged, spam_suspected)
3. Analyze comments
- Calculate spam_score (0-1, low = genuine, high = spam)
- Determine sentiment (positive, neutral, negative)
- Check has_response (did we already reply?)
4. Return comments array
- Include comment metadata, author, content, timestamps
- Include analysis (sentiment, spam_score, has_response)
Output
{
"success": true,
"count": 18,
"comments": [
{
"comment_id": "uuid",
"post_id": "uuid",
"author": "@username",
"content": "Great post! How does this compare to X?",
"created_at": "2026-02-20T10:30:00Z",
"sentiment": "positive",
"spam_score": 0.02,
"has_response": false
}
]
}
Failure Handling
- If post_id and account_id both missing: return error "Provide post_id or account_id"
- If post_id not found: return error "Post not found"
- If platform API fails: return cached comments with warning
Example Usage
Scenario: Engagement agent checking unanswered questions
{
"account_id": "uuid",
"since": "2026-02-20T08:00:00Z",
"filter": "unanswered"
}
Result: Receive list of unanswered comments since 8am for response drafting
1---2name: bolta-get-comments3version: 2.0.04description: Fetch comments on posts to monitor conversations and identify response opportunities or policy violations5category: engagement6roles_allowed: [Viewer, Creator, Editor, Admin]7agent_types: [engagement, moderator, custom]8safe_defaults: {}9tools_required:10 - platform_api_integration11inputs_schema:12 type: object13 properties:14 post_id: { type: string, description: "Specific post UUID (optional)" }15 account_id: { type: string, description: "All recent posts for account (optional)" }16 since: { type: string, description: "ISO timestamp - fetch comments since this time" }17 filter: { type: string, enum: [all, unanswered, flagged, spam_suspected], default: all }18outputs_schema:19 type: object20 properties:21 success: { type: boolean }22 count: { type: number }23 comments: 24 type: array25 items:26 type: object27 properties:28 comment_id: { type: string }29 post_id: { type: string }30 author: { type: string }31 content: { type: string }32 created_at: { type: string }33 sentiment: { type: string }34 spam_score: { type: number }35 has_response: { type: boolean }36organization: bolta.ai37author: Bolta Team38---3940## Goal41Fetch comments on specific posts or across recent posts to monitor conversations, identify response opportunities, and detect policy violations.4243## Which Agents Use This44- **engagement** — Monitor for questions to answer, compliments to acknowledge45- **moderator** — Scan for spam, harassment, or policy violations46- **custom** — Any agent needing comment monitoring4748## Hard Rules491. MUST provide either post_id OR account_id (not neither)502. SHOULD calculate spam_score and sentiment for each comment513. SHOULD flag has_response to avoid duplicate replies524. Filter options help agents prioritize (unanswered, flagged, spam_suspected)5354## Steps5556### 1. Validate input57- Verify post_id OR account_id provided58- Validate since timestamp if provided5960### 2. Fetch comments61- If post_id: fetch comments for that post62- If account_id: fetch comments across recent posts63- Apply since filter64- Apply filter (unanswered, flagged, spam_suspected)6566### 3. Analyze comments67- Calculate spam_score (0-1, low = genuine, high = spam)68- Determine sentiment (positive, neutral, negative)69- Check has_response (did we already reply?)7071### 4. Return comments array72- Include comment metadata, author, content, timestamps73- Include analysis (sentiment, spam_score, has_response)7475## Output76```json77{78 "success": true,79 "count": 18,80 "comments": [81 {82 "comment_id": "uuid",83 "post_id": "uuid",84 "author": "@username",85 "content": "Great post! How does this compare to X?",86 "created_at": "2026-02-20T10:30:00Z",87 "sentiment": "positive",88 "spam_score": 0.02,89 "has_response": false90 }91 ]92}93```9495## Failure Handling96- If post_id and account_id both missing: return error "Provide post_id or account_id"97- If post_id not found: return error "Post not found"98- If platform API fails: return cached comments with warning99100## Example Usage101102### Scenario: Engagement agent checking unanswered questions103```json104{105 "account_id": "uuid",106 "since": "2026-02-20T08:00:00Z",107 "filter": "unanswered"108}109```110**Result:** Receive list of unanswered comments since 8am for response drafting