twitter_community_memberships
List the communities a numeric X user ID belongs to, cursor-paginated, with full community objects for audience profiling. Resolve handles first.
Instructions
The INVERSE community lookup: given a numeric X USER id, list the communities that account belongs to, cursor-paginated. Every other community tool starts from a community; this one starts from an account, which makes it the tool for profiling which audiences a person sits inside. Each row is the FULL community object (the same shape twitter_community_info returns, with member counts, rules, topic, policies, admin and creator), so no follow-up call per community is needed. Takes a numeric user id ONLY, not a @handle: resolve a handle with twitter_user_info first, because resolving it here would silently cost a second call. An EMPTY communities array is a real, successful answer (the account is in no communities), not a not-found. As on twitter_community_info, role / can_join / is_pinned / viewer_relationship_type are always null on every community returned, because this is a pooled read.
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": {
"user_id": "<user_id>"
},
"name": "twitter_community_memberships"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Max communities to return for this page. Defaults to 20 and is clamped to 1-100. | |
| cursor | No | Opaque pagination cursor from a previous response's next_cursor field. Omit on the first call. | |
| user_id | Yes | Numeric X user id, e.g. '1281109705495130113'. NOT a @handle and NOT a community id. Resolve a handle to its id with twitter_user_info first. |