b24_department_get
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
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Fetch one department by id. | |
| start | No | Pagination offset (page size is 50). Use 'next' from a prior response. | |
| filter | No | Bitrix filter object. Keys may carry operator prefixes: '>', '<', '>=', '<=', '!', '%' (substring), '=%', e.g. {">=DATE_CREATE": "2026-01-01", "%TITLE": "draft"}. | |
| fetch_all | No | Auto-paginate and return all matching records (capped by BITRIX_MAX_PAGES, default 40 pages = 2000 records). Use a filter to keep this bounded. | |
| webhook_url | No | Override 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_webhook | No | Act 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
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |