Skip to main content
Glama

b24_department_get

Read-onlyIdempotent

Lists and describes Bitrix24 company departments, applying ID or attribute filters client-side so you can retrieve specific departments instead of the full unfiltered tree.

Instructions

List/describe company departments (department.get).

Bitrix's department.get has no server-side filter — it silently ignores a filter param and returns the entire department list regardless of what's in it (confirmed against a live portal). An ID key (int or list) is sent the way Bitrix actually supports it (a top-level ID); any other key (NAME, %NAME substring, PARENT, UF_HEAD, ...) is matched client-side after fetching the full tree, so filtering here genuinely works instead of quietly dumping everything.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "b24_department_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoFetch one department by id.
startNoPagination offset (page size is 50). Use 'next' from a prior response.
filterNoBitrix filter object. Keys may carry operator prefixes: '>', '<', '>=', '<=', '!', '%' (substring), '=%', e.g. {">=DATE_CREATE": "2026-01-01", "%TITLE": "draft"}.
fetch_allNoAuto-paginate and return all matching records (capped by BITRIX_MAX_PAGES, default 40 pages = 2000 records). Use a filter to keep this bounded.
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.5/5.0
Behavior5/5

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

The annotations already declare read-only, idempotent, and non-destructive behavior, but the description adds critical non-obvious behavior: department.get has no server-side filter and silently ignores filter params. It also discloses that ID is passed top-level while other keys are matched client-side after fetching the full tree, which directly affects invocation strategy.

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

Conciseness4/5

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

The description front-loads the purpose and then immediately presents the critical filter caveat. It is slightly verbose with parenthetical evidence and line breaks, but every sentence contributes useful behavioral context.

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?

Given that an output schema exists and annotations cover the safety profile, the description supplies exactly the missing behavioral context needed to call the tool correctly: the server-side filter limitation and the client-side workaround. Nothing essential for correct invocation appears to be missing.

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

Parameters5/5

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

Schema description coverage is 100%, but the description adds essential meaning beyond the schema by explaining that ID filtering uses a supported top-level ID key while all other filter keys (NAME, %NAME, PARENT, UF_HEAD) are applied client-side. This materially changes how an agent should interpret and use the filter parameter.

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?

The description states a specific verb and resource: list/describe company departments, and names the underlying department.get method. It does not explicitly differentiate from sibling tools, but the scope is clear and distinctive.

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?

It explains that filtering here genuinely works despite Bitrix's server-side limitation, which guides the agent to use the filter parameter rather than assuming server-side behavior. It lacks explicit when-not guidance or named alternatives, but provides clear context for use.

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