Wraps a test runner, emits failures-only summary. Same pipeline via CLI and MCP.
Single tool 'run_tests' has excellent schema completeness with Zod-validated input/output shapes, comprehensive parameter descriptions, and proper type definitions. Tool name is action-verb-based and clear. Description is detailed (280+ chars) and explains the tool's purpose, auto-detection behavior, and truncation logic. Input parameters (command, cwd, full) are all described with context and examples. Output schema is fully documented with typed fields (cruxVersion, runner, exitCode, summary, failures, runnerError). Tool annotations present (readOnlyHint, destructiveHint, idempotentHint, openWorldHint). However, the tool lacks error recovery guidance in descriptions, when runner auto-detection fails or a command is invalid, the description does not guide the LLM on what to do next. Error handling exists in code (CruxError catch) but is not surfaced in the tool definition itself.
Run the project's test suite and return a structured failures-only summary. Auto-detects the runner (vitest in v0.1) from the working directory, or runs an explicit command. By default, applies smart truncation to large expected/received payloads (e.g., Node.js internal-state graphs from rejects-style assertions). Pass full: true to disable truncation. Returns the same JSON shape as `crux --json` (cruxVersion: 1).
Error recovery guidance missing from tool description. When runner auto-detection fails or command execution errors, the description does not tell the LLM what to do next (e.g., 'If auto-detection fails, pass an explicit command via the command parameter').
No guidance on when to use 'full: true' truncation bypass. Description mentions it but does not explain the trade-off (larger payloads vs. complete debugging info) or when an agent should choose it.
Output schema includes 'runnerError' with kind enum ['compile-error', 'config-error', 'binary-not-found', 'unknown'], but the tool description does not explain what each error kind means or how the LLM should respond to them.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 66 | 2025-06-18+ | v2 |