The 20% of your AI agent's tool schemas that's pure cruft (and the one-liner to strip it)

Your AI agent re-sends every tool's JSON schema on every single turn. A surprising chunk of that — often ~20% — is non-semantic cruft: tokens that carry zero tool-selection signal, billed on every request. I found this measuring the per-turn token cost of 13 real agents (full study). Here's where the waste hides, and the one-liner to remove it. Where the cruft comes from When you generate tool schemas from code, the converter quietly adds fields the model doesn't need: Pydantic a...

Original Source

Read the full article at Dev →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.