<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arun </title>
    <description>The latest articles on DEV Community by Arun  (@dev_dc9eca0093606c9a4162e).</description>
    <link>https://dev.to/dev_dc9eca0093606c9a4162e</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4093624%2Fb267ed4f-c935-405f-876f-4c8a27a942e8.png</url>
      <title>DEV Community: Arun </title>
      <link>https://dev.to/dev_dc9eca0093606c9a4162e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dev_dc9eca0093606c9a4162e"/>
    <language>en</language>
    <item>
      <title>I was paying to send 27 unused tools to Claude. So I filtered them.</title>
      <dc:creator>Arun </dc:creator>
      <pubDate>Tue, 25 Aug 2026 11:08:55 +0000</pubDate>
      <link>https://dev.to/dev_dc9eca0093606c9a4162e/i-was-paying-to-send-27-unused-tools-to-claude-so-i-filtered-them-48k1</link>
      <guid>https://dev.to/dev_dc9eca0093606c9a4162e/i-was-paying-to-send-27-unused-tools-to-claude-so-i-filtered-them-48k1</guid>
      <description>&lt;p&gt;&lt;em&gt;I stared at my Anthropic bill. $200. For one month. Of Claude Code.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Not because I was doing anything special. Just... regular coding. But here's the thing nobody tells you:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Code sends 27 tool definitions with every single request.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;27 JSON schemas. Every turn. Even if you're just fixing a typo in a CSS file.&lt;/p&gt;

&lt;p&gt;I was paying to send GitHub tools, Context tools, IDE tools, agent tools... when all I needed was &lt;code&gt;Read&lt;/code&gt;, &lt;code&gt;Edit&lt;/code&gt;, and &lt;code&gt;Grep&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Cost went from $200 to $50. Same code. Same quality.&lt;/p&gt;

&lt;p&gt;Here's how.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem Nobody Talks About
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;And they send &lt;strong&gt;all of them&lt;/strong&gt; to the LLM on every request.&lt;/p&gt;

&lt;p&gt;Claude Code has 27 tools. Cursor has similar. Windsurf too.&lt;/p&gt;

&lt;p&gt;When you say "fix the nav labels in pricing.html", here's what happens:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Your client builds a request with 27 tool schemas&lt;/li&gt;
&lt;li&gt;That's ~1,200 tokens of JSON definitions&lt;/li&gt;
&lt;li&gt;The LLM reads all 27, picks 1 (usually &lt;code&gt;Edit&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;You pay for the other 26 doing nothing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's like printing a 100-page menu when you're ordering a coffee.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Proxy Actually Does
&lt;/h2&gt;

&lt;p&gt;One thing. It filters tool definitions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Client sends 27 tools
    ↓
Proxy reads your message
    ↓
Proxy figures out what tools you need (6)
    ↓
Proxy forwards only those 6
    ↓
Provider responds normally
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. No magic. No LLM calls. Just regex matching and list filtering.&lt;/p&gt;

&lt;h3&gt;
  
  
  The classification
&lt;/h3&gt;

&lt;p&gt;The proxy looks at your message and matches keywords:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fix the nav labels in pricing.html&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="n"&gt;regex&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fix&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;     &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;file_edit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="n"&gt;regex&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;change&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;  &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;file_edit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;  
&lt;span class="n"&gt;regex&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;html&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;    &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;file_edit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;

&lt;span class="n"&gt;category&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;file_edit &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then it sends only the tools for that category:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;KEEP: Read, Edit, Grep, Glob, Bash, Write
DROP: 21 others (GitHub, IDE, Context7, etc.)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The result
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WITHOUT proxy:
  27 tools  ████████████████████████████████  ~1,200 tokens

WITH proxy:
   6 tools  ██████████░░░░░░░░░░░░░░░░░░░░░░  ~300 tokens

Saved: ~900 tokens per request (75%)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same model. Same quality. Just fewer schemas.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Use It
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone&lt;/span&gt;
git clone https://github.com/dvcoolarun/dynamic-tool-proxy
&lt;span class="nb"&gt;cd &lt;/span&gt;dynamic-tool-proxy

&lt;span class="c"&gt;# Install&lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;fastapi httpx uvicorn

&lt;span class="c"&gt;# Run&lt;/span&gt;
python3 standalone_proxy.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then point your editor at it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Claude Code&lt;/span&gt;
&lt;span class="nv"&gt;ANTHROPIC_BASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://localhost:8090 claude

&lt;span class="c"&gt;# Or set it permanently&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;ANTHROPIC_BASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://localhost:8090
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. No API keys. No cloud accounts. No config files.&lt;/p&gt;

&lt;p&gt;The proxy listens on port 8090. Your editor thinks it's talking to Anthropic. The proxy strips the tools and forwards the request.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Categories It Knows
&lt;/h2&gt;

&lt;p&gt;The proxy classifies your message into one of 7 categories:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Tools Sent&lt;/th&gt;
&lt;th&gt;When It Triggers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;file_edit&lt;/td&gt;
&lt;td&gt;Read, Edit, Grep, Glob, Bash, Write&lt;/td&gt;
&lt;td&gt;"fix", "change", "edit", file extensions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;search&lt;/td&gt;
&lt;td&gt;Read, Grep, Glob, ListDirectory&lt;/td&gt;
&lt;td&gt;"find", "search", "where is"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;git&lt;/td&gt;
&lt;td&gt;Bash, Read, Grep, Glob&lt;/td&gt;
&lt;td&gt;"commit", "push", "branch", "git"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;debug&lt;/td&gt;
&lt;td&gt;Read, Grep, Bash, Glob&lt;/td&gt;
&lt;td&gt;"error", "bug", "why", "broken"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;web&lt;/td&gt;
&lt;td&gt;WebFetch, WebSearch, Read&lt;/td&gt;
&lt;td&gt;"url", "http", "website"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;arch&lt;/td&gt;
&lt;td&gt;Read, Grep, Glob, Bash, Agent&lt;/td&gt;
&lt;td&gt;"refactor", "structure", "design"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;full&lt;/td&gt;
&lt;td&gt;All tools&lt;/td&gt;
&lt;td&gt;Ambiguous messages (fallback)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Ambiguous messages get all tools. No quality loss. Just in case.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Numbers
&lt;/h2&gt;

&lt;p&gt;I tracked it for a week. Here's what I saw:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;After&lt;/th&gt;
&lt;th&gt;Savings&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tokens per request&lt;/td&gt;
&lt;td&gt;1,200&lt;/td&gt;
&lt;td&gt;300&lt;/td&gt;
&lt;td&gt;75%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Requests per day&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tokens saved per day&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;90,000&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Monthly cost saved&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;$150&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;At 100 requests per day, that's 2.7 million tokens per month you're not paying for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Works With Everything
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Clients:&lt;/strong&gt; Claude Code, Cursor, Windsurf, Cline, OpenCode, anything that uses Anthropic format.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Providers:&lt;/strong&gt; Anthropic API, AWS Bedrock, Google Vertex, OpenAI-compatible, anything that accepts Anthropic format.&lt;/p&gt;

&lt;p&gt;You don't need a specific provider. Point it at whatever you're already using.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Not Just Use RTK?
&lt;/h2&gt;

&lt;p&gt;RTK (if you're using it) solves a different problem:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Dynamic Tool Proxy&lt;/th&gt;
&lt;th&gt;RTK&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;What it filters&lt;/td&gt;
&lt;td&gt;Tool definitions (schemas)&lt;/td&gt;
&lt;td&gt;Tool outputs (results)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;When it filters&lt;/td&gt;
&lt;td&gt;Before request sends&lt;/td&gt;
&lt;td&gt;After tool runs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Savings&lt;/td&gt;
&lt;td&gt;~12k tokens per request&lt;/td&gt;
&lt;td&gt;Varies by output size&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;They're complementary. Use both for maximum savings.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Most developers don't check their token usage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;They see the bill and accept it. They don't realize they're paying to send unused schemas to the model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The biggest win is boring&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;3. Local-first wins for developer tools&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Developers want control. They want to see what's happening. They don't want another SaaS account with another API key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Regex is enough&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/dvcoolarun/dynamic-tool-proxy" rel="noopener noreferrer"&gt;https://github.com/dvcoolarun/dynamic-tool-proxy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MIT license. Free forever. Your data stays local.&lt;/p&gt;

&lt;p&gt;Star it if this saves you money.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions?
&lt;/h2&gt;

&lt;p&gt;Drop a comment. I'll answer every one.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Edit: Added streaming support. The proxy now passes through SSE streams unchanged.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
