b24_call
Invoke any Bitrix24 REST API method directly. Provides access to CRM, tasks, disk, and other modules when no dedicated tool is available.
Instructions
Llama CUALQUIER método REST de la API de Bitrix24. Úsalo cuando no exista un tool específico. Referencia completa: https://dev.1c-bitrix.ru/rest_help/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | Método REST de Bitrix24. Ejemplos: crm.deal.list, tasks.task.add, disk.folder.getchildren, im.notify.personal.add | |
| params | No | Parámetros del método como objeto JSON. Ejemplo: { "filter": { "STAGE_ID": "WON" }, "select": ["ID","TITLE"] } | |
| webhook_url | No | Webhook opcional, usa el default si no se indica |
Implementation Reference
- src/tools/universal-call.js:15-25 (handler)The handler function 'universalCall' that executes the b24_call tool logic. It creates a Bitrix24Client, calls the specified REST method with params, and returns the result.
export async function universalCall({ method, params = {}, webhook_url }) { const client = new Bitrix24Client(resolveWebhook(webhook_url)); const response = await client.call(method, params); return { method, portal: client.portal, result: response.result, total: response.total ?? null, next: response.next ?? null, }; } - src/tools/universal-call.js:5-13 (schema)Zod schema 'callSchema' defining the input validation for b24_call: method (string), params (optional record), and webhook_url (optional URL).
export const callSchema = z.object({ method: z.string().describe( 'Método REST de Bitrix24. Ejemplos: crm.deal.list, tasks.task.add, disk.folder.getchildren, im.notify.personal.add' ), params: z.record(z.any()).optional().default({}).describe( 'Parámetros del método como objeto JSON. Ejemplo: { "filter": { "STAGE_ID": "WON" }, "select": ["ID","TITLE"] }' ), webhook_url: z.string().url().optional().describe('Webhook opcional, usa el default si no se indica'), }); - index.js:93-96 (registration)Registration of the 'b24_call' tool with the MCP server, including description, schema, and handler wrapped with error handling.
server.tool('b24_call', 'Llama CUALQUIER método REST de la API de Bitrix24. Úsalo cuando no exista un tool específico. ' + 'Referencia completa: https://dev.1c-bitrix.ru/rest_help/', callSchema.shape, wrap(universalCall));