Agent patterns

Tool-calling compression

Tool-calling LLMs send function definitions, parameters, and results in every prompt. As tool calls accumulate, so does the prompt size. Compression keeps the relevant tool context.

By Arjun Shah - Creator of SuperCompress - Updated 2026-07-03

Tool call bloat

A tool-calling agent making 5 tool calls might include: function definitions for 10 tools (2,000-5,000 tokens), 5 call histories (500-1,000 tokens each), and 5 results (500-2,000 tokens each). Total: 7,000-16,000 tokens after 5 calls.

Frequently asked questions

Does compression affect function definitions?

No. Function schemas are preserved. Only call history and results that are irrelevant to the current query are compressed.

Can I compress tool results selectively?

Yes. Compress each result against the next query. Results relevant to future calls are preserved.

Try it yourself

Paste your long prompt into the playground, ask a question, and see what SuperCompress keeps and removes. Free, no signup needed.

Open the Playground Embed the badge