cd /news/developer-tools/i-was-paying-to-send-27-unused-tools… Β· home β€Ί topics β€Ί developer-tools β€Ί article
[ARTICLE Β· art-110082] src=dev.to β†— pub= topic=developer-tools verified=true sentiment=↑ positive

I was paying to send 27 unused tools to Claude. So I filtered them.

A developer built a proxy that filters unused tool definitions from requests sent to Claude Code, cutting their monthly API bill from $200 to $50. The proxy classifies user messages into categories and forwards only the relevant tools, reducing tokens per request by 75%. The project is available on GitHub as dynamic-tool-proxy.

read4 min views9 publishedAug 25, 2026

I stared at my Anthropic bill. $200. For one month. Of Claude Code.

Not because I was doing anything special. Just... regular coding. But here's the thing nobody tells you:

Claude Code sends 27 tool definitions with every single request.

27 JSON schemas. Every turn. Even if you're just fixing a typo in a CSS file.

I was paying to send GitHub tools, Context tools, IDE tools, agent tools... when all I needed was Read

, Edit

, and Grep

.

So I built a proxy. A dumb, simple proxy that sits between my editor and the API. It reads my message, figures out what tools I actually need, and strips the rest before it reaches the model.

Cost went from $200 to $50. Same code. Same quality.

Here's how.

Every AI coding tool works the same way. They have a bunch of built-in tools. File reading, bash execution, web search, git operations, context providers, IDE integration.

And they send all of them to the LLM on every request.

Claude Code has 27 tools. Cursor has similar. Windsurf too.

When you say "fix the nav labels in pricing.html", here's what happens:

Edit

)That's like printing a 100-page menu when you're ordering a coffee.

One thing. It filters tool definitions.

Client sends 27 tools
    ↓
Proxy reads your message
    ↓
Proxy figures out what tools you need (6)
    ↓
Proxy forwards only those 6
    ↓
Provider responds normally

That's it. No magic. No LLM calls. Just regex matching and list filtering.

The proxy looks at your message and matches keywords:

"fix the nav labels in pricing.html"

regex "fix"     β†’ file_edit: +2
regex "change"  β†’ file_edit: +1  
regex "html"    β†’ file_edit: +1

category = file_edit (score: 4)

Then it sends only the tools for that category:

KEEP: Read, Edit, Grep, Glob, Bash, Write
DROP: 21 others (GitHub, IDE, Context7, etc.)
WITHOUT proxy:
  27 tools  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  ~1,200 tokens

WITH proxy:
   6 tools  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  ~300 tokens

Saved: ~900 tokens per request (75%)

Same model. Same quality. Just fewer schemas.

git clone https://github.com/dvcoolarun/dynamic-tool-proxy
cd dynamic-tool-proxy

pip install fastapi httpx uvicorn

python3 standalone_proxy.py

Then point your editor at it:

ANTHROPIC_BASE_URL=http://localhost:8090 claude

export ANTHROPIC_BASE_URL=http://localhost:8090

That's it. No API keys. No cloud accounts. No config files.

The proxy listens on port 8090. Your editor thinks it's talking to Anthropic. The proxy strips the tools and forwards the request.

The proxy classifies your message into one of 7 categories:

Category Tools Sent When It Triggers
file_edit Read, Edit, Grep, Glob, Bash, Write "fix", "change", "edit", file extensions
search Read, Grep, Glob, ListDirectory "find", "search", "where is"
git Bash, Read, Grep, Glob "commit", "push", "branch", "git"
debug Read, Grep, Bash, Glob "error", "bug", "why", "broken"
web WebFetch, WebSearch, Read "url", "http", "website"
arch Read, Grep, Glob, Bash, Agent "refactor", "structure", "design"
full All tools Ambiguous messages (fallback)

Ambiguous messages get all tools. No quality loss. Just in case.

I tracked it for a week. Here's what I saw:

Metric Before After Savings
Tokens per request 1,200 300 75%
Requests per day 100 100 β€”
Tokens saved per day β€” 90,000 β€”
Monthly cost saved β€” β€” $150

At 100 requests per day, that's 2.7 million tokens per month you're not paying for.

Clients: Claude Code, Cursor, Windsurf, Cline, OpenCode, anything that uses Anthropic format.

Providers: Anthropic API, AWS Bedrock, Google Vertex, OpenAI-compatible, anything that accepts Anthropic format.

You don't need a specific provider. Point it at whatever you're already using.

RTK (if you're using it) solves a different problem:

Dynamic Tool Proxy RTK
What it filters Tool definitions (schemas) Tool outputs (results)
When it filters Before request sends After tool runs
Savings ~12k tokens per request Varies by output size

They're complementary. Use both for maximum savings.

1. Most developers don't check their token usage

They see the bill and accept it. They don't realize they're paying to send unused schemas to the model.

2. The biggest win is boring

It's just filtering a list. No LLM calls. No complex logic. Just "do you need this tool? no? remove it."

3. Local-first wins for developer tools

Developers want control. They want to see what's happening. They don't want another SaaS account with another API key.

4. Regex is enough

I thought I'd need LLM classification. I don't. Regex catches 90% of cases. Ambiguous messages fall back to full tool set. No quality loss.

GitHub: https://github.com/dvcoolarun/dynamic-tool-proxy

MIT license. Free forever. Your data stays local.

Star it if this saves you money.

Drop a comment. I'll answer every one.

Edit: Added streaming support. The proxy now passes through SSE streams unchanged.

── more in #developer-tools 4 stories Β· sorted by recency
── more on @anthropic 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/i-was-paying-to-send…] indexed:0 read:4min 2026-08-25 Β· β€”