list_groups
Scan a range of group IDs to list all groups visible to your API key, including member groups and parent groups. Bypasses Loomio's missing 'list groups' endpoint for API auth.
Instructions
List groups the connector's api-key user can see, by probing a group_id range. Loomio's API has no native 'list groups' endpoint that honours api-key auth (v1's profile/groups needs a session; the v1 explore endpoint returns only public groups). This tool works around that by issuing one b2/polls?group_id=N&limit=1&status=all per id and collecting the group objects from the 200 responses — 404s skipped, 403s treated as soft misses. Scope: returns every group the bot is a member of (plus their parent groups, which b2/polls embeds in the response). Bot users with is_admin: true bypass the membership check and see every group on the instance. Optional knobs: start_id (default 1), end_id (default 200; a single call may scan at most 500 ids), stop_after_consecutive_misses (default 50; early-exit on sparse id ranges). Caveat: this is the right tool to answer 'what groups can you see' and similar discovery questions, but it costs O(end_id - start_id) outbound calls — typically ~50–200 HTTP requests in 2–5 seconds. The returned group objects are slimmed to {id, key, handle, name, parent_id, discussion_privacy_options, is_visible_to_public, memberships_count}; to drill in, use list_memberships, list_discussions, list_polls with the relevant id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_id | No | Last group_id to probe (inclusive). Defaults to 200. A single call may scan at most 500 ids; use multiple calls for wider ranges. | |
| start_id | No | First group_id to probe (inclusive). Defaults to 1. | |
| stop_after_consecutive_misses | No | Early-exit heuristic: stop probing after this many consecutive 404/403 misses. Saves wall time on sparse id ranges. Defaults to 50. |