feat(mcp)!: return text-only tool results by default; add mcp --structured
Summary
Default agent-device mcp returns compact text without output schemas or structuredContent, so clients do not replace that text with the larger JSON result. Errors use the shared CLI renderer, preserving dispatch disclosure, observe-first advice and diagnostic paths. ADR 0012 records the revised contract and rationale.
agent-device mcp --structuredrestores output schemas and structured results.- AI SDK data tools retain structured results and schemas.
mcpOutputFormat: "json", non-defaultresponseLevel, andincludeCostretain their JSON-text opt-ins.
42 files. Includes the #4458 output-schema guard adjustment; no new command family.
Validation
Current head: 5a5995e9adf2525a20e25e107e729077778f001a. Validation: CI. Hosted checks are green; Apex Sentinel approves with no findings. All review threads are resolved. Maintainer sign-off remains pending.
At a4bc1e6: frozen install/build and 227 MCP/AI SDK tests pass. Two new error regressions fail before the fix and pass afterward. Its exact affected gate failed at production-exports (run-FstHFp, clean checkout); prior stages passed. At 5a5995e9, the repaired production-exports guard passes locally and in hosted CI. CI tested merge checkout 8fbce857d8 (this head plus main e54dc4d8).
Review evidence: corrected error fixture sizes are 212โ143 and 235โ166 bytes. Earlier measurements belong to their earlier SHAs. The prior headless-client run did not capture a settled press success. No device-facing behavior changed in this review fix.
๐ค Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith ยท Need help on this PR? Tag @codesmith-bot with what you need.