module CrystalMcp::Tools::Compiler

Overview

Compiler related tools for the Crystal MCP server.

Extended Modules

Defined in:

tools/compiler.cr

Instance Method Summary

Instance Method Detail

def check_build(file : String) : String #

Checks if a Crystal file builds correctly.

Returns a JSON string with the build check result.

Parameters:

  • file: Path to the Crystal file.

[View source]
def definitions #

Returns the tool definitions for compiler tools.


[View source]
def expand_macro(file : String, line : Int32, col : Int32) : String #

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).

[View source]
def get_context(file : String, line : Int32, col : Int32) : String #

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).

[View source]
def get_implementations(file : String, line : Int32, col : Int32) : String #

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).

[View source]