module CrystalMcp::Tools::Quality

Overview

Code quality tools for the Crystal MCP server.

Extended Modules

Defined in:

tools/quality.cr

Constant Summary

Log = ::Log.for("tools.quality")

Instance Method Summary

Instance Method Detail

def definitions : Array #

Returns the tool definitions for code quality tools.


[View source]
def format_code(path : String, check_only : Bool = false) : String #

Formats Crystal source code or checks formatting compliance.

Returns a JSON string with formatting results.

Parameters:

  • path: Path to the file or directory.
  • check_only: When true, runs --check without modifying files.

[View source]
def lint_code(file_path : String) : String #

Lints a Crystal file using Ameba.

Returns a JSON string with the linting results or an error message.

Parameters:

  • file_path: Path to the file to be linted.

[View source]