- **Version:** 1.108.74 — Phase 2 of the maintenance PRD (`jcodemunch-mcp-prd.md`, "Harden"), WI-2.2 (F-P01). **Tool errors now carry `isError`.** Errors were returned in-band only (`{"error": ...}` JSON body in a plain content list → SDK wraps `CallToolResult(isError=False)`), so a non-Claude MCP client that branches on `isError` saw a failure as success — the exact risk for a custom HTTP harness (the Darius case). `call_tool` (server.py:4129) now returns `CallToolResult(isError=True)` for every failure path via new `_error_call_result(text)` helper: input-validation (jsonschema), search_text arg-validation, project-disabled-tool, the common in-band error branch at the JSON return (`isinstance(result,dict) and "error" in result` — covers in-band tool errors + "Unknown tool"), internal-KeyError, missing-argument, and the generic exception handler. The SAME JSON body rides in `content` (v1.108.30 in-band contract preserved); SUCCESS stays a plain `list[TextContent]` (SDK wraps isError=False) → additive on the wire, only failures gain the signal. The SDK supports this directly (`elif isinstance(results, CallToolResult): return ServerResult(results)`), so no raise (raising would mangle the body). The `route` front door (`_handle_route`) updated to surface a routed action's error under its envelope instead of `list()`-ing a non-iterable CallToolResult; `order` passes through naturally. **In-process blast radius (the real cost):** every test that subscripted an error result as a list (`result[0].text`) broke — fixed across test_server.py, test_tier_runtime.py (added `_rtext()` shape-robust reader), test_counter.py (`_call` helper), test_v1_108_55/56.py. New `tests/test_v1_108_74.py` (4: unknown-tool isError + body preserved, input-validation isError, disabled-tool isError, success-stays-plain-list). Full suite 4714 passed/10 skipped. **WI-2.4 (ruff BLE/TRY) remains, deferred to pair with Phase 3 WI-3.1 (CI lint job) — so Phase 2's substantive work is DONE; only the CI-coupled lint rule is left for Phase 3.**
0 commit comments