module
CrystalMcp::Tools::Compiler
Overview
Compiler related tools for the Crystal MCP server.
Extended Modules
Defined in:
tools/compiler.crConstant Summary
-
Log =
::Log.for("tools.compiler")
Instance Method Summary
-
#check_build(file : String) : String
Checks if a Crystal file builds correctly.
-
#definitions : Array
Returns the tool definitions for compiler tools.
-
#expand_macro(file : String, line : Int32, col : Int32) : String
Expands macros for a specific location in a Crystal file.
-
#get_context(file : String, line : Int32, col : Int32) : String
Gets context for a specific location in a Crystal file.
-
#get_hierarchy(file : String, filter : String | Nil = nil) : String
Inspects the type hierarchy of a Crystal file.
-
#get_implementations(file : String, line : Int32, col : Int32) : String
Finds implementations for a specific location in a Crystal file.
Instance Method Detail
Checks if a Crystal file builds correctly.
Returns a JSON string with the build check result.
Parameters:
file: Path to the Crystal file.
Expands macros for a specific location in a Crystal file.
Returns a JSON string with the expanded macro.
Parameters:
file: Path to the Crystal file.line: Line number (1-based).col: Column number (1-based).
Gets context for a specific location in a Crystal file.
Returns a JSON string with the context information.
Parameters:
file: Path to the Crystal file.line: Line number (1-based).col: Column number (1-based).
Inspects the type hierarchy of a Crystal file.
Returns a JSON string with the hierarchy.
Parameters:
file: Path to the Crystal file.filter: Optional regex/string filter for type names.
Finds implementations for a specific location in a Crystal file.
Returns a JSON string with the implementations.
Parameters:
file: Path to the Crystal file.line: Line number (1-based).col: Column number (1-based).