module

CrystalMcp::Tools::Quality

Code quality tools for the Crystal MCP server.

Constants

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

Instance methods

definitions

Returns the tool definitions for code quality tools.

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