Skip to main content
Glama
ExoCubeYT

OpenWA MCP Server

by ExoCubeYT

get_group_info

Retrieve detailed WhatsApp group information including members, admins, and settings by providing a session and group ID.

Instructions

Get detailed information about a specific WhatsApp group including members, admins, and settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID
groupIdYesGroup ID

Implementation Reference

  • The 'get_group_info' tool handler function. It registers the tool via server.registerTool with input schema (sessionId, groupId) and makes a GET request to /sessions/{sessionId}/groups/{groupId} via the openwaClient helper.
      "get_group_info",
      {
        description: "Get detailed information about a specific WhatsApp group including members, admins, and settings",
        inputSchema: {
          sessionId: z.string().describe("Session ID"),
          groupId: z.string().describe("Group ID"),
        },
      },
      async ({ sessionId, groupId }) => {
        const data = await openwaClient({ method: "GET", path: `/sessions/${sessionId}/groups/${groupId}` });
        return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
      }
    );
  • The tool registration call for 'get_group_info' using server.registerTool with name, description, input schema, and handler.
    server.registerTool(
      "get_group_info",
      {
        description: "Get detailed information about a specific WhatsApp group including members, admins, and settings",
        inputSchema: {
          sessionId: z.string().describe("Session ID"),
          groupId: z.string().describe("Group ID"),
        },
      },
      async ({ sessionId, groupId }) => {
        const data = await openwaClient({ method: "GET", path: `/sessions/${sessionId}/groups/${groupId}` });
        return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
      }
  • Input schema definition for get_group_info, specifying sessionId (string) and groupId (string) as required parameters.
    {
      description: "Get detailed information about a specific WhatsApp group including members, admins, and settings",
      inputSchema: {
        sessionId: z.string().describe("Session ID"),
        groupId: z.string().describe("Group ID"),
      },
  • openwaClient helper function that makes HTTP requests to the OpenWA API. Used by the get_group_info handler to fetch group data.
    export async function openwaClient<T = unknown>(opts: RequestOptions): Promise<T> {
      const url = `${BASE_URL}${opts.path}`;
    
      const headers: Record<string, string> = {
        "Content-Type": "application/json",
        "X-API-Key": API_KEY,
      };
    
      const res = await fetch(url, {
        method: opts.method,
        headers,
        body: opts.body ? JSON.stringify(opts.body) : undefined,
      });
    
      const text = await res.text();
    
      if (!res.ok) {
        throw new Error(`OpenWA API ${res.status}: ${text}`);
      }
    
      try {
        return JSON.parse(text) as T;
      } catch {
        return text as T;
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states 'get' but does not disclose side effects (likely none), error handling, or idempotency. For a read operation, it lacks confirmation that it does not modify state and does not describe what happens if the group does not exist or session is invalid.

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?

Single sentence, 15 words, front-loaded with the key action and resource. Every word is necessary and informative without redundancy.

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?

For a read tool with 2 parameters and no output schema, the description adequately conveys the purpose and included data. However, it omits mention of session state requirements or error conditions, and it does not explain the output structure, though no output schema exists to offload that responsibility.

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

Parameters3/5

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

Input schema has 100% coverage: both parameters have basic descriptions ('Session ID', 'Group ID'). The description adds context about the return value (members, admins, settings) but not about parameter semantics beyond schema. Baseline 3 is appropriate as schema already defines parameters.

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 'Get detailed information about a specific WhatsApp group including members, admins, and settings', specifying the verb (get), resource (group info), and scope (members, admins, settings). This distinguishes it from siblings like get_groups (list all groups) or get_contact (single contact).

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 description implicitly indicates use for retrieving details of a specific group, contrasting with list-oriented tools like get_groups. However, it does not explicitly state when to use versus alternatives or mention prerequisites like an active session or valid group ID.

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/ExoCubeYT/openwa-mcp'

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