Skip to main content
Glama
ExoCubeYT

OpenWA MCP Server

by ExoCubeYT

promote_member

Promote a participant to admin role in a WhatsApp group using session ID, group ID, and participant phone ID.

Instructions

Promote a group participant to admin role

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID
groupIdYesGroup ID
participantIdYesPhone ID of the participant to promote

Implementation Reference

  • Registration of the 'promote_member' tool with description and input schema using server.registerTool().
    server.registerTool(
      "promote_member",
      {
        description: "Promote a group participant to admin role",
        inputSchema: {
          sessionId: z.string().describe("Session ID"),
          groupId: z.string().describe("Group ID"),
          participantId: z.string().describe("Phone ID of the participant to promote"),
        },
      },
      async ({ sessionId, groupId, participantId }) => {
        const data = await openwaClient({
          method: "POST",
          path: `/sessions/${sessionId}/groups/${groupId}/members/${participantId}/promote`,
        });
        return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
      }
    );
  • Handler function for 'promote_member' that calls openwaClient with POST to the promote endpoint and returns JSON response.
    async ({ sessionId, groupId, participantId }) => {
      const data = await openwaClient({
        method: "POST",
        path: `/sessions/${sessionId}/groups/${groupId}/members/${participantId}/promote`,
      });
      return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
    }
  • Input schema for 'promote_member' defining required parameters: sessionId, groupId, and participantId (all strings).
    inputSchema: {
      sessionId: z.string().describe("Session ID"),
      groupId: z.string().describe("Group ID"),
      participantId: z.string().describe("Phone ID of the participant to promote"),
    },
  • The openwaClient helper function used by the handler to make HTTP requests to the OpenWA API.
    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, and the description only states the action ('promote') without disclosing behavioral traits such as required permissions, side effects, or reversibility. The agent is left to infer that it mutates data.

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 short sentence (6 words) that conveys the core functionality without any redundant information. It is perfectly concise and front-loaded.

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

Completeness3/5

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

For a simple mutation tool with no output schema and minimal parameters, the description is adequate but lacks details on success/failure behavior, constraints, or related operations. It could be more complete by mentioning prerequisites or effects.

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 already describes all three parameters with full coverage (100%). The description does not add any additional meaning beyond stating the action, so it meets the baseline but provides no extra value.

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 tool promotes a group participant to the admin role, using a specific verb ('promote') and resource ('group participant'), and distinguishes from siblings like 'demote_member' and 'add_group_member'.

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, no prerequisites, and no context about when promotion is appropriate or forbidden.

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