Skip to main content
Glama
bit2beat

Bitrix24 MCP server

b24_read_product_catalog

Read the product catalog structure including sections, properties, prices, and units.

Instructions

Lee la estructura de configuración del catálogo de productos: secciones, propiedades, precios y unidades.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webhook_urlNoURL del webhook (opcional si está configurado por defecto)

Implementation Reference

  • index.js:158-160 (registration)
    Registration of the b24_read_product_catalog MCP tool with description and handler
    server.tool('b24_read_product_catalog',
      'Lee la estructura de configuración del catálogo de productos: secciones, propiedades, precios y unidades.',
      readProductCatalogSchema.shape, wrap(readProductCatalog));
  • Zod schema for input validation: optional webhook_url parameter
    export const readProductCatalogSchema = z.object({
      webhook_url: z.string().url().optional().describe('URL del webhook (opcional si está configurado por defecto)'),
    });
  • Handler function that creates a Bitrix24 client, reads the product catalog via the reader, and returns structured result with summary
    export async function readProductCatalog({ webhook_url }) {
      const client = new Bitrix24Client(resolveWebhook(webhook_url));
      const reader = new Bitrix24Reader(client);
      const catalog = await reader.readProductCatalog();
    
      if (catalog.error) {
        return { portal: client.portal, error: catalog.error };
      }
    
      return {
        portal: client.portal,
        product_catalog: catalog,
        summary: [
          `${catalog.catalogs?.length ?? 0} catálogos`,
          `${catalog.sections?.length ?? 0} secciones`,
          `${catalog.properties?.length ?? 0} propiedades`,
          `${catalog.measures?.length ?? 0} unidades de medida`,
          `${catalog.price_types?.length ?? 0} tipos de precio`,
        ].join(', '),
      };
    }
  • Bitrix24Reader method that fetches all catalog data in parallel: catalogs, sections, properties, measures, and price types via paginated API calls
    async readProductCatalog() {
      const catalog = {};
      try {
        const [catalogs, sections, properties, measures, priceTypes] = await Promise.all([
          fetchAllPages(this.client, 'catalog.catalog.list'),
          fetchAllPages(this.client, 'catalog.section.list'),
          fetchAllPages(this.client, 'catalog.product.property.list'),
          fetchAllPages(this.client, 'catalog.measure.list'),
          fetchAllPages(this.client, 'catalog.price.type.list'),
        ]);
        catalog.catalogs = catalogs;
        catalog.sections = sections;
        catalog.properties = properties;
        catalog.measures = measures;
        catalog.price_types = priceTypes;
      } catch {
        catalog.error = 'Catalog scope not available or not enabled in this plan';
      }
      return catalog;
    }
  • Utility function for paginated API calls used by readProductCatalog to fetch all items from Bitrix24 APIs
    export async function fetchAllPages(client, method, params = {}) {
      const results = [];
      let start = 0;
    
      while (true) {
        const response = await client.call(method, { ...params, start });
        const items = response.result;
    
        if (!items || (Array.isArray(items) && items.length === 0)) break;
    
        if (Array.isArray(items)) {
          results.push(...items);
        } else {
          results.push(items);
        }
    
        const total = response.total ?? 0;
        start += 50;
        if (start >= total || items.length < 50) break;
      }
    
      return results;
    }
Behavior2/5

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

No annotations are provided, so the description must bear the full burden of behavioral disclosure. It only says 'reads' (implying a read operation), but does not mention permissions, rate limits, whether results are paginated, or any other behavioral traits. For a read tool, this minimal disclosure is insufficient.

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, front-loaded sentence in Spanish. It is concise and directly states the purpose. However, the use of Spanish may reduce clarity for English-dominant agents, but the structure is efficient.

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

Completeness4/5

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

Given the tool's simplicity (one optional parameter, no output schema), the description provides a reasonable overview of what is read. It names the key components (sections, properties, prices, units), which helps an agent understand the scope. No return format is mentioned, but for a read tool this is acceptable.

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

Parameters3/5

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

The schema covers the single optional parameter (webhook_url) with a description, resulting in 100% schema description coverage. The tool description does not add additional meaning beyond the schema, so the baseline score of 3 is appropriate.

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 the configuration structure of the product catalog, specifying the components (sections, properties, prices, units). This distinguishes it from siblings like b24_products_list (which lists products) or b24_products_sections (likely sections only).

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 like b24_products_list or b24_products_sections. The description only states what it does without any context about when it's appropriate or when to choose another sibling.

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