Token saving
Updated on 3 November 2026.
Compress tool results before they reach the model, so agents use fewer tokens on each MCP call.
How the LLM Gateway and MCP Gateway rewrite JSON, HTML, Markdown and verbose text into fewer tokens before it reaches the model.
YouTube All videosChoose the instructions for the mode that governs your MCP Gateway. See Switching from classic settings for what happens to stored settings when the engine is on.
- Classic settings
- Policy Engine
Configure it on the server
The Strategies card reads: "Rewrites tool results on the way back to the client to cut model token usage." New servers have every strategy off.
Strategies
Turn on the strategies that match what the server returns, then click Save settings in the footer. The Active strategies bar and the section list (for example 2 of 4 strategies on) show how many are on.
Token saving runs after guardrails, so detections are made on the full tool result. The four strategies are the same methods the LLM Gateway applies to requests; see LLM Gateway token saving for a before-and-after example of each.
Going further with the Policy Engine
Open Govern > Policy Engine > MCP Gateway > Controls > Token Savings. Published policies govern tool-result transforms while the engine is on; stored classic values are used when it is off.
- Choose a recipe for a transform or start a blank rule in its section.
- Choose Applies to: a server, tool, person, Smart Group, agent, or route.
- Set only the switches you want to change, check Reads as, and Save to draft.
- Test and publish the change.
Each switch resolves independently: highest numeric priority wins, with On winning ties. An Off exemption must outrank the matching On rule. With no rule, responses return as the server sends them.
Base64 stripping removes information rather than merely shortening its representation. Enable it only where the model does not need the encoded payload.
Open Activity to review observed activity for this control. OneMCP Features separately controls dynamic discovery and short tool lists.
Where savings show
OneMCP saves tokens too
OneMCP reduces the tokens agents use to discover tools. With dynamic tool calling on, an agent receives a small set of tools instead of every server's full tool list:
Set it with the OneMCP endpoint button in the MCP Gateway header, under Dynamic tool calling (User preference, Always on or Always off).
To shorten the tool list itself, per server and on the server's own address too, see Tool lists: the server's most-used tools in full and every other tool one search away.
Related
- Group and user rules - turn strategies on or off for a smart group or user.
- Security guardrails - scan tool results before they are shortened.
- Tool lists - send a server's most-used tools and keep the rest one search away.
- OneMCP - one endpoint with dynamic tool calling.
- LLM Gateway token saving - the shared compression methods.
- Policy Engine overview - how cards, stages and priorities work.