b24_notify_send
Send personal notifications to Bitrix24 users with customizable message, type, and tag. Supports simple, confirm, and lines notifications.
Instructions
Envía una notificación personal a un usuario dentro de Bitrix24.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ID del usuario destinatario | |
| message | Yes | Texto de la notificación | |
| type | No | Tipo: SYSTEM (notificación simple), CONFIRM (con botones confirmar/rechazar), LINES (Open Lines) | SYSTEM |
| tag | No | Tag para agrupar o reemplazar notificaciones previas del mismo tag | |
| webhook_url | No |
Implementation Reference
- src/tools/feed-notifications.js:44-53 (handler)The `notifySend` async function that executes the tool logic. It calls the Bitrix24 API method `im.notify.personal.add` with the provided parameters (to, message, type, tag) and returns the result.
export async function notifySend({ to, message, type = 'SYSTEM', tag, webhook_url }) { const client = new Bitrix24Client(resolveWebhook(webhook_url)); const res = await client.call('im.notify.personal.add', { USER_ID: to, MESSAGE: message, TYPE: type, ...(tag ? { TAG: tag } : {}), }); return { portal: client.portal, notify_id: res.result, success: true }; } - The `notifySendSchema` Zod schema defining the input validation for the tool: `to` (user ID), `message` (text), `type` (SYSTEM/CONFIRM/LINES), `tag` (optional), and `webhook_url` (optional).
export const notifySendSchema = z.object({ to: z.union([z.string(), z.number()]).describe('ID del usuario destinatario'), message: z.string().describe('Texto de la notificación'), type: z.enum(['SYSTEM', 'CONFIRM', 'LINES']).optional().default('SYSTEM').describe( 'Tipo: SYSTEM (notificación simple), CONFIRM (con botones confirmar/rechazar), LINES (Open Lines)' ), tag: z.string().optional().describe('Tag para agrupar o reemplazar notificaciones previas del mismo tag'), webhook_url: z.string().url().optional(), }); - index.js:235-237 (registration)Registration of the tool named 'b24_notify_send' on the MCP server using `server.tool()`, with the description 'Envía una notificación personal a un usuario dentro de Bitrix24.', the schema shape, and the wrapped handler.
server.tool('b24_notify_send', 'Envía una notificación personal a un usuario dentro de Bitrix24.', notifySendSchema.shape, wrap(notifySend)); - index.js:55-57 (registration)Import of `notifySendSchema` and `notifySend` from './src/tools/feed-notifications.js' into the main index.js file for registration.
import { feedPostSchema, feedPost, notifySendSchema, notifySend,