feat: add TOON output format for token-efficient LLM responses#145
Merged
feat: add TOON output format for token-efficient LLM responses#145
Conversation
- Add @toon-format/toon package for Token-Oriented Object Notation
- TOON is now the default output format (30-60% fewer tokens than JSON)
- Add outputFormat parameter to switch between 'toon' (default) and 'json'
- Update tool descriptions with cost optimization guidance
- Add schema discovery pattern guidance for AI to explore fields first
- Fallback to JSON automatically if TOON conversion fails
TOON format example:
[2]{id,name,key}:
"327682",Codashop,SHOP
"16711683",Codapay,PAY
vs JSON:
[{"id":"327682","name":"Codashop","key":"SHOP"},...]
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
github-actions bot
pushed a commit
that referenced
this pull request
Nov 30, 2025
# [3.1.0](v3.0.0...v3.1.0) (2025-11-30) ### Features * add TOON output format for token-efficient LLM responses ([#145](#145)) ([33ffa7b](33ffa7b))
|
🎉 This PR is included in version 3.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
outputFormatparameter allowing AI to choose betweentoon(default) andjsonChanges
package.json@toon-format/toondependencysrc/utils/toon.util.tssrc/utils/toon.util.test.tssrc/utils/jq.util.tstoOutputString(data, useToon)functionsrc/tools/atlassian.api.types.tsoutputFormatparametersrc/controllers/atlassian.api.controller.tsoutputFormatparametersrc/cli/atlassian.api.cli.ts-o, --output-formatCLI optionsrc/tools/atlassian.api.tool.tsOutput Comparison
TOON (default, 57% smaller):
JSON (optional):
[{"id":"327682","name":"Codashop","key":"SHOP"},{"id":"16711683","name":"Codapay","key":"PAY"}]AI Guidance in Tool Descriptions
Tools now include:
jqfilterlimitparameter recommendationsTest plan
outputFormat: "json"Note
Introduces TOON as the default response format with optional JSON, adds CLI/output schema support, and updates tools/docs with cost-optimization guidance.
outputFormat.utils/toon.util.ts(dynamic import, JSON fallback) andtoToonOrJson/toToonOrJsonSynchelpers.utils/jq.util.ts: addtoOutputStringto route TOON/JSON output.controllers/atlassian.api.controller.ts: respectoutputFormatacross GET/POST/PUT/PATCH/DELETE.-o, --output-formatto read/write commands incli/atlassian.api.cli.ts.tools/atlassian.api.types.ts: addOutputFormatto schemas.tools/atlassian.api.tool.ts: update descriptions with cost-optimization, schema discovery, and examples; minor path/examples tweaks.@toon-format/tooninpackage.json.utils/toon.util.test.tsfor TOON/JSON fallback behavior.Written by Cursor Bugbot for commit 540ae96. This will update automatically on new commits. Configure here.