en un clic
code-navigation
BSL LSP navigation: definitions, refs, call graph
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
BSL LSP navigation: definitions, refs, call graph
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
When writing or reviewing BSL, apply 1C standards
При написании или ревью BSL применять стандарты 1С
Orchestrator: routing work and agent phases
Оркестратор: маршрутизация работы и фаз агентов
Rules for using RLM tools for project search and navigation in 1C/BSL
Find an existing equivalent before new BSL code
| name | code-navigation |
| description | BSL LSP navigation: definitions, refs, call graph |
| uses_capabilities | ["navigate_symbol","get_call_graph","get_code_actions","rename_symbol","search_ssl_functions","get_completion","get_symbol_impact"] |
Do not guess code location. For broad 1C/BSL search, use RLM first (rlm-bsl-search); use LSP when a concrete file, symbol, or cursor position is already known. LSP provides exact IDE semantics from the project index: definition/references, hover, signature, completion, diagnostics, rename, and code actions.
| Need | First tool |
|---|---|
| Find a mechanism, similar implementation, business chain, query/XML/MDO/forms/rights relationships | RLM (rlm_start → rlm_execute) |
| Assess broad blast radius of a metadata object, form, role, query, subscription | RLM, then LSP for found symbols |
| Go to definition of an already found method/variable | BSL LS/LSP |
| Get references/call graph by concrete position | BSL LS/LSP |
| Check type, hover, signature, completion at a concrete code location | BSL LS/LSP |
| Rename, formatting, quick fix, diagnostics | BSL LS/LSP |
| Trigger | Action |
|---|---|
| Search for procedure/function definitions | navigate_symbol operation definition |
| All calls to function X, when the concrete function/position is known | navigate_symbol search or get_call_graph incoming |
| What a function calls | get_call_graph outgoing |
| Rename across the project | rename_symbol (first preview: true) |
| Quick Fixes | get_code_actions |
| File diagnostics | get_diagnostics |
| Investigating unknown code after RLM discovery | navigate_symbol → get_call_graph → hover |
| Error "method not found" on a platform type | getMembers / getMember / getConstructors |
| Object structure / tabular sections / attributes, enum values, predefined items | get_completion after a dot (see "Metadata discovery") |
| Where a metadata object is used in code, if the manager/symbol is already known | search_ssl_functions references on Документы.X; broad usage - via RLM |
| Estimate who a procedure/function change affects | get_symbol_impact (incoming + references + classification) |
| Parameter hints while writing a call | signature_help — cursor INSIDE the call parentheses (see "Parameter hints") |
If only the business topic or an approximate name is known, use RLM first. Use this algorithm when a concrete method or position is already known.
navigate_symbol(query: "ИмяФункции", operation: "search") → get uri, line, characterget_call_graph(uri, line, character, direction: "incoming")navigate_symbol → uri, line, characterrename_symbol(..., preview: true) → check changesrename_symbol(..., preview: false)get_diagnostics for affected filesget_diagnostics(uri) → list of diagnosticsget_code_actions(uri, range, diagnostic) → applyTrigger: error "Object method not found" / "Incorrect number of parameters" on a platform type. Do not guess again - verify.
search_syntax_reference(query: "ТипОбъекта") → confirm the name, get idgetMembers(typeId) → exact list of methods/propertiesgetMember(typeId, member) → signature of a specific methodgetConstructors(typeId) → if the error is about Новый parametersImportant: Only react to an error, not proactive search.
get_completionBSL LS Type System v2 exposes configuration metadata through completion. One tool answers different questions — only the cursor position changes (after a dot). In each item's detail is the signature and return type.
| Question | Where to place the cursor | What you get |
|---|---|---|
| Object attributes / tabular sections / columns | after Объект. (a typed variable) | attributes, tabular sections, their columns, methods — with types |
| Enum values | after Перечисления.ИмяПеречисления. | enum values |
| Predefined items | after Справочники.Имя. / ПланыСчетов.Имя. | predefined items + manager methods |
| Composition of a DefinedType | cursor on an attribute of type ОпределяемыйТип | get_completion + get_hover_info reveal the composing types |
Inverse signal: if get_completion after перем. returns nothing or does not include the expected member, the variable type was inferred incorrectly/unknown. No completion here = a type error indicator (a common 1C bug), not "no data".
For a broad map of metadata object usages, start with RLM: it covers BSL, XML/MDO/forms/rights/query, subscriptions, and scheduled jobs better. Use this LSP algorithm after RLM or when exact references for a known manager are needed.
The picture is hybrid (how the object is used in BSL itself):
search_ssl_functions (references mode) on the manager symbol Документы.ИмяОбъекта → semantically exact manager-access locations. References exclude matches in comments/strings/query text."ДокументСсылка.ИмяОбъекта", Тип("ДокументСсылка.…")), metadata paths inside query text (ИЗ Документ.ИмяОбъекта), forms, rights, subscriptions, and XML/MDO.For "where used", do not start with bare grep by name: it produces false positives in comments and strings. Broad search - RLM; exact positional semantics - LSP references.
get_symbol_impactBefore renaming/changing a concrete procedure, estimate the local LSP blast radius in one call:
navigate_symbol → uri, line, character of the symbol.get_symbol_impact(uri, line, character) → incoming callers (call hierarchy) + all references + caller classification by module type (CommonModule / FormModule / ManagerModule / ObjectModule / …) — shows where the change is pulled through from: UI, server, or background.Two blind spots (built into the output, keep in mind):
&Вместо/&Перед/&После — this is NOT visible here; pick it up via RLM over BSL + XML/MDO.ОбработкаПроведения, ПередЗаписью, present in hundreds of modules), anchor call hierarchy to the specific module — otherwise the result will include false links from same-named methods of other objects.signature_helpReturns the list of parameters for the called method and which argument the cursor is on. The contract is strict — an incorrect position yields an empty result that looks like "not supported", but in reality the position is wrong.
You MUST pass line/character as 0-based, with the cursor INSIDE the call parentheses — between ( and ), NOT on the method name and NOT before (. The provider finds the enclosing call (doCall), resolves the called method, and only then returns signatures.
// Строка (1-based 8): Аккаунт = ПолучитьАккаунт(ДокументОперации, ПараметрыОперации);
signature_help(uri, line=7, character=29) // immediately after "(" → param 0
// → ПолучитьАккаунт(ДокументОперации?, ПараметрыОперации?), Active parameter: 0
signature_help(uri, line=7, character=47) // after comma → Active parameter: 1
Empty result ≠ tool is broken. signature_help returns signatures only when the called method resolves to a method with a known parameter list. It works reliably for methods in the same module (resolution from parsed source). It returns empty for:
() — the most common mistake;Модуль.Метод() — requires the configuration type index, and works only when BSL LS is pointed at a single configuration root (see "Common mistakes": cross-module resolution);СтрШаблон(, ЗначениеЗаполнено() and platform object methods (Запрос.УстановитьПараметр() — requires a loaded 1C platform context (.hbk syntax helper). The mcp-lsp container is lightweight — the platform is NOT baked into the image, it is provisioned at runtime. The bsl-ls run script generates a global config and passes it through -Dapp.globalConfiguration.path: when BSL_PLATFORM_BIN is set (compose docker-compose.platform.yml mounts the .hbk directory read-only) — the explicit v8platform.binPath takes priority; when it is not set — BSL LS auto-detects the installed platform (including Windows). Without either, the startup log shows Failed to load platform contexts: No 1C platform installations found, and platform hover/completion/signatures are empty. With a loaded context (Loaded N platform contexts from 1C syntax helper) — they resolve with full parameter docs (in Russian when language:ru).For a confirmed parameter list regardless of call site - getMember(typeId, member) (platform types) or navigate_symbol→hover (the method's own declaration).
| Capability | Purpose |
|---|---|
navigate_symbol | Search symbols, definition, hover |
get_call_graph | Call graph (incoming/outgoing) |
rename_symbol | Rename across the project |
get_diagnostics | LSP diagnostics for a file |
get_code_actions | Quick Fixes |
search_syntax_reference | Search for a platform type |
getMembers / getMember | Methods/properties of a platform type |
getConstructors | Type constructors (Новый) |
get_completion | Metadata discovery: object/tabular-section members, enum values, predefined items, types |
get_symbol_impact | Impact analysis: incoming callers + references + caller classification by module type |
signature_help | Parameter hints at the call site (cursor inside parentheses) |
| Error | Workaround |
|---|---|
| LSP is not connected | Check lsp_status; start the BSL Language Server |
| Symbol not found | Check the name (case, language); ask_ai_assistant (SEARCH_DOCS template from buddy-prompting) by method/type name |
get_call_graph times out | Reduce depth |
rename_symbol is not applicable | Check cursor position; protected area → manual editing |
| File is not indexed | Wait for LSP indexing |
signature_help returns empty | The cursor must be INSIDE the call parentheses (0-based), not on the method name; reliable for methods in the same module. For cross-module/global calls see the line below |
Cross-module Модуль.Метод() does not resolve (empty signature_help, cross-module call hierarchy loses links, false QueryToMissingMetadata) | BSL LS must index a SINGLE main configuration root src/xml, not the project root with 9 Configuration.xml files (main + extensions). Session-manager auto-detects the main configuration root under the passed workspace (detectConfigurationRoot), so this should be fixed. If it regresses, check the bsl-ls startup log for Detected 1C configuration root: …/src/xml; absence means detection failed (for example, the workspace has no main Configuration.xml or the binary is older than the fix) → reindexing is looking at the wrong tree |