<?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: Yevhenii</title>
    <description>The latest articles on DEV Community by Yevhenii (@yevheniidev).</description>
    <link>https://dev.to/yevheniidev</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%2F4022986%2Fa2839dab-0bb5-442a-a332-7e73c260e6d7.png</url>
      <title>DEV Community: Yevhenii</title>
      <link>https://dev.to/yevheniidev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yevheniidev"/>
    <language>en</language>
    <item>
      <title>Why Your AI Agent Is Reading 10x More Data Than It Needs</title>
      <dc:creator>Yevhenii</dc:creator>
      <pubDate>Sun, 12 Jul 2026 20:14:14 +0000</pubDate>
      <link>https://dev.to/yevheniidev/why-your-ai-agent-is-reading-10x-more-data-than-it-needs-480n</link>
      <guid>https://dev.to/yevheniidev/why-your-ai-agent-is-reading-10x-more-data-than-it-needs-480n</guid>
      <description>&lt;p&gt;Everyone wants smarter AI agents.&lt;/p&gt;

&lt;p&gt;We compare models.&lt;br&gt;
We tweak prompts.&lt;br&gt;
We experiment with system instructions.&lt;/p&gt;

&lt;p&gt;But after spending months working with MCP tools like Playwright and Figma, I realized something surprising:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The biggest bottleneck wasn't the model. It was the data we were feeding it.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hidden Problem
&lt;/h2&gt;

&lt;p&gt;Imagine asking an AI agent a simple question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Is the Login button visible?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That sounds like a tiny task.&lt;/p&gt;

&lt;p&gt;Yet many browser tools respond with something closer to this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the complete accessibility tree&lt;/li&gt;
&lt;li&gt;every DOM node&lt;/li&gt;
&lt;li&gt;dozens of element attributes&lt;/li&gt;
&lt;li&gt;hidden elements&lt;/li&gt;
&lt;li&gt;unrelated page metadata&lt;/li&gt;
&lt;li&gt;viewport information&lt;/li&gt;
&lt;li&gt;screenshot metadata&lt;/li&gt;
&lt;li&gt;repeated values from previous snapshots&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of receiving the few bytes actually needed to answer the question, the model often receives hundreds of kilobytes.&lt;/p&gt;

&lt;p&gt;The same thing happens with design tools.&lt;/p&gt;

&lt;p&gt;Ask for the color of a button in Figma, and you might receive an entire page hierarchy containing thousands of nodes.&lt;/p&gt;

&lt;p&gt;The AI only needed one component.&lt;/p&gt;

&lt;p&gt;It received the entire design.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bigger Context Doesn't Mean Better Results
&lt;/h2&gt;

&lt;p&gt;There's a common assumption that giving an LLM more information always improves accuracy.&lt;/p&gt;

&lt;p&gt;In practice, the opposite often happens.&lt;/p&gt;

&lt;p&gt;Large tool responses introduce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;irrelevant context&lt;/li&gt;
&lt;li&gt;duplicated information&lt;/li&gt;
&lt;li&gt;longer reasoning time&lt;/li&gt;
&lt;li&gt;higher token usage&lt;/li&gt;
&lt;li&gt;increased latency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model spends part of its context window understanding data that has nothing to do with the user's request.&lt;/p&gt;

&lt;p&gt;That's not intelligence.&lt;/p&gt;

&lt;p&gt;That's overhead.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Snapshot Problem
&lt;/h2&gt;

&lt;p&gt;Browser snapshots are one of the biggest contributors.&lt;/p&gt;

&lt;p&gt;Imagine an agent performing this workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open page&lt;/li&gt;
&lt;li&gt;Click Login&lt;/li&gt;
&lt;li&gt;Wait&lt;/li&gt;
&lt;li&gt;Fill email&lt;/li&gt;
&lt;li&gt;Fill password&lt;/li&gt;
&lt;li&gt;Click Continue&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After every action, the browser sends another complete snapshot.&lt;/p&gt;

&lt;p&gt;But what actually changed?&lt;/p&gt;

&lt;p&gt;Usually only a handful of nodes.&lt;/p&gt;

&lt;p&gt;The rest of the page is identical.&lt;/p&gt;

&lt;p&gt;Yet the entire snapshot is transmitted again.&lt;/p&gt;

&lt;p&gt;It's similar to downloading an entire Git repository after changing a single line of code.&lt;/p&gt;

&lt;p&gt;We solved this problem years ago in software engineering with incremental updates and diffs.&lt;/p&gt;

&lt;p&gt;Many AI tools still don't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Noise Is Expensive
&lt;/h2&gt;

&lt;p&gt;People usually calculate the cost of AI using model pricing.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GPT costs X per million tokens.&lt;/li&gt;
&lt;li&gt;Claude costs Y per million tokens.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But those calculations ignore something important.&lt;/p&gt;

&lt;p&gt;Every unnecessary byte produced by a tool also becomes part of the model's input.&lt;/p&gt;

&lt;p&gt;If your tools generate 10× more data than necessary, you're effectively paying for that noise.&lt;/p&gt;

&lt;p&gt;And you're paying for it repeatedly throughout the conversation.&lt;/p&gt;

&lt;p&gt;The model has no way to know which information is useful until it has already processed it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Smarter Tools Beat Smarter Prompts
&lt;/h2&gt;

&lt;p&gt;Prompt engineering gets a lot of attention.&lt;/p&gt;

&lt;p&gt;Tool engineering gets almost none.&lt;/p&gt;

&lt;p&gt;But if your agent only receives relevant information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;responses become faster&lt;/li&gt;
&lt;li&gt;token usage drops&lt;/li&gt;
&lt;li&gt;context stays cleaner&lt;/li&gt;
&lt;li&gt;reasoning becomes more focused&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sometimes the best optimization isn't changing the prompt.&lt;/p&gt;

&lt;p&gt;It's changing what reaches the model in the first place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;p&gt;Working with browser automation and design MCP servers taught me that most optimization opportunities exist before the model even starts thinking.&lt;/p&gt;

&lt;p&gt;Instead of asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How can I make the model smarter?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;a better question might be:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Why am I sending it all this data?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you start looking at tool responses instead of prompts, you'll often discover that most of the context window is occupied by information nobody actually needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Large language models are becoming increasingly capable.&lt;/p&gt;

&lt;p&gt;But they're still constrained by the quality of their inputs.&lt;/p&gt;

&lt;p&gt;As AI agents become more common, I think we'll spend less time optimizing prompts and more time optimizing the tools that feed those prompts.&lt;/p&gt;

&lt;p&gt;Because sometimes the fastest, cheapest, and most accurate model isn't the one with the largest context window.&lt;/p&gt;

&lt;p&gt;It's the one that never had to read hundreds of unnecessary kilobytes in the first place.&lt;/p&gt;




&lt;p&gt;Have you ever inspected the raw responses your AI tools send to the model?&lt;/p&gt;

&lt;p&gt;The results might surprise you.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>performance</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I Built an MCP Proxy That Reduces Playwright and Figma Context for AI Agents</title>
      <dc:creator>Yevhenii</dc:creator>
      <pubDate>Thu, 09 Jul 2026 15:35:18 +0000</pubDate>
      <link>https://dev.to/yevheniidev/i-built-an-mcp-proxy-that-reduces-playwright-and-figma-context-for-ai-agents-48g3</link>
      <guid>https://dev.to/yevheniidev/i-built-an-mcp-proxy-that-reduces-playwright-and-figma-context-for-ai-agents-48g3</guid>
      <description>&lt;p&gt;Over the past few months I've been using Claude Code heavily with Playwright and Figma.&lt;/p&gt;

&lt;p&gt;At first everything worked well, but after longer sessions I started noticing a few recurring problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Playwright browser snapshots were consuming hundreds of KB of context.&lt;/li&gt;
&lt;li&gt;Figma responses often contained much more information than the agent actually needed.&lt;/li&gt;
&lt;li&gt;Browser sessions occasionally crashed, forcing the agent to start over.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these problems were caused by the MCP servers themselves.&lt;/p&gt;

&lt;p&gt;They were simply returning everything they were designed to return.&lt;/p&gt;

&lt;p&gt;The issue was that AI agents pay for every token they receive.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Idea
&lt;/h2&gt;

&lt;p&gt;Instead of modifying every existing MCP server, I wondered:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What if there was a transparent proxy between the AI agent and the MCP server?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That idea became &lt;strong&gt;PlayGuard&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI Agent
    │
    ▼
PlayGuard
    │
    ▼
Playwright MCP / Figma MCP / ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The proxy intercepts requests and responses before they reach the agent.&lt;/p&gt;

&lt;p&gt;This makes it possible to optimize them without changing the original MCP server.&lt;/p&gt;

&lt;h2&gt;
  
  
  What PlayGuard Does
&lt;/h2&gt;

&lt;p&gt;Current features include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Response optimization for Playwright&lt;/li&gt;
&lt;li&gt;Response optimization for Figma&lt;/li&gt;
&lt;li&gt;Automatic Playwright session recovery&lt;/li&gt;
&lt;li&gt;Response caching&lt;/li&gt;
&lt;li&gt;Configurable optimization rules&lt;/li&gt;
&lt;li&gt;Plugin architecture for additional MCP servers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Make existing MCP servers more efficient for AI agents.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Why It Matters
&lt;/h2&gt;

&lt;p&gt;Large language models have limited context windows.&lt;/p&gt;

&lt;p&gt;If an MCP server returns 300–500 KB of data every time the agent asks for a browser snapshot, that context disappears quickly.&lt;/p&gt;

&lt;p&gt;By removing unnecessary information before it reaches the model, the agent can spend more of its context on reasoning instead of processing redundant data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design Philosophy
&lt;/h2&gt;

&lt;p&gt;PlayGuard is intentionally transparent.&lt;/p&gt;

&lt;p&gt;It doesn't replace MCP servers.&lt;/p&gt;

&lt;p&gt;It doesn't require modifying existing tools.&lt;/p&gt;

&lt;p&gt;It simply sits in the middle and optimizes communication.&lt;/p&gt;

&lt;p&gt;That also means new optimizations can be added over time without requiring changes to Playwright, Figma, or other MCP implementations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Roadmap
&lt;/h2&gt;

&lt;p&gt;Some ideas I'm currently working on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More MCP integrations&lt;/li&gt;
&lt;li&gt;Better optimization pipelines&lt;/li&gt;
&lt;li&gt;Performance benchmarks&lt;/li&gt;
&lt;li&gt;Custom optimization plugins&lt;/li&gt;
&lt;li&gt;More intelligent caching&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Feedback Welcome
&lt;/h2&gt;

&lt;p&gt;The project is open source, and I'd appreciate any feedback or ideas.&lt;/p&gt;

&lt;p&gt;GitHub:&lt;br&gt;
&lt;a href="https://github.com/ZenyaDAR/PlayGuard" rel="noopener noreferrer"&gt;https://github.com/ZenyaDAR/PlayGuard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Website:&lt;br&gt;
&lt;a href="https://playguard.dev/" rel="noopener noreferrer"&gt;https://playguard.dev/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you find the project useful, consider giving it a ⭐ on GitHub. It helps other developers discover the project.&lt;/p&gt;

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