Skip to main content
Glama
bit2beat

Bitrix24 MCP server

b24_read_full_config

Export all Bitrix24 structural configuration including entities, pipelines, stages, fields, automations, catalog, and users to a JSON file.

Instructions

Lee TODA la configuración estructural de la instancia: entidades, pipelines, etapas, campos, automatizaciones, catálogo y usuarios. Exporta a JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webhook_urlNoURL del webhook (opcional si está configurado por defecto)
output_fileNoRuta donde guardar el JSON exportado
verboseNo

Implementation Reference

  • Main handler function that reads full configuration by fetching entity types, pipelines, custom fields, automations, product catalog, and users in parallel, then exports them to a JSON file and returns a summary.
    export async function readFullConfig({ webhook_url, output_file, verbose = false }) {
      const client = new Bitrix24Client(resolveWebhook(webhook_url));
      const reader = new Bitrix24Reader(client);
    
      const [entityData, pipelines, customFields, automations, productCatalog, users] = await Promise.all([
        reader.readEntityTypes(),
        reader.readPipelines(),
        reader.readCustomFields(),
        reader.readAutomations(),
        reader.readProductCatalog(),
        reader.readUsers(),
      ]);
    
      const config = {
        meta: {
          exported_at: new Date().toISOString(),
          portal: client.portal,
          mcp_version: '1.0.0',
        },
        entity_types: {
          standard: entityData.standard,
          spa: entityData.spa,
        },
        pipelines,
        custom_fields: customFields,
        automations,
        product_catalog: productCatalog,
        statuses: entityData.statuses,
        currencies: entityData.currencies,
        users,
      };
    
      const timestamp = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
      const defaultFile = join(process.cwd(), `config_${client.portal}_${timestamp}.json`);
      const filePath = output_file || defaultFile;
    
      writeFileSync(filePath, JSON.stringify(config, null, 2), 'utf-8');
    
      const summary = {
        portal: client.portal,
        saved_to: filePath,
        entity_types: `${entityData.standard.length} estándar + ${entityData.spa.length} SPA`,
        pipelines: Object.keys(pipelines).length,
        custom_fields: Object.values(customFields).reduce((a, f) => a + f.length, 0),
        automations: Object.values(automations).reduce((a, r) => a + r.length, 0),
        users: users.length,
        currencies: entityData.currencies.length,
      };
    
      return verbose ? { ...summary, config } : summary;
    }
  • Zod schema defining the input parameters for the tool: webhook_url (optional), output_file (optional), verbose (optional boolean).
    export const readConfigSchema = z.object({
      webhook_url: z.string().url().optional().describe('URL del webhook (opcional si está configurado por defecto)'),
      output_file: z.string().optional().describe('Ruta donde guardar el JSON exportado'),
      verbose: z.boolean().optional().default(false),
    });
  • index.js:138-140 (registration)
    Registration of the 'b24_read_full_config' tool on the MCP server with its name, description, schema, and handler.
    server.tool('b24_read_full_config',
      'Lee TODA la configuración estructural de la instancia: entidades, pipelines, etapas, campos, automatizaciones, catálogo y usuarios. Exporta a JSON.',
      readConfigSchema.shape, wrap(readFullConfig));
  • index.js:6-20 (helper)
    Import of readConfigSchema and readFullConfig from the read-config module into the main entry point.
    // ── CRM Datos ─────────────────────────────────────────────────────────────────
    import {
      crmListSchema, crmList,
      crmGetSchema, crmGet,
      crmCreateSchema, crmCreate,
      crmUpdateSchema, crmUpdate,
      crmDeleteSchema, crmDelete,
      crmFieldsSchema, crmFields,
      timelineAddSchema, timelineAdd,
    } from './src/tools/crm.js';
    
    // ── CRM Config ────────────────────────────────────────────────────────────────
    import { connectTestSchema, connectTest } from './src/tools/connect-test.js';
    import { readConfigSchema, readFullConfig } from './src/tools/read-config.js';
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It does not confirm read-only nature, mention side effects, authentication needs, or performance implications. The verb 'Lee' suggests reading, but lacks explicit assurances.

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 a single sentence that efficiently lists the scope and export format. It is concise and prioritizes key information, though it could be slightly more structured with separate sentences for scope and export.

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 annotations, output schema, and 3 parameters, the description lacks completeness. It does not clarify return values (if any) beyond exporting to a file, or specify whether the tool returns the JSON in the response. The parameter for verbose is undefined.

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?

Schema description coverage is 67%; the description does not add meaning beyond the schema. It mentions export to JSON, which relates to output_file, but provides no details on usage or format of parameters like verbose.

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 the tool reads all structural configuration of the instance, listing key components (entities, pipelines, stages, fields, automations, catalog, users), and specifies it exports to JSON. This differentiates it from sibling tools that read specific subsets.

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

Usage Guidelines3/5

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

The description implies use for comprehensive configuration export via 'TODA', but does not explicitly guide when to use this instead of specialized reads (e.g., b24_read_pipelines). No mention of when not to use or alternatives.

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