Skip to main content
Glama

bsl_complexity

Calculate cognitive and cyclomatic complexity of methods in a 1C module, optionally for a specific function, providing a metric for code review.

Instructions

Сложность методов модуля (когнитивная + цикломатическая). Метрика ревьюеру. module_full_name: 'ОбщийМодуль.МойМодуль'; function (опц.) — только этот метод.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
functionNo
module_full_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description must disclose behavior. It explains the metrics computed and the filtering behavior, but does not explicitly state that it is read-only or describe error handling. The note 'Метрика ревьюеру' implies a read-only analysis role, but this is not explicit.

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 is concise, with the purpose stated in the first sentence and parameter guidance in the second. The structure is clear and front-loaded, avoiding unnecessary verbosity.

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

Completeness4/5

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

The description adequately covers the required and optional parameters, and the output schema exists to define the return value. For a focused analysis tool, this is sufficient for an agent to call it correctly, though it could mention edge cases like non-existent module names.

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?

The description adds meaning to both parameters: it provides an example format for module_full_name ('ОбщийМодуль.МойМодуль') and clarifies that function is optional and restricts the analysis to a single method. This compensates for the 0% schema description coverage.

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 computes cognitive and cyclomatic complexity for module methods, a specific metric for reviewers. This distinguishes it from sibling tools like bsl_callers and bsl_references which focus on call graphs and definitions.

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

Usage Guidelines3/5

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

The description provides usage hints by explaining the module_full_name format and the optional function filter, but does not explicitly compare to alternatives or state when to prefer this tool over siblings. It implies usage for complexity analysis but lacks explicit guidance on when not to use it.

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