Skip to main content
Glama
billyfranklim1

mcp-evolution

Find Group by Invite

find_group_by_invite

Retrieve WhatsApp group details using an invite code, including subject, owner, size, and admins. Optionally fetch the full participant list.

Instructions

Get group information from an invite code without joining via the pinned instance. Returns { id, subject, subjectOwner, subjectTime, size, desc, descId, creation, owner, admins } by default. Set includeParticipants=true to also get the full participant list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inviteCodeYesGroup invite code (the part after https://chat.whatsapp.com/)
includeParticipantsNoWhen true, includes the full participant list in the response (may be large for big groups). Default false returns only admins + size, which covers 95% of use cases.

Implementation Reference

  • The handler function `registerFindGroupByInvite` registers the tool named 'find_group_by_invite'. It makes a GET request to `/group/inviteInfo/{instance}?inviteCode=...`, fetches group info from the Evolution API, normalizes the response (id, subject, subjectOwner, subjectTime, size, desc, descId, creation, owner, admins), and optionally includes full participant list if `includeParticipants` is true.
    export function registerFindGroupByInvite(server: McpServer, client: EvolutionClient): void {
      server.registerTool(
        "find_group_by_invite",
        {
          title: "Find Group by Invite",
          description:
            "Get group information from an invite code without joining via the pinned instance. " +
            "Returns { id, subject, subjectOwner, subjectTime, size, desc, descId, creation, owner, admins } by default. " +
            "Set includeParticipants=true to also get the full participant list.",
          inputSchema: schema,
        },
        async (args) => {
          try {
            const data = await client.get(
              `/group/inviteInfo/${client.instanceName}?inviteCode=${encodeURIComponent(args.inviteCode)}`
            ) as RawGroupInfo;
    
            const participants: RawParticipant[] = Array.isArray(data.participants) ? data.participants : [];
    
            const admins = participants
              .filter((p) => p.admin != null && p.admin !== "")
              .map((p) => ({ jid: p.id ?? "", admin: p.admin }));
    
            const normalized: Record<string, unknown> = {
              id: data.id,
              subject: data.subject,
              subjectOwner: data.subjectOwner,
              subjectTime: data.subjectTime,
              size: participants.length,
              desc: data.desc,
              descId: data.descId,
              creation: data.creation,
              owner: data.owner,
              admins,
            };
    
            if (args.includeParticipants) {
              normalized["participants"] = participants.map((p) => ({ jid: p.id, admin: p.admin ?? null }));
            }
    
            return { content: [{ type: "text" as const, text: JSON.stringify(normalized, null, 2) }] };
          } catch (e) {
            if (e instanceof McpError) return { isError: true, content: [{ type: "text" as const, text: e.message }] };
            throw e;
          }
        }
      );
    }
  • Input schema using Zod: `inviteCode` (required string) and `includeParticipants` (optional boolean, defaults to false).
    const schema = {
      inviteCode: z.string().min(1).describe("Group invite code (the part after https://chat.whatsapp.com/)"),
      includeParticipants: z
        .boolean()
        .default(false)
        .optional()
        .describe(
          "When true, includes the full participant list in the response (may be large for big groups). " +
          "Default false returns only admins + size, which covers 95% of use cases."
        ),
    };
  • The tool is registered in `registerAllTools` via `registerFindGroupByInvite(server, client)` at line 128. Import is at line 55.
    registerFindGroupByInvite(server, client);
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavior. It mentions the default return fields and the optional large participant list, but does not discuss side effects, authentication, rate limits, or error handling. Adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose and return fields. Every sentence adds value without redundancy. Efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description specifies the default return fields and the effect of the optional parameter. It lacks error case details but covers core functionality adequately.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters have detailed descriptions in the schema (100% coverage). The description adds value by explaining 'inviteCode' is the part after the WhatsApp URL and that 'includeParticipants' may return large data, with a practical note about 95% use cases.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'get' and resource 'group information from an invite code without joining'. It distinguishes from siblings like 'accept_invite' (joining), 'fetch_invite_code' (generating), and 'get_group_info' (requires membership).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'without joining via the pinned instance' implies when to use this tool (pre-join info retrieval). While it doesn't name alternatives, the context is clear and sufficient for most agents.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/billyfranklim1/mcp-evolution'

If you have feedback or need assistance with the MCP directory API, please join our Discord server