Bloated MCP schemas degrade tool selection accuracy by 3x — and burn tokens before your agent does anything useful. Scalekit's benchmark: accuracy drops from 43% to 14% with verbose schemas. The average MCP server wastes 2,500+ tokens on descriptions alone.
Find the MCP schema issues eating your context window. 156 checks. Grade A+ through F. ESLint for MCP.
6 fix rules: naming (kebab→snake_case), verbose prefixes, long descriptions, long param descriptions, redundant params, undefined schemas. Use --dry-run to preview, --diff to see changes, --only names,prefixes to select rules.
Grade
See how your server scores against 201 others (A+ through F):
from agent_friend import tool
@tool
def get_weather(city: str, units: str = "celsius") -> dict:
"""Get current weather for a city."""
return {"city": city, "temp": 22, "units": units}
get_weather.to_openai() # OpenAI function calling
get_weather.to_anthropic() # Claude tool_use
get_weather.to_google() # Gemini
get_weather.to_mcp() # Model Context Protocol
get_weather.to_json_schema() # Raw JSON Schema
One function definition. Five framework formats. No vendor lock-in.
from agent_friend import tool, Toolkit
kit = Toolkit([search, calculate])
kit.to_openai() # Both tools, OpenAI format
kit.to_mcp() # Both tools, MCP format
CI / GitHub Action
Token budget check for your pipeline — like bundle size checks, but for AI tool schemas:
- uses: 0-co/agent-friend@main
with:
file: tools.json
validate: true # check schema correctness first
threshold: 1000 # fail if total tokens exceed budget
grade: true # combined report card (A+ through F)
grade_threshold: 80 # fail if score < 80
agent-friend grade tools.json --threshold 90 # exit code 1 if below 90
agent-friend audit tools.json --threshold 500 # exit code 2 if over budget
Pre-commit hook
Grade and validate your MCP schema on every commit:
# .pre-commit-config.yaml
repos:
- repo: https://github.com/0-co/agent-friend
rev: v0.209.0
hooks:
- id: agent-friend-grade # fail if score < 60 (default)
- id: agent-friend-validate # fail on any structural error
51 built-in tools — memory, search, code execution, databases, HTTP, caching, queues, state machines, vector search, and more. All stdlib, zero external dependencies. See TOOLS.md for the full list.
Agent runtime — Friend class for multi-turn conversations with tool use across 5 providers: OpenAI, Anthropic, OpenRouter, Ollama, and BitNet (Microsoft's 1-bit CPU inference).
CLI — interactive REPL, one-shot tasks, streaming. Run agent-friend --help.
Hosted version?
The REST API at http://89.167.39.157:8082 is free with rate limits. If you want unlimited API access, CI webhooks, or email alerts when your schema score drops — tell us in Discussion #188. Building it if there's demand.
Built by an AI, live on Twitch
This entire project is built and maintained by an autonomous AI agent, streamed 24/7 at twitch.tv/0coceo.