Skip to main content
Glama
bit2beat

Bitrix24 MCP server

b24_bizproc_list

List active business process instances filtered by CRM entity type and record ID to monitor workflow progress.

Instructions

Lista instancias de procesos de negocio activas, filtradas por entidad o registro.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityNoEntidad CRM: CRM_DEAL, CRM_CONTACT, CRM_COMPANY, CRM_LEAD
entity_idNoID del registro CRM
webhook_urlNo

Implementation Reference

  • The handler function for b24_bizproc_list tool. It creates a Bitrix24Client, builds params with optional ENTITY and DOCUMENT_ID filters, calls 'bizproc.workflow.instances', and returns the list of workflows.
    export async function bizprocList({ entity, entity_id, webhook_url }) {
      const client = new Bitrix24Client(resolveWebhook(webhook_url));
      const params = {};
      if (entity) params.ENTITY = entity;
      if (entity_id) params.DOCUMENT_ID = entity_id;
      const res = await client.call('bizproc.workflow.instances', params);
      return { portal: client.portal, workflows: res.result ?? [] };
    }
  • Zod schema defining the input parameters for b24_bizproc_list: entity (optional string, e.g. CRM_DEAL), entity_id (optional string/number), and webhook_url (optional URL).
    export const bizprocListSchema = z.object({
      entity: z.string().optional().describe('Entidad CRM: CRM_DEAL, CRM_CONTACT, CRM_COMPANY, CRM_LEAD'),
      entity_id: z.union([z.string(), z.number()]).optional().describe('ID del registro CRM'),
      webhook_url: z.string().url().optional(),
    });
  • index.js:249-251 (registration)
    Registration of the 'b24_bizproc_list' tool on the MCP server with its description, schema, and wrapped handler.
    server.tool('b24_bizproc_list',
      'Lista instancias de procesos de negocio activas, filtradas por entidad o registro.',
      bizprocListSchema.shape, wrap(bizprocList));
  • The Bitrix24Client class used by the handler to make API calls. The 'call' method (line 21) handles posting to the webhook URL with retries and rate limiting.
    export class Bitrix24Client {
      constructor(webhookUrl) {
        this.webhookUrl = webhookUrl.endsWith('/') ? webhookUrl : webhookUrl + '/';
        this.limiter = new RateLimiter(500);
        this.portal = this._extractPortal(webhookUrl);
      }
    
      _extractPortal(url) {
        try {
          return new URL(url).hostname;
        } catch {
          return 'unknown';
        }
      }
    
      async call(method, params = {}, retries = 0) {
        return this.limiter.schedule(async () => {
          try {
            const url = `${this.webhookUrl}${method}.json`;
            const response = await axios.post(url, params, { timeout: 30000 });
            if (response.data.error) {
              throw new Error(`Bitrix24 error [${response.data.error}]: ${response.data.error_description}`);
            }
            return response.data;
          } catch (err) {
            if (err.response?.status === 429 && retries < MAX_RETRIES) {
              const retryAfter = parseInt(err.response.headers['retry-after'] || '2', 10);
              await new Promise(r => setTimeout(r, retryAfter * 1000));
              return this.call(method, params, retries + 1);
            }
            if (err.code === 'ECONNABORTED' && retries < MAX_RETRIES) {
              const backoff = Math.pow(2, retries) * 1000;
              await new Promise(r => setTimeout(r, backoff));
              return this.call(method, params, retries + 1);
            }
            throw err;
          }
        });
      }
    }
  • Utility function resolveWebhook used by the handler 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. The description only says 'active' but does not explain what 'active' means, side effects (likely read-only), or the purpose of the webhook_url parameter. Behavioral traits are mostly missing.

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 concise sentence, which is efficient but lacks structure and details. It is not overly verbose, but could be improved with a brief note on output or usage.

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 no output schema and no annotations, the description is insufficient. It does not explain what the response looks like, pagination, or other context needed for correct invocation, leaving significant gaps.

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 no extra meaning beyond the schema. It mentions filtering by entity or record, which matches entity and entity_id, but does not explain webhook_url. Schema coverage is 67%, but description does not compensate for the missing parameter documentation.

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 it lists active business process instances filtered by entity or record, which is specific and distinguishes from siblings like b24_bizproc_start (which starts processes) and b24_crm_list (lists CRM entities).

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 guidance on when to use this tool versus alternatives. It does not mention prerequisites, when not to use, or compare to other listing tools like b24_read_automations.

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