module

CrystalMcp::Tools::Testing

Testing tools for the Crystal MCP server.

Constants

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

Instance methods

definitions

Returns the tool definitions for testing tools.

Source
run_spec(path : String, example : String | Nil = nil, fail_fast : Bool = false, timeout_seconds : Int32 = 60) : String

Runs Crystal specs on a specified file or location.

Returns a JSON string containing execution status, stdout, stderr, and exit code.

Parameters:

  • path: Path to spec file or location (e.g. spec/foo_spec.cr:25).
  • example: Optional example name filter (-e).
  • fail_fast: When true, aborts on first failure (--fail-fast).
  • timeout_seconds: Execution timeout in seconds (default: 60).
Source