Skip to main content
Glama

b24_batch

Run up to 50 Bitrix24 REST calls in one ordered batch, chain later calls to earlier results, and reduce API-limit pressure by counting the batch as one request.

Instructions

Run up to 50 REST calls in a single request (chained, with back-references).

Reduces API-limit pressure: 50 sub-calls count as one hit. Commands run in order; a later command can consume an earlier one's output using Bitrix's $result[key][field] reference syntax placed literally inside its params.

Args: commands: e.g. [{"key":"make","method":"crm.deal.add","params":{"fields":{"TITLE":"X"}}}, {"key":"note","method":"crm.timeline.comment.add", "params":{"fields":{"ENTITY_ID":"$result[make]","ENTITY_TYPE":"deal","COMMENT":"hi"}}}] halt: stop on first error if true.

Returns: JSON string: {"result": {key: }, "result_error": {key: err}, "result_next": {...}, "result_total": {...}}.

Write safety: with BITRIX_READ_ONLY=1 the whole batch is refused if any command is a write method.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "commands": "<commands>"
    },
    "name": "b24_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
haltNoStop the whole batch on the first command error (default false = keep going).
commandsYesList of commands, each {'method': str, 'params'?: object, 'key'?: str}. Max 50. Use 'key' to name a command so a later command can reference its result via Bitrix syntax, e.g. params {'ID': '$result[make][ID]'}.
webhook_urlNoOverride the default incoming webhook for this call (https://<portal>/rest/<user_id>/<token>/). If omitted, uses personal_webhook, then the X-B24-Webhook HTTP header, then the BITRIX_WEBHOOK_URL env default.
personal_webhookNoAct as a specific user (their personal incoming webhook). Takes precedence over webhook_url. Required to write to the portal under that user's permissions.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With annotations already declaring readOnly/ openWorld/ idempotent/ destructive hints, the description still adds substantial behavior: execution order, literal $result[key][field] back-reference resolution, halt-on-error semantics, the response envelope keys, and the BITRIX_READ_ONLY=1 refusal rule. The one gap is that it discloses the batch can run write methods without reconciling that against destructiveHint=false, so an agent must infer destructiveness from the sub-commands. No outright contradiction, but worth flagging.

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?

Front-loaded with the core capability, then Args/Returns/Safety in short scannable blocks. Every sentence carries information: the limit, the ordering guarantee, the reference syntax, the error policy, the response shape, the read-only guard. No filler.

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

Completeness5/5

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

For a generic batching tool with four parameters, an output schema, and full annotation coverage, this description supplies everything an agent needs to construct a correct call: command object shape, key naming for references, halt policy, return envelope keys, and the write-safety guard. Nothing material is left to inference.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description earns above baseline by giving a full two-command worked example and stating that the reference syntax is placed literally inside params — a nuance the schema only gestures at with a single inline example. The webhook/personal_webhook parameters are left to the schema, which is acceptable given its detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Run up to 50 REST calls in a single request") and immediately qualifies it with chaining and back-reference support. The scope and hard cap of 50 are explicit, so an agent can tell this is the aggregator path rather than a per-method tool. It stops short of naming any sibling as the single-call alternative, which keeps it at 4.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Reduces API-limit pressure: 50 sub-calls count as one hit" gives a concrete condition that should select this tool (rate-limit or quota pressure). What is missing is an exclusion side — nothing says when to prefer the plain single-method tools or what batch size is impractical beyond the 50 cap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools