Class DefinitionTool

java.lang.Object
com.github._1c_syntax.bsl.languageserver.mcp.tools.DefinitionTool

@Component @Profile("mcp") public class DefinitionTool extends Object
MCP-инструмент: перейти к определению символа под курсором.

Переиспользует DefinitionProvider (обработчик textDocument/definition). Требует свежий AST (разрешение типозависимых ссылок), поэтому читает через McpDocumentReader.analyze(String, Function).

  • Constructor Details

  • Method Details

    • definition

      @McpTool(name="definition", description="Resolve the symbol at a zero-based position and return where it is declared.", generateOutputSchema=false, annotations=) public DefinitionTool.Result definition(@McpToolParam(required=true,description="Path to the .bsl/.os file (absolute or relative to the working directory). The file must lie inside a registered workspace folder \u2014 see the `list_workspace_folders` and `register_workspace_folder` tools.") String file, @McpToolParam(required=true,description="Zero-based line number of the symbol.") int line, @McpToolParam(required=true,description="Zero-based character offset within the line.") int character)