Skip to main content
Glama

waha_get_group_info

Retrieve detailed information about a specific WhatsApp group using its group ID to access member lists, settings, and metadata for chat management.

Instructions

Get detailed information about a specific group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupIdYesGroup ID (format: number@g.us)

Implementation Reference

  • The primary handler for the 'waha_get_group_info' MCP tool. Extracts 'groupId' from input arguments, validates it, calls the WAHAClient's getGroupInfo method, and returns the group information formatted as a JSON string in a text content block.
     * Handle waha_get_group_info tool
     */
    private async handleGetGroupInfo(args: any) {
      const groupId = args.groupId;
    
      if (!groupId) {
        throw new Error("groupId is required");
      }
    
      const groupInfo = await this.wahaClient.getGroupInfo(groupId);
    
      return {
        content: [
          {
            type: "text",
            text: `Group information for ${groupId}:\n${JSON.stringify(groupInfo, null, 2)}`,
          },
        ],
  • The input schema and metadata definition for the 'waha_get_group_info' tool, registered in the ListTools response. Specifies that 'groupId' is a required string parameter.
      name: "waha_get_group_info",
      description: "Get detailed information about a specific group.",
      inputSchema: {
        type: "object",
        properties: {
          groupId: {
            type: "string",
            description: "Group ID (format: number@g.us)",
          },
        },
        required: ["groupId"],
      },
    },
  • src/index.ts:1093-1094 (registration)
    Registration of the tool handler in the CallToolRequestSchema switch statement, dispatching calls to 'waha_get_group_info' to the handleGetGroupInfo method.
    case "waha_get_group_info":
      return await this.handleGetGroupInfo(args);
  • Underlying helper method in WAHAClient class that makes the HTTP GET request to retrieve group information from the WAHA API endpoint `/api/{session}/groups/{groupId}`.
    async getGroupInfo(groupId: string): Promise<any> {
      if (!groupId) {
        throw new WAHAError("groupId is required");
      }
    
      const endpoint = `/api/${this.session}/groups/${encodeURIComponent(groupId)}`;
    
      return this.request<any>(endpoint, {
        method: "GET",
      });
    }

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/seejux/waha-mcp'

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