fb_anti_duplicate_check
Check if a candidate message duplicates recent Facebook page posts by comparing 4-gram Jaccard similarity. Returns duplicate flag and closest matching post.
Instructions
Compare a candidate message against recent posts on the page.
Args: page_id: Numeric Meta Page ID. message: Candidate text to score. lookback_days: Max age of posts to compare against (default 14). similarity_threshold: Jaccard threshold above which it's "too similar" (default 0.5; 0.0=identical, 1.0=nothing in common — careful, that's inverted intuitively. 0.5 = ~half the 4-grams overlap). page_access_token: Optional page-scoped token.
Returns:
Dict with is_duplicate, closest_post_id, closest_similarity,
posts_compared, lookback_days.
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": {
"page_id": "<page_id>",
"message": "<message>"
},
"name": "fb_anti_duplicate_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | ||
| message | Yes | ||
| lookback_days | No | ||
| similarity_threshold | No | ||
| page_access_token | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||