Use the tooned TOON re-encoder whenever you are working with structured data (JSON, YAML, TOML, CSV, XML, NDJSON, MessagePack, CBOR, JSON5) in this repository, when the user mentions tooned/TOON, or when you want to reduce token context from tool output. tooned losslessly compresses repetitive structured payloads so…
A model given a TOON tool result extracts values by reading the header and rows directly. It does not need a toon → json conversion step; it maps the header/row structure to the question as it would for CSV or Markdown tables.
This document records actual test results from running tooned commands on real fixtures, streaming scenarios, index/metrics surfaces, and model comprehension validation. All results come from the current binary (tooned CLI) and agent CLI tests with swe-1.7-max, glm-5.2 (high), not simulated or estimated.
When tooned is installed as a PostToolUse hook with tool result replacement (updatedToolOutput for Claude Code / OpenCode / Kilo / Pi; continue: false + reason for Codex), the model receives only the TOON encoding. The original JSON is not in that context item.