Labsco
MCP SERVER

agent-friend Schema Slimmer

by 0-co

Rewrites bloated tool schemas so an agent picks the right tool and pays fewer tokens doing it.

Codebase Context Packing & Compression
Summary
It attacks a cost most people never look at: the schema you pay for on every single turn.

Tool definitions ride along in the context on every request, whether or not a tool gets called, and nobody edits them after they work. A pass that shortens descriptions and fixes undefined object properties reduces both the standing token cost and the model's confusion between similar tools. The reason to reach for it is not the token count — it is that badly-named, vaguely-described tools get picked wrongly, and the fix is editorial rather than clever.

What it is

A command-line tool, not a server you connect to. You hand it a tool definition file and it hands back a cleaner one — shorter descriptions, corrected naming, constraints filled in.

What you get
  • Fix — rewrites a tool file in place, reporting each change it made
  • Naming corrections, such as hyphenated tool names rewritten to underscores
  • Filler stripped from descriptions and over-long ones trimmed
  • Missing properties added to object parameters that declared none
  • A token count before and after, so the saving is visible rather than claimed
  • A decorator that exports Python functions to several tool formats, MCP among them
Requirements

Python, installed from PyPI. MIT licensed.

Setup effort

One command — pip install agent-friend