Skip to main content
Glama

b24_scope_gaps

Read-onlyIdempotent

Diagnose which Bitrix24 REST methods a webhook cannot reach by comparing granted scopes with the documented API, then identify missing scopes behind ACCESS_DENIED or ERROR_METHOD_NOT_FOUND.

Instructions

Diagnose what this webhook cannot reach, and why.

Reads the scopes actually granted and compares them against the full documented API. Use this when a call fails with ERROR_METHOD_NOT_FOUND or ACCESS_DENIED: on a live portal those two are easy to confuse with "the module is not installed", and they usually mean the scope was simply not ticked when the webhook was created.

Returns: JSON: {"granted_scopes": [...], "reachable_methods": , "blocked_methods": , "missing_scopes": {scope: method_count}, "hint": "..."}.

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_scope_gaps"
  }
}

Input Schema

NameRequiredDescriptionDefault
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?

Annotations already declare readOnlyHint, idempotentHint, non-destructive and open-world, so the safety bar is low; the description still adds real context by explaining that it reads granted scopes and diffs them against the full documented API, and it previews the return fields including a 'hint'. It does not cover auth/token requirements or rate-limit behavior.

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?

Front-loaded with the purpose in sentence one, then the trigger condition, then the return shape — a sensible order with little waste. The 'Returns' block partly restates the output schema, which is the only mild redundancy.

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 zero-required-parameter, read-only diagnostic with a full output schema and complete annotation coverage, the description supplies everything an agent needs: what it computes, when to reach for it, and what the payload contains.

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?

Schema description coverage is 100% with only two optional webhook-override parameters, both fully documented in the schema, so the baseline is 3. The description never mentions the webhook_url/personal_webhook override or its precedence chain, adding no meaning beyond the schema.

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?

Opening line gives a specific verb and object: 'Diagnose what this webhook cannot reach, and why.' It is clearly a diagnostic/comparison tool rather than a portal API call, so an agent can separate it from the b24_crm_*/b24_catalog_* siblings without reading the schema.

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?

Explicit trigger conditions are given: use it when a call returns ERROR_METHOD_NOT_FOUND or ACCESS_DENIED, plus a useful disambiguation note that these often look like 'module not installed' but usually mean an unticked scope. No explicit 'when not to use' or named alternative tool, which keeps it at 4 rather than 5.

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