Send Sticker
send_stickerSend a sticker message to a WhatsApp recipient. Provide the recipient's phone number and the sticker as a URL or base64-encoded webp image.
Instructions
Send a sticker message via the pinned WhatsApp instance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| number | Yes | Recipient JID or phone number (e.g. 5511999999999 or group@g.us) | |
| sticker | Yes | URL or base64 of the sticker (webp format) |
Implementation Reference
- src/tools/index.ts:17-17 (registration)Import of registerSendSticker from the send-sticker module into the tools registry.
import { registerSendSticker } from "./send-sticker.js"; - src/tools/index.ts:90-90 (registration)Registration call that wires registerSendSticker into the MCP server during startup.
registerSendSticker(server, client); - src/tools/send-sticker.ts:12-33 (handler)The registerSendSticker function which registers the 'send_sticker' tool on the MCP server. The handler calls the Evolution API endpoint /message/sendSticker/{instanceName} with number and sticker arguments.
export function registerSendSticker(server: McpServer, client: EvolutionClient): void { server.registerTool( "send_sticker", { title: "Send Sticker", description: "Send a sticker message via the pinned WhatsApp instance.", inputSchema: schema, }, async (args) => { try { const data = await client.post(`/message/sendSticker/${client.instanceName}`, { number: args.number, sticker: args.sticker, }); 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-sticker.ts:7-10 (schema)Input schema for send_sticker: number (PhoneOrJidSchema) and sticker (URL or base64 webp string).
const schema = { number: PhoneOrJidSchema, sticker: z.string().min(1).describe("URL or base64 of the sticker (webp format)"), }; - src/schemas.ts:8-11 (helper)PhoneOrJidSchema used as the type for the 'number' input parameter in the send_sticker schema.
export const PhoneOrJidSchema = z .string() .min(1) .describe("Recipient JID or phone number (e.g. 5511999999999 or group@g.us)");