Skip to main content
Glama

bsl_diagnostics

Диагностики кода. Укажите РОВНО ОДИН адрес: module_full_name — модуль корпуса: 'ОбщийМодуль.МойМодуль' | 'Справочник.X.Форма.Имя'; path — любой локальный каталог или .bsl-файл (внешние обработки/отчёты, расширения), напр.

Instructions

Диагностики кода. Укажите РОВНО ОДИН адрес: module_full_name — модуль корпуса: 'ОбщийМодуль.МойМодуль' | 'Справочник.X.Форма.Имя'; path — любой локальный каталог или .bsl-файл (внешние обработки/отчёты, расширения), напр. 'C:\1c\work<задача>\Реализация'; UNC запрещён; text — СТРОКА кода 1С (снипет): линт до записи в файл. Обёртка в процедуру НЕ нужна (блок операторов линтуется как есть), нужна лишь синтаксическая завершённость (закрытые Если/Цикл, не оборванные выражения). Проверки ПОФАЙЛОВЫЕ, без контекста конфигурации (тип модуля/ссылки на объекты не проверяются). Для снипета по умолчанию возвращаются ВСЕ замечания (не только error+warning).

По умолчанию для module/path отдаёт полным списком только error+warning, а info/hint сворачивает в сводку suppressed.by_code (счётчики по кодам) — чтобы не переполнять бюджет на крупных модулях/формах (для text порог по умолчанию 'hint' — всё). Детали: code='Typo' (все по коду, любой severity) или min_severity='hint' (всё подряд). Зона правок — lines='2660-2781' | '10-20,35' (один файл цели) ИЛИ function='Метод[,Метод2]': только диагностики, начинающиеся в ней, ВСЕ уровни и без сворачивания; "источник".фильтр называет диапазоны (для function — найденные границы методов, от директив &… до Конец…). Источник ("источник".движок): код корпуса (module_full_name и path внутри workspace) — тёплый LSP, когда индекс готов: он видит метаданные конфигурации (тип модуля, объекты, реквизиты форм) — без ложных UnusedLocalMethod/UnusedLocalVariable в формах, с ExecuteExternalCodeInCommonModule, MissingCommonModuleMethod, UsingThisForm. Пока индекс строится (первый вызов, ~1–2 мин) — пакетный analyze без контекста конфигурации, сервер прогревается в фоне; "примечание" это называет. Код вне workspace и text — analyze. UnknownMember ненадёжен в обоих источниках (поля выборок, реквизиты регистров EDT) — не гейт. Возвращает {"diagnostics":[...], "suppressed":{"total":N,"by_code":[...]}, "источник":{"движок":"lsp"|"analyze", "примечание"?}}.

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": "bsl_diagnostics"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNo
pathNo
textNo
linesNo
functionNo
min_severityNo
module_full_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.14.0
    • addedInput schema / properties / function
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Function"
      +}
    • addedInput schema / properties / lines
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Lines"
      +}
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so richly: it discloses default severity filtering (error+warning, info/hint folded into suppressed.by_code), the snippet default of returning all findings, the LSP-vs-analyze engine selection, index warm-up timing (~1-2 min), and the known unreliability of UnknownMember. This is exactly the kind of behavior context an agent needs.

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

Conciseness3/5

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

The content is dense and information-rich, but it is delivered as a wall of text with heavy nested parentheticals and run-on clauses, making it harder to parse than necessary. It is not bloated with filler, yet the structure could be materially cleaner.

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 7-parameter tool with no annotations and no output schema, the description covers input modes, filter semantics, severity defaults, engine behavior, index warm-up, and even the return shape (diagnostics, suppressed, источник). Nothing an agent needs to call it correctly 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 coverage is 0% and all 7 parameters are undescribed in the schema, so the description must compensate and it does: it gives format examples for module_full_name, path (UNC forbidden), text (syntactic completeness requirement, no wrapping needed), lines ('2660-2781' | '10-20,35'), function (comma-separated method names), code, and min_severity with their default behaviors.

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 opening 'Диагностики кода' is terse, but the description quickly establishes that this lints BSL code and enumerates three distinct address modes (module_full_name, path, text) with concrete format examples. It does not explicitly contrast itself against siblings, but the three-mode structure makes its scope clear.

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

Usage Guidelines5/5

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

It states 'Укажите РОВНО ОДИН адрес' and explains precisely when each of the three address options applies, plus which engine handles each and when the index is warming. The usage rules are unambiguous, including the note that text-mode is for linting snippets before writing to a file.

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