Skip to main content
Glama
bit2beat

Bitrix24 MCP server

b24_disk_folder_list

Retrieve the contents of a folder in Bitrix24 Disk, supporting optional filters. If no folder ID is provided, lists the user's root storage.

Instructions

Lista el contenido de una carpeta en el Disk de Bitrix24.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folder_idNoID de la carpeta. Si no se indica, lista el storage raíz del usuario
filterNoFiltros opcionales. Ejemplo: { "NAME": "Contratos" }
webhook_urlNo

Implementation Reference

  • Handler function for b24_disk_folder_list. Calls Bitrix24 API 'disk.folder.getchildren' to list folder contents. If no folder_id provided, gets the user's personal storage root via 'disk.storage.getforapp'.
    export async function diskFolderList({ folder_id, filter = {}, webhook_url }) {
      const client = new Bitrix24Client(resolveWebhook(webhook_url));
    
      if (!folder_id) {
        // Get user's personal storage root
        const storageRes = await client.call('disk.storage.getforapp');
        folder_id = storageRes.result?.ROOT_OBJECT?.ID;
      }
    
      const res = await client.call('disk.folder.getchildren', { id: folder_id, filter });
      const items = res.result ?? [];
      return {
        portal: client.portal,
        folder_id,
        total: items.length,
        items: items.map(i => ({
          id: i.ID, name: i.NAME, type: i.TYPE, size: i.SIZE,
          created: i.CREATE_TIME, modified: i.UPDATE_TIME,
          download_url: i.DOWNLOAD_URL,
        })),
      };
    }
  • Zod schema for b24_disk_folder_list inputs: folder_id (optional string/number), filter (optional record), and webhook_url (optional URL).
    export const diskFolderListSchema = z.object({
      folder_id: z.union([z.string(), z.number()]).optional().describe('ID de la carpeta. Si no se indica, lista el storage raíz del usuario'),
      filter: z.record(z.any()).optional().default({}).describe('Filtros opcionales. Ejemplo: { "NAME": "Contratos" }'),
      webhook_url: z.string().url().optional(),
    });
  • index.js:209-211 (registration)
    Registration of the 'b24_disk_folder_list' tool on the MCP server with its schema description and handler.
    server.tool('b24_disk_folder_list',
      'Lista el contenido de una carpeta en el Disk de Bitrix24.',
      diskFolderListSchema.shape, wrap(diskFolderList));
  • index.js:44-49 (registration)
    Import of diskFolderListSchema and diskFolderList from src/tools/disk.js into the main server file.
    import {
      diskStoragesSchema, diskStorages,
      diskFolderListSchema, diskFolderList,
      diskFileGetSchema, diskFileGet,
      diskFileUploadSchema, diskFileUpload,
    } from './src/tools/disk.js';
  • Wrap function that wraps handlers with error handling and JSON serialization for MCP responses.
    function wrap(fn) {
      return async (params) => {
        try {
          const result = await fn(params);
          return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
        } catch (err) {
          const msg = err.response?.data
            ? `${err.message}\nBitrix24: ${JSON.stringify(err.response.data)}`
            : err.message;
          return { content: [{ type: 'text', text: `Error: ${msg}` }], isError: true };
        }
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It does not disclose behaviors like handling missing folder_id (defaults to root as per schema), error cases, or output format. Minimal transparency.

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

Conciseness5/5

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

A single, clear sentence with no wasted words. It is appropriately sized and front-loaded.

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?

The tool has 3 parameters and no output schema. The description does not mention the return format (list of files/folders) or any pagination, which leaves the agent underinformed for a list operation.

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?

Schema description coverage is 67% (folder_id and filter have descriptions). The tool description adds no extra meaning beyond what the schema already provides, so baseline 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 verb 'Lista' and resource 'contenido de una carpeta en el Disk de Bitrix24'. It distinguishes the tool from siblings like b24_disk_file_get and b24_disk_storages.

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 usage for listing folder contents but provides no explicit guidance on when to use this tool versus alternatives or when not to use it.

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