remove_label_from_chat
Remove a label from a specific WhatsApp chat by providing the chat ID, label ID, and session ID.
Instructions
Remove a label from a specific WhatsApp chat
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | Session ID | |
| labelId | Yes | Label ID | |
| chatId | Yes | Chat ID to remove the label from |
Implementation Reference
- src/tools/labels.ts:78-95 (registration)Registration of the 'remove_label_from_chat' tool via server.registerTool, defining its description and inputSchema.
server.registerTool( "remove_label_from_chat", { description: "Remove a label from a specific WhatsApp chat", inputSchema: { sessionId: z.string().describe("Session ID"), labelId: z.string().describe("Label ID"), chatId: z.string().describe("Chat ID to remove the label from"), }, }, async ({ sessionId, labelId, chatId }) => { const data = await openwaClient({ method: "DELETE", path: `/sessions/${sessionId}/labels/${labelId}/chats/${chatId}`, }); return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] }; } ); - src/tools/labels.ts:80-87 (schema)Input schema for remove_label_from_chat: sessionId (string), labelId (string), chatId (string) using Zod validation.
{ description: "Remove a label from a specific WhatsApp chat", inputSchema: { sessionId: z.string().describe("Session ID"), labelId: z.string().describe("Label ID"), chatId: z.string().describe("Chat ID to remove the label from"), }, }, - src/tools/labels.ts:88-94 (handler)Handler function for remove_label_from_chat that sends a DELETE request to /sessions/{sessionId}/labels/{labelId}/chats/{chatId} via openwaClient.
async ({ sessionId, labelId, chatId }) => { const data = await openwaClient({ method: "DELETE", path: `/sessions/${sessionId}/labels/${labelId}/chats/${chatId}`, }); return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] }; }