[OPTI] ResponseFormat : compact JSON by default across all 338 tool result sites
- New src/response-format.js formatResult() single choke point; UNITY_MCP_PRETTY_JSON=1 restores indentation
- The C# plugin already sends compact JSON; Node-side re-indent inflated every structured response 20-50% in tokens
- Idea credit: community PR #31 (D3vCrow), re-implemented on current main
[FEAT] ErrorFlag : MCP isError on logical failures at the CallTool seam
- Bridge returns HTTP 200 for logical failures ({success:false}, {error}, {ok:false}, enveloped) which clients read as success
- Conservative isErrorText()/looksLikeErrorObject() shape detection; positive + negative protocol tests
[OPTI] ToolRegistry, tools/list was 50.6KB and could break constrained clients (issue #27 spawn ENAMETOOLONG) :
- Rich mode dieted to 42.8KB with FULL parameter docs kept: port-param description shortened, fattest tool descriptions compacted meaning-preserved
- New UNITY_MCP_COMPACT_TOOLS=1: 21.5KB with all 79 tools, strict schema structure retained, per-parameter prose dropped
- Both modes locked by CI budget tests (44KB rich / 24KB compact)
[FIX] ToolTiers, dynamic route discovery never merged : plugin route list read at .routes but the bridge envelope carries it at .data.routes; now handles both shapes
[FEAT] ToolTiers :
- Category listing echoes each tool's inputSchema (on-demand parameter discovery for compact-mode clients and agents)
- Did-you-mean suggestions (Levenshtein top-3) when a lazy-dispatched route fails - typo'd names get corrected instead of dead-ending (idea credit PR #31)
[FIX] Schemas, strict-client compatibility : both untyped value params (component_set_property, prefab_set_property) now declare an explicit JSON Schema type union; recursive strict-schema gate active in CI
[CLEAN] Docs : README env table gains UNITY_MCP_PRETTY_JSON and UNITY_MCP_COMPACT_TOOLS F
Francois Cugy committed
a9783f458cd4f52308d634674d656338652aa354
Parent: 239ee0e