mirror of
https://github.com/morluto/rea.git
synced 2026-11-29 18:06:46 +00:00
Whole-binary inventories returned complete Evidence unless the caller asked for a summary. On Debian 12 zstd, a stripped 1.2 MB ELF, the complete MCP results were 8.2 MB for list_names, 3.6 MB for trace_feature on "error", 1.0 MB for a regex string search and 504 KB for list_procedures. Claude Code moves results above about 25,000 tokens out of context. list_names, list_procedures, list_strings, search_procedures, search_strings, trace_feature and batch_decompile now declare a size-aware detail. When the caller omits it, Evidence up to 32 KiB of UTF-8 JSON is returned inline; larger Evidence is retained and its summary returned. A server that retains nothing still returns the complete Evidence. Explicit complete and summary are unchanged. Both delivery handlers share one decision, measured with the bounded JSON size helper, and a contract opts in by declaring the size-aware detail schema. BREAKING CHANGE: for these seven tools, an omitted detail on a result above 32 KiB now returns the retained summary instead of complete Evidence. Pass detail: "complete" to keep the previous shape. Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>