Send Status
send_statusPost text, image, video, or audio as a WhatsApp Status update to specified contacts or all contacts.
Instructions
Post a WhatsApp Status update (story) via the pinned instance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Status content type | |
| content | Yes | Text content or URL/base64 of the media | |
| caption | No | Caption for media statuses | |
| backgroundColor | No | Background color hex for text statuses (e.g. #000000) | |
| font | No | Font style 0-4 for text statuses | |
| statusJidList | No | Specific JIDs to send status to (omit for all contacts) |
Implementation Reference
- src/tools/send-status.ts:15-41 (handler)The registerSendStatus function registers the 'send_status' tool on the MCP server. The handler builds a payload from user arguments (type, content, caption, backgroundColor, font, statusJidList) and calls client.post() to POST to the Evolution API endpoint /message/sendStatus/{instanceName}. It returns the API response as text content, or an error if the request fails.
export function registerSendStatus(server: McpServer, client: EvolutionClient): void { server.registerTool( "send_status", { title: "Send Status", description: "Post a WhatsApp Status update (story) via the pinned instance.", inputSchema: schema, }, async (args) => { try { const payload: Record<string, unknown> = { type: args.type, content: args.content, }; if (args.caption !== undefined) payload["caption"] = args.caption; if (args.backgroundColor !== undefined) payload["backgroundColor"] = args.backgroundColor; if (args.font !== undefined) payload["font"] = args.font; if (args.statusJidList !== undefined) payload["statusJidList"] = args.statusJidList; const data = await client.post(`/message/sendStatus/${client.instanceName}`, payload); 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; } } ); } - src/tools/send-status.ts:6-13 (schema)Input schema for the 'send_status' tool. Defines fields: type (enum: text/image/video/audio), content (string, required), caption (optional string), backgroundColor (optional hex string), font (optional int 0-4), and statusJidList (optional array of strings for specific JIDs).
const schema = { type: z.enum(["text", "image", "video", "audio"]).describe("Status content type"), content: z.string().min(1).describe("Text content or URL/base64 of the media"), caption: z.string().optional().describe("Caption for media statuses"), backgroundColor: z.string().optional().describe("Background color hex for text statuses (e.g. #000000)"), font: z.number().int().min(0).max(4).optional().describe("Font style 0-4 for text statuses"), statusJidList: z.array(z.string()).optional().describe("Specific JIDs to send status to (omit for all contacts)"), }; - src/tools/index.ts:97-97 (registration)Registration call in registerAllTools(): invokes registerSendStatus(server, client) to register the send_status tool during server initialization.
registerSendStatus(server, client); - src/tools/index.ts:24-24 (registration)Import of registerSendStatus from './send-status.js' in the tools index file.
import { registerSendStatus } from "./send-status.js";