Why My CLI Output Isn't XML (And How I Ended Up Reinventing TOON Without Knowing It)

TL;DR: When your primary consumer is an LLM, XML and JSON waste tokens by repeating structure in every element. A compact positional format reduces consumption by 50%. Turns out this idea already had a name: TOON (Token-Oriented Object Notation). Same selective pressure — expensive tokens and repeated keys — same solution. Anthropic uses XML for everything. Their system prompts are wrapped in <instructions>, their examples in <example>, their tools in <function>. If you work with Claude, you live surrounded by tags. ...

March 26, 2026 · Fernando