Skip to content

v3.13.0 β€” TOON output (token-efficient tool results)

Choose a tag to compare

@eniz1806 eniz1806 released this 06 Jun 17:32

Added

  • /toon (opt-in) β€” re-encode JSON tool results into TOON (Token-Oriented Object Notation): an array's field names are written once like a CSV header instead of repeated on every row, and scalar arrays are inlined. On large uniform data that's ~60% fewer tokens than JSON (a 50-row array: 788 β†’ 281 tokens). It only swaps in TOON when the result is genuinely shorter (never makes output larger), and non-JSON results pass through untouched. Pairs well with MCP servers that return big JSON payloads.

Tests

  • test_toon.py β€” encoder (tabular/scalar arrays, nesting, JSON fallback, quoting, numeric-string preservation) and maybe_toon (savings, never-longer, pass-through). 443 total; ruff + CI green.