b24_groups_list
List Bitrix24 workgroups and projects filtered by active status and visibility settings.
Instructions
Lista grupos de trabajo (workgroups y proyectos) con filtros por estado y visibilidad.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | Filtros. Ejemplo: { "ACTIVE": "Y", "VISIBLE": "Y" }. Campos: NAME, ACTIVE, VISIBLE, OPENED, PROJECT | |
| select | No | ||
| webhook_url | No |
Implementation Reference
- src/tools/feed-notifications.js:66-73 (handler)The groupsList function that executes the tool logic. Calls Bitrix24 API 'sonet_group.get' via fetchAllPages with optional filter and select parameters, returning the groups with pagination support.
export async function groupsList({ filter = {}, select, webhook_url }) { const client = new Bitrix24Client(resolveWebhook(webhook_url)); const groups = await fetchAllPages(client, 'sonet_group.get', { filter, ...(select ? { select } : {}), }); return { portal: client.portal, total: groups.length, groups }; } - Zod schema for the b24_groups_list tool input validation. Defines optional filter (record), select (array of strings), and webhook_url parameters.
export const groupsListSchema = z.object({ filter: z.record(z.any()).optional().default({}).describe( 'Filtros. Ejemplo: { "ACTIVE": "Y", "VISIBLE": "Y" }. ' + 'Campos: NAME, ACTIVE, VISIBLE, OPENED, PROJECT' ), select: z.array(z.string()).optional(), webhook_url: z.string().url().optional(), }); - index.js:244-246 (registration)Registration of the 'b24_groups_list' tool on the MCP server with its description, schema shape, and wrapped handler.
server.tool('b24_groups_list', 'Lista grupos de trabajo (workgroups y proyectos) con filtros por estado y visibilidad.', groupsListSchema.shape, wrap(groupsList)); - index.js:55-63 (registration)Import of groupsListSchema and groupsList from the feed-notifications module into the index.js file.
import { feedPostSchema, feedPost, notifySendSchema, notifySend, groupsListSchema, groupsList, chatSendSchema, chatSend, bizprocListSchema, bizprocList, bizprocStartSchema, bizprocStart, telephonyCallsSchema, telephonyCalls, } from './src/tools/feed-notifications.js';