Skip to main content
Glama
bit2beat

Bitrix24 MCP server

b24_test_connection

Verify connection to Bitrix24 webhook and confirm portal details and user permissions.

Instructions

Verifica la conexión al webhook de Bitrix24 y confirma datos del portal y permisos del usuario.

Input Schema

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

Implementation Reference

  • The connectTest async function that executes the tool logic: creates a Bitrix24Client, calls app.info and profile APIs, and returns portal/user info with admin check.
    export async function connectTest({ webhook_url }) {
      const client = new Bitrix24Client(resolveWebhook(webhook_url));
    
      const [appInfo, currentUser] = await Promise.all([
        client.call('app.info'),
        client.call('profile'),
      ]);
    
      const profile = currentUser.result;
      const isAdmin = profile?.ADMIN === true || profile?.ADMIN === 'Y';
    
      return {
        success: true,
        portal: client.portal,
        app_info: appInfo.result,
        user: {
          id: profile?.ID,
          name: `${profile?.NAME} ${profile?.LAST_NAME}`.trim(),
          email: profile?.EMAIL,
          is_admin: isAdmin,
        },
        warning: isAdmin ? null : 'El usuario del webhook no tiene rol de Administrador. Algunas operaciones pueden fallar.',
      };
    }
  • Zod schema for the tool's input: optional webhook_url string.
    export const connectTestSchema = z.object({
      webhook_url: z.string().url().optional().describe('URL del webhook de Bitrix24 (opcional si está configurado por defecto)'),
    });
  • index.js:104-106 (registration)
    Registration of the 'b24_test_connection' tool on the MCP server with description, schema, and handler wrapper.
    server.tool('b24_test_connection',
      'Verifica la conexión al webhook de Bitrix24 y confirma datos del portal y permisos del usuario.',
      connectTestSchema.shape, wrap(connectTest));
  • resolveWebhook helper function that resolves the webhook URL from parameter or environment variable B24_DEFAULT_WEBHOOK.
    export function resolveWebhook(webhookParam) {
      const url = webhookParam || process.env.B24_DEFAULT_WEBHOOK;
      if (!url) {
        throw new Error(
          'No se especificó webhook_url y no hay B24_DEFAULT_WEBHOOK configurado. ' +
          'Indicá el webhook en el parámetro webhook_url o configuralo en el servidor MCP.'
        );
      }
      return url;
    }
Behavior2/5

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

With no annotations provided, the description must fully disclose behavioral traits. It states the tool verifies connection and confirms data/permissions, but does not clarify whether it is non-destructive, idempotent, or safe to call repeatedly. The potential for side effects or typical outcomes (e.g., success/failure responses) is not described.

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?

The description is a single sentence that is concise and to the point, containing no unnecessary words. It effectively communicates the core functionality without redundancy.

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

Completeness3/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 is mostly adequate but lacks information about what the tool returns or confirms. It states it confirms 'datos del portal y permisos del usuario' but does not explain the structure or format of this confirmation, leaving some uncertainty for the agent.

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 input schema covers 100% of the parameters (only one, webhook_url, with a clear description). The tool description adds no additional meaning beyond what the schema already provides; it simply mentions 'webhook' without elaborating on format or behavior.

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's purpose: testing the Bitrix24 webhook connection and confirming portal data and user permissions. It uses a specific verb ('verifica') and resource ('conexión al webhook'), and is distinct from sibling tools which focus on CRUD operations or other actions.

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?

The description does not provide explicit guidance on when to use this tool versus alternatives. It lacks context such as 'use this as a first step before other operations' or conditions that would make using it inappropriate. No exclusions or prerequisites are mentioned.

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