Update Profile Status
update_profile_statusChange the WhatsApp profile status (about) to a new text. Set a custom status message for the profile.
Instructions
Update the 'about' status text of the pinned WhatsApp instance's profile.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | New status text (about) for the WhatsApp profile |
Implementation Reference
- src/tools/update-profile-status.ts:1-30 (handler)The main handler function `registerUpdateProfileStatus` which registers the tool 'update_profile_status' with the MCP server. It accepts a 'status' string input, makes an HTTP POST to `/chat/updateProfileStatus/${instanceName}` with the status, and returns the response.
import { z } from "zod"; import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { McpError } from "@modelcontextprotocol/sdk/types.js"; import type { EvolutionClient } from "../evolution-client.js"; const schema = { status: z.string().min(1).describe("New status text (about) for the WhatsApp profile"), }; export function registerUpdateProfileStatus(server: McpServer, client: EvolutionClient): void { server.registerTool( "update_profile_status", { title: "Update Profile Status", description: "Update the 'about' status text of the pinned WhatsApp instance's profile.", inputSchema: schema, }, async (args) => { try { const data = await client.post(`/chat/updateProfileStatus/${client.instanceName}`, { status: args.status, }); return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] }; } catch (e) { if (e instanceof McpError) return { isError: true, content: [{ type: "text" as const, text: e.message }] }; throw e; } } ); } - Input schema using Zod: requires a 'status' field (non-empty string) describing the new profile 'about' text.
const schema = { status: z.string().min(1).describe("New status text (about) for the WhatsApp profile"), }; - src/tools/index.ts:37-37 (registration)Import of `registerUpdateProfileStatus` from the update-profile-status module.
import { registerUpdateProfileStatus } from "./update-profile-status.js"; - src/tools/index.ts:110-110 (registration)Registration call: `registerUpdateProfileStatus(server, client)` is invoked to register the tool with the MCP server.
registerUpdateProfileStatus(server, client);