find_members_without_direct_chat
Discover members in your WhatsApp groups that you haven't chatted with directly. Supports scanning multiple groups, live metadata refresh, and filtering by shared group count.
Instructions
Find group members that do not have a direct chat with you.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group_limit | No | How many groups to scan | |
| refresh_group_info | No | Fetch live group metadata before analysis | |
| min_shared_groups | No | Only include members present in at least this many groups |
Implementation Reference
- src/tools/chats.ts:364-383 (schema)Zod schema definitions for the tool's input parameters: group_limit (optional, default 200), refresh_group_info (optional, default false), min_shared_groups (optional, default 1).
group_limit: z .number() .int() .positive() .optional() .default(200) .describe("How many groups to scan"), refresh_group_info: z .boolean() .optional() .default(false) .describe("Fetch live group metadata before analysis"), min_shared_groups: z .number() .int() .positive() .optional() .default(1) .describe("Only include members present in at least this many groups"), }, - src/tools/chats.ts:360-410 (registration)Tool registration via server.tool() in the registerChatTools function, which wires the tool name, description, schema, and handler that delegates to whatsappService.findMembersWithoutDirectChat.
server.tool( "find_members_without_direct_chat", "Find group members that do not have a direct chat with you.", { group_limit: z .number() .int() .positive() .optional() .default(200) .describe("How many groups to scan"), refresh_group_info: z .boolean() .optional() .default(false) .describe("Fetch live group metadata before analysis"), min_shared_groups: z .number() .int() .positive() .optional() .default(1) .describe("Only include members present in at least this many groups"), }, async ({ group_limit, refresh_group_info, min_shared_groups, }): Promise<CallToolResult> => { try { const result = await whatsappService.findMembersWithoutDirectChat( group_limit, refresh_group_info, min_shared_groups, ); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } catch (error: any) { log.error("Error in find_members_without_direct_chat tool:", error); return { content: [ { type: "text", text: `Error finding members without direct chat: ${error?.message || String(error)}`, }, ], isError: true, }; } },