OP, I'm very interested in seeing an actual comparison ran through a common tokenizer of tool calls. I think you'll find different results than what you intended for this tool to be. You've mixed up tokens with characters on your screen.
debazel 35 minutes ago [-]
Why is it replacing true/false with T/F? true/false is already 1 token in all tokenizer I've seen. Even worse is replacing null with ∅. ∅ is a special unicode symbol that takes up 2 tokens compared to the 1 token for null...
AmazingTurtle 26 minutes ago [-]
↲ is also two tokens instead of a simple \n lmao
stephantul 2 minutes ago [-]
I think that some of these choices (as others have commented) show that the author has not investigated how tokenization works.
Tokenization is not some black box, you can run tokenizers and check them.
Loic 54 minutes ago [-]
I spent more than one week, as a side project, to add an MCP server to my Cheméo website. Only 4 tools.
It took me way more time than expected, I was thinking: "Just wrap the REST API, 2h, done".
The MCP payload has nothing to do with the REST API one. Because you need to make it interpretable and context efficient even so it is structured data.
It was really interesting work and I suppose very little people are taking the time to rethink what is sent over the wire while creating a MCP server. If so, we would not have MCPs with the minimal payload being 500kB of JSON soup.
If you send my MCP through your "save token filter", I can guarantee you, that you will have trash down the line.
Zinu 1 hours ago [-]
I don’t think the Show Me section makes sense, the TOON variant clearly doesn’t have the same information. And the examples in the “How TOON works” section focuses on number of characters instead of tokens. I would think “null” is a single token anyway, why bother replacing it with an uncommon character?
ameshkov 1 hours ago [-]
I made an MCP proxy with a similar idea in the past: replace a ton of tools that consume tokens with just two (get_tool_schema, invoke_tool) - https://github.com/ameshkov/mcp-compress-router
One thing that I noticed is that it’s often better to return tool names with argument names, i.e. return “search_web(query)” instead of just “search_web” when listing tools. Otherwise models often tend to hallucinate argument names and an extra turn is required to correct the mistake.
One additional advantage that such tools provide is that when you use different coding agents you don’t have to set up all the MCP servers in every agent, you just set up one (or point the agent to the cli like in this project).
wannabe44 1 hours ago [-]
I am not going to trust a single number thrown by these AI hustlers written in that salesman voice.
Leave alone 97%.
> Your agent calls 20 tools. Each returns 500-3,000 tokens wrapped in {"content":[{"type":"text","text":"..."}]}.
This is a problem with your tool design. Most MCPs are fully vibe coded without any thought about tool selection.
> On a 128K context window, that's 30-55% gone. Not on work. On syntax.
Tool output is not "syntax" you donkey clanker.
Again, use the code approach, let the LLM filter out the JSON using tools. This TOON thing is just vibes. Most of the time your tool output should not even be JSON. It should be well formatted markdown. In cases where it's large structured data, your LLM should have tools (code / jq) to dissect it. So TOON is pointless.
alxhslm 52 minutes ago [-]
Don’t quite see the point of this. It is well known that MCP is a bit bloated for coding agents at least.
But, why not just use CLIs for each tool? That seems to be where things are going anyway
And using MCP as an internal communication method seems odd when you could use the APIs directly
kk3838368397373 20 minutes ago [-]
sorry, is Headroom still a thing? What happened to it? Is anyone still using it? so many things , which one is actually working :/ idk this ai world
notpushkin 34 minutes ago [-]
Cool! Can we get a human-efficient MCP CLI while at it? I want to be able to use MCP just as well as the LLMs can.
dthedavid 2 hours ago [-]
How does it work? Im building a video editor and right now it has access to nearly 100 tools. Would be good to learn the techniques you used to make tool discovery more efficient.
arjie 2 hours ago [-]
The readme has some examples for what it does. It doesn’t list the entire schema (noisy). Instead it uses shorthand. Perhaps a sufficiently smart agent can do this.
bobkinartem 54 minutes ago [-]
I thought Codex and Claude Code agents are already token-efficient so writing agents that saves tokens is pointless.
bythreads 1 hours ago [-]
Sorry, isnt this just compression? Lookups burn tokens just on the other end?
hnlmorg 1 hours ago [-]
I really think we’ve missed a trick using JSON instead of SExpressions as the default marshaller for AI tool use.
vasco 1 hours ago [-]
I really doubt that null and \n make any sense to replace with non ascii symbols. They are both most likely already a token only and for other purposes at least \n becomes larger as a symbol.
kepalabergetar3 27 minutes ago [-]
[dead]
Rendered at 07:31:11 GMT+0000 (Coordinated Universal Time) with Vercel.
Tokenization is not some black box, you can run tokenizers and check them.
It took me way more time than expected, I was thinking: "Just wrap the REST API, 2h, done".
The MCP payload has nothing to do with the REST API one. Because you need to make it interpretable and context efficient even so it is structured data.
It was really interesting work and I suppose very little people are taking the time to rethink what is sent over the wire while creating a MCP server. If so, we would not have MCPs with the minimal payload being 500kB of JSON soup.
If you send my MCP through your "save token filter", I can guarantee you, that you will have trash down the line.
One thing that I noticed is that it’s often better to return tool names with argument names, i.e. return “search_web(query)” instead of just “search_web” when listing tools. Otherwise models often tend to hallucinate argument names and an extra turn is required to correct the mistake.
One additional advantage that such tools provide is that when you use different coding agents you don’t have to set up all the MCP servers in every agent, you just set up one (or point the agent to the cli like in this project).
Leave alone 97%.
> Your agent calls 20 tools. Each returns 500-3,000 tokens wrapped in {"content":[{"type":"text","text":"..."}]}.
This is a problem with your tool design. Most MCPs are fully vibe coded without any thought about tool selection.
> On a 128K context window, that's 30-55% gone. Not on work. On syntax.
Tool output is not "syntax" you donkey clanker.
Again, use the code approach, let the LLM filter out the JSON using tools. This TOON thing is just vibes. Most of the time your tool output should not even be JSON. It should be well formatted markdown. In cases where it's large structured data, your LLM should have tools (code / jq) to dissect it. So TOON is pointless.
But, why not just use CLIs for each tool? That seems to be where things are going anyway
And using MCP as an internal communication method seems odd when you could use the APIs directly