Skip to main content
Glama
paskal

bitrix24-mcp-server

by paskal

bitrix24_im_chat_messages

Read messages from Bitrix24 IM chats including task, group, and 1-on-1 dialogs. Returns text, attachments, and inline images for a clear view.

Instructions

Read messages from a Bitrix24 IM chat. Use for reading task chats, group chats, or 1-on-1 dialogs. For task chats, the DIALOG_ID is 'chatNNN' where NNN is the task's chatId field. Messages with attachments carry a 'files' array (fileId, name, type, dimensions); image attachments are inlined as viewable images by default so you see what a human reading the chat sees. Non-image files and over-sized images are listed by metadata — fetch them with bitrix24_im_file_get. ⚠️ TEXT FIELDS: 'text' is the display-rendered form with BBCode/HTML stripped — it is LOSSY. A message containing [URL=https://…]#146426[/URL] comes back as bare '#146426', and [USER=…] mentions and [B]bold[/B] are flattened the same way. When the original markup exists, the message also carries 'textRaw' with it intact. NEVER rebuild a message for bitrix24_im_message_update from 'text' — you will silently destroy every link, mention and format in it (caught 2026-07-24: an edited ads report lost all 8 CRM deep links). Edit from 'textRaw', or re-author the BBCode explicitly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax messages to return (default: 20)
firstIdNoMessage ID to start from (for pagination — pass the smallest ID from previous response to go further back in history)
dialogIdYesDialog ID: 'chatNNN' for group/task chats, or user ID as string for 1-on-1
maxImagesNoCap on inlined images per read (default: 20).
includeImagesNoInline image attachments as viewable images (default: true). Set false for a text-only, lower-token read.
Behavior5/5

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

No annotations exist, so the description bears full burden. It expertly discloses the lossy nature of 'text' field, warns against using it for editing, and includes a real-world incident to underscore the risk. It also explains attachment handling, including default inlining of images and listing of non-image files. This is exceptional behavioral transparency.

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

Conciseness4/5

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

The description is well-structured: clear purpose, usage guidance, and then critical behavioral warnings. It is slightly lengthy but every sentence adds unique value, such as the pagination hint for 'firstId' and the editing caution. Minor redundancy could be tightened but overall efficient.

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

Completeness5/5

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

Given the absence of an output schema, the description fully covers return fields (text, textRaw, files) and attachment behavior. It explains pagination, image inlining, and provides cross-reference to bitrix24_im_file_get. All essential context for an agent to use the tool correctly is present.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds value beyond the schema by clarifying DIALOG_ID formats for task chats ('chatNNN') and explaining the behavior of 'includeImages' and 'maxImages' defaults. This enriches understanding without redundancy.

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

Purpose5/5

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

The description clearly states 'Read messages from a Bitrix24 IM chat' with a specific verb and resource. It further specifies use cases (task chats, group chats, 1-on-1 dialogs) and distinguishes from sibling tools like bitrix24_im_message_send, bitrix24_im_message_update, etc., by its reading function.

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

Usage Guidelines4/5

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

The description explicitly guides when to use the tool ('Use for reading task chats, group chats, or 1-on-1 dialogs') and provides critical formatting for DIALOG_ID. It also directs to bitrix24_im_file_get for non-image files. However, it does not explicitly state when not to use (e.g., for writing messages) or list sibling alternatives for other actions.

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/paskal/bitrix24-mcp-server'

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