<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/cut-coding-agent-token-use-with-better-tool-output-jloud5ll6" -->

---
title: Cut coding agent token use with better tool output
description: Reducing AI coding agent costs isn&#x27;t just about model choice or prompt length; the format of tool output also drives token consumption. Verbose JSON repeats...
canonical: https://daily.dev/posts/cut-coding-agent-token-use-with-better-tool-output-jloud5ll6
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Cut coding agent token use with better tool output | daily.dev
og:description: Reducing AI coding agent costs isn&#x27;t just about model choice or prompt length; the format of tool output also drives token consumption. Verbose JSON repeats...
og:url: https://daily.dev/posts/cut-coding-agent-token-use-with-better-tool-output-jloud5ll6
og:image: https://api.daily.dev/og/posts/JloUD5Ll6.png
og:image:alt: Cut coding agent token use with better tool output
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Cut coding agent token use with better tool output

**[The New Stack](https://daily.dev/sources/newstack)** · 6 min read · 0 upvotes · 0 comments

## Summary

Reducing AI coding agent costs isn't just about model choice or prompt length; the format of tool output also drives token consumption. Verbose JSON repeats field names for every record in uniform lists like issue findings, wasting context. Token-Oriented Object Notation (TOON) offers a schema-first, lossless alternative that sends field names once and rows of values after, cutting repeated scaffolding. A 25-issue comparison using the Sonar CLI showed TOON using 49% fewer characters than pretty-printed JSON and 33% fewer than minified JSON, with the TOON project's own benchmarks reporting lower token usage on uniform tabular data with comparable retrieval accuracy. The recommended approach is to keep JSON for scripts and nested data, use tables for human terminal scanning, and reserve TOON-like compact formats for LLMs reading many uniform records, while always measuring actual production payloads against the model in use rather than assuming universal savings.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://thenewstack.io/cut-coding-agent-tokens>

## Questions this post answers

### What is TOON format and how does it reduce token usage compared to JSON for AI agents?

TOON (Token-Oriented Object Notation) is a lossless encoding that keeps a schema-like header for a uniform array and sends each record as a row, so field names appear once instead of repeating for every entry. In a 25-issue comparison using the Sonar CLI, TOON used 49% fewer characters than pretty-printed JSON and 33% fewer than minified JSON, with published benchmarks also reporting lower token usage on uniform tabular datasets with comparable retrieval accuracy.

_Engineers tuning agent costs can follow ongoing coverage of formats like TOON on daily.dev._

### When should I use JSON versus a compact format like TOON for AI agent tool outputs?

JSON remains the better choice for nested or irregular data, and for scripts or API clients that expect its familiar structure. A compact, schema-first format such as TOON is better suited when an LLM must read many uniform records with the same fields repeatedly, since it strips repeated field-name scaffolding while keeping all values intact and validating fields for the model.

_Teams weighing data formats for agent workflows can track this trade-off discussion on daily.dev._

## Similar posts on daily.dev

- [New Token-Oriented Object Notation \(TOON\) Hopes to Cut LLM Costs by Reducing Token Consumption](https://daily.dev/posts/new-token-oriented-object-notation-toon-hopes-to-cut-llm-costs-by-reducing-token-consumption-ql61xzg14) · InfoQ · 3 upvotes · 0 comments
- [Cutting tool output tokens in Microsoft Agent Framework with TOON](https://daily.dev/posts/cutting-tool-output-tokens-in-microsoft-agent-framework-with-toon-qoolbmkzj) · The Art of Simplicity · 0 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#context-engineering](https://daily.dev/tags/context-engineering)

[View this post on daily.dev](https://daily.dev/posts/cut-coding-agent-token-use-with-better-tool-output-jloud5ll6)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Cut coding agent token use with better tool output","url":"https://daily.dev/posts/cut-coding-agent-token-use-with-better-tool-output-jloud5ll6","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/cut-coding-agent-token-use-with-better-tool-output-jloud5ll6"},"datePublished":"2026-08-31T15:01:53.396Z","dateModified":"2026-09-14T07:08:46.849Z","description":"Reducing AI coding agent costs isn't just about model choice or prompt length; the format of tool output also drives token consumption. Verbose JSON repeats...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ed1e19c374959e4f1bd77cb8b561d5f7?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ed1e19c374959e4f1bd77cb8b561d5f7?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"The New Stack","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The New Stack","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/newstack","url":"https://daily.dev/sources/newstack"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/cut-coding-agent-token-use-with-better-tool-output-jloud5ll6","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,context-engineering","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The New Stack","item":"https://daily.dev/sources/newstack"},{"@type":"ListItem","position":3,"name":"Cut coding agent token use with better tool output"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/cut-coding-agent-token-use-with-better-tool-output-jloud5ll6#faq","mainEntity":[{"@type":"Question","name":"What is TOON format and how does it reduce token usage compared to JSON for AI agents?","acceptedAnswer":{"@type":"Answer","text":"TOON (Token-Oriented Object Notation) is a lossless encoding that keeps a schema-like header for a uniform array and sends each record as a row, so field names appear once instead of repeating for every entry. In a 25-issue comparison using the Sonar CLI, TOON used 49% fewer characters than pretty-printed JSON and 33% fewer than minified JSON, with published benchmarks also reporting lower token usage on uniform tabular datasets with comparable retrieval accuracy. Engineers tuning agent costs can follow ongoing coverage of formats like TOON on daily.dev."}},{"@type":"Question","name":"When should I use JSON versus a compact format like TOON for AI agent tool outputs?","acceptedAnswer":{"@type":"Answer","text":"JSON remains the better choice for nested or irregular data, and for scripts or API clients that expect its familiar structure. A compact, schema-first format such as TOON is better suited when an LLM must read many uniform records with the same fields repeatedly, since it strips repeated field-name scaffolding while keeping all values intact and validating fields for the model. Teams weighing data formats for agent workflows can track this trade-off discussion on daily.dev."}}]}
```

