Skip to main content
Glama
bit2beat

Bitrix24 MCP server

b24_chat_send

Send a message to a private or group chat in Bitrix24 IM. Specify the chat ID and message content.

Instructions

Envía un mensaje a un chat privado o grupal en el IM de Bitrix24.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dialog_idYesID del chat. Para mensaje privado: "userId_NUMERO" o ID numérico del usuario. Para chat grupal: ID del chat
messageYesTexto del mensaje
webhook_urlNo

Implementation Reference

  • The actual handler function for b24_chat_send. It calls Bitrix24 API 'im.message.add' with dialog_id and message, then returns portal, message_id, and success.
    export async function chatSend({ dialog_id, message, webhook_url }) {
      const client = new Bitrix24Client(resolveWebhook(webhook_url));
      const res = await client.call('im.message.add', {
        DIALOG_ID: dialog_id,
        MESSAGE: message,
      });
      return { portal: client.portal, message_id: res.result, success: true };
    }
  • Zod schema for b24_chat_send input: dialog_id (string or number), message (string), and optional webhook_url.
    export const chatSendSchema = z.object({
      dialog_id: z.union([z.string(), z.number()]).describe(
        'ID del chat. Para mensaje privado: "userId_NUMERO" o ID numérico del usuario. ' +
        'Para chat grupal: ID del chat'
      ),
      message: z.string().describe('Texto del mensaje'),
      webhook_url: z.string().url().optional(),
    });
  • index.js:239-241 (registration)
    Registration of the 'b24_chat_send' tool on the MCP server, binding the schema and handler.
    server.tool('b24_chat_send',
      'Envía un mensaje a un chat privado o grupal en el IM de Bitrix24.',
      chatSendSchema.shape, wrap(chatSend));
  • index.js:55-63 (registration)
    Import of chatSendSchema and chatSend from the feed-notifications module into the main server file.
    import {
      feedPostSchema, feedPost,
      notifySendSchema, notifySend,
      groupsListSchema, groupsList,
      chatSendSchema, chatSend,
      bizprocListSchema, bizprocList,
      bizprocStartSchema, bizprocStart,
      telephonyCallsSchema, telephonyCalls,
    } from './src/tools/feed-notifications.js';
  • Utility function resolveWebhook used by chatSend to determine the webhook URL from the parameter or environment variable.
    export function resolveWebhook(webhookParam) {
      const url = webhookParam || process.env.B24_DEFAULT_WEBHOOK;
      if (!url) {
        throw new Error(
          'No se especificó webhook_url y no hay B24_DEFAULT_WEBHOOK configurado. ' +
          'Indicá el webhook en el parámetro webhook_url o configuralo en el servidor MCP.'
        );
      }
      return url;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, and the description fails to disclose behavioral traits such as authentication requirements, rate limits, whether the message is sent immediately or queued, or any side effects. This is a significant gap for a write operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise and front-loaded. However, it sacrifices important details; brevity should not come at the cost of completeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description should provide more context about expected response, error handling, and whether messages support rich formatting or attachments. The current description is insufficient for a reliable agent invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal value beyond the input schema. It mentions 'private or group chat' which is already implied by the dialog_id parameter. The webhook_url parameter lacks any explanation, and the description does not clarify how it is used or if it's required for authentication.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool sends a message to a private or group chat in Bitrix24 IM, specifying both verb and resource. However, it does not differentiate itself from siblings like b24_notify_send or b24_feed_post, which also send messages but in different contexts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool vs alternatives. It does not mention prerequisites, restrictions (e.g., only text messages), or situations where other tools like b24_notify_send might be more appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bit2beat/bitrix24-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server