Skip to main content
Glama

waha_set_presence

Update your WhatsApp presence status to online, offline, typing, recording, or paused for specific chats to indicate availability and activity.

Instructions

Set your own presence status (online, offline, typing, recording, or paused).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatIdYesChat ID (format: number@c.us)
presenceYesPresence status to set

Implementation Reference

  • Input schema and description for the waha_set_presence tool, returned by listTools endpoint.
      name: "waha_set_presence",
      description: "Set your own presence status (online, offline, typing, recording, or paused).",
      inputSchema: {
        type: "object",
        properties: {
          chatId: {
            type: "string",
            description: "Chat ID (format: number@c.us)",
          },
          presence: {
            type: "string",
            enum: ["online", "offline", "typing", "recording", "paused"],
            description: "Presence status to set",
          },
        },
        required: ["chatId", "presence"],
      },
    },
  • src/index.ts:1153-1154 (registration)
    Registration of the waha_set_presence tool handler in the CallToolRequestSchema switch statement.
    case "waha_set_presence":
      return await this.handleSetPresence(args);
  • Main handler function for waha_set_presence tool call, validates parameters and delegates to WAHAClient.setPresence method.
    private async handleSetPresence(args: any) {
      const chatId = args.chatId;
      const presence = args.presence;
    
      if (!chatId) {
        throw new Error("chatId is required");
      }
    
      if (!presence) {
        throw new Error("presence is required");
      }
    
      await this.wahaClient.setPresence({
        chatId,
        presence,
      });
    
      return {
        content: [
          {
            type: "text",
            text: `Successfully set presence to "${presence}" for ${chatId}.`,
          },
        ],
      };
    }
  • WAHAClient helper method that performs the actual HTTP POST request to the WAHA API to set the presence status for a specific chat.
    async setPresence(params: {
      chatId: string;
      presence: "online" | "offline" | "typing" | "recording" | "paused";
    }): Promise<void> {
      const { chatId, presence } = params;
    
      if (!chatId) {
        throw new WAHAError("chatId is required");
      }
    
      if (!presence) {
        throw new WAHAError("presence is required");
      }
    
      const body = {
        chatId,
        presence,
      };
    
      await this.request<void>(`/api/${this.session}/presence`, {
        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 full burden but offers minimal behavioral insight. It states the action is to 'set' presence, implying a mutation, but doesn't disclose effects (e.g., whether it's visible to others, requires specific permissions, or has rate limits). No information on error conditions or response format is included.

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 that front-loads the core action and enumerates the possible presence values. There is no wasted verbiage, making it highly concise and well-structured for quick comprehension.

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 details on behavioral traits (e.g., side effects, permissions), error handling, and what the tool returns. Given the complexity of setting presence in a chat context, more context is needed for effective use.

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?

Schema description coverage is 100%, so the schema fully documents both parameters (chatId format, presence enum values). The description adds no additional parameter semantics beyond what's in the schema, such as explaining the context of 'chatId' or nuances of presence states. Baseline 3 is appropriate given high schema coverage.

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 your own presence status') and specifies the resource (presence status with specific values: online, offline, typing, recording, or paused). It distinguishes from siblings like 'waha_get_presence' by indicating it's a setter, but doesn't explicitly differentiate from other presence-related tools like 'waha_subscribe_presence'.

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., needing a valid chatId), exclusions, or compare it to similar tools like 'waha_get_presence' or 'waha_subscribe_presence'.

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