Skip to main content
Glama

waha_set_group_picture

Update WhatsApp group profile pictures by providing a group ID and image URL or base64 data through the WAHA MCP Server.

Instructions

Set or update group profile picture.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupIdYesGroup ID (format: number@g.us)
fileUrlNoURL of the image (use either fileUrl or fileData)
fileDataNoBase64 encoded image data (use either fileUrl or fileData)

Implementation Reference

  • src/index.ts:580-601 (registration)
    Registration of the waha_set_group_picture tool in the MCP ListTools handler, including input schema definition.
    {
      name: "waha_set_group_picture",
      description: "Set or update group profile picture.",
      inputSchema: {
        type: "object",
        properties: {
          groupId: {
            type: "string",
            description: "Group ID (format: number@g.us)",
          },
          fileUrl: {
            type: "string",
            description: "URL of the image (use either fileUrl or fileData)",
          },
          fileData: {
            type: "string",
            description: "Base64 encoded image data (use either fileUrl or fileData)",
          },
        },
        required: ["groupId"],
      },
    },
  • MCP tool handler function that validates input, calls WAHAClient.setGroupPicture, and returns success response.
    private async handleSetGroupPicture(args: any) {
      const groupId = args.groupId;
      const fileUrl = args.fileUrl;
      const fileData = args.fileData;
    
      if (!groupId) {
        throw new Error("groupId is required");
      }
    
      if (!fileUrl && !fileData) {
        throw new Error("Either fileUrl or fileData is required");
      }
    
      const file: any = {};
      if (fileUrl) file.url = fileUrl;
      if (fileData) file.data = fileData;
    
      await this.wahaClient.setGroupPicture({
        groupId,
        file,
      });
    
      return {
        content: [
          {
            type: "text",
            text: `Successfully set picture for group ${groupId}.`,
          },
        ],
      };
    }
  • Underlying WAHA API client method that makes the HTTP POST request to set group picture via WAHA server.
    async setGroupPicture(params: {
      groupId: string;
      file: {
        url?: string;
        data?: string;
      };
    }): Promise<void> {
      const { groupId, file } = params;
    
      if (!groupId) {
        throw new WAHAError("groupId is required");
      }
    
      if (!file || (!file.url && !file.data)) {
        throw new WAHAError("file with url or data is required");
      }
    
      const endpoint = `/api/${this.session}/groups/${encodeURIComponent(groupId)}/picture`;
    
      const body = { file };
    
      await this.request<void>(endpoint, {
        method: "POST",
        body: JSON.stringify(body),
      });
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'Set or update group profile picture,' implying a mutation operation, but doesn't disclose critical behaviors: whether it requires admin permissions, what happens to the existing picture, if there are file size/format constraints, or error conditions. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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?

The description is a single, efficient sentence ('Set or update group profile picture.') that front-loads the core purpose with zero wasted words. It immediately conveys the action and resource without unnecessary elaboration, making it easy to parse and understand quickly.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on permissions, side effects, error handling, and what the tool returns (e.g., success confirmation or error). Given the complexity of modifying group settings in a messaging platform, more context is needed to use this tool effectively and safely.

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?

The input schema has 100% description coverage, with clear documentation for all three parameters (groupId, fileUrl, fileData). The description adds no additional parameter semantics beyond what the schema provides, such as explaining the mutual exclusivity of fileUrl and fileData or format requirements. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the action ('Set or update') and resource ('group profile picture'), making the purpose immediately understandable. It distinguishes this tool from sibling tools like 'waha_delete_group_picture' and 'waha_get_group_picture' by focusing on modification rather than deletion or retrieval. However, it doesn't explicitly differentiate from other group-related tools like 'waha_update_group_subject' beyond the resource type.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., admin permissions), when not to use it, or how it relates to similar tools like 'waha_update_group_subject' for other group attributes. The agent must infer usage from the tool name and context alone.

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

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