<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sarath Chandra Bellam on Medium]]></title>
        <description><![CDATA[Stories by Sarath Chandra Bellam on Medium]]></description>
        <link>https://medium.com/@pyneuronaut?source=rss-ec4999822430------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1gkLz_RoNAPETjXrQ9lPpw.jpeg</url>
            <title>Stories by Sarath Chandra Bellam on Medium</title>
            <link>https://medium.com/@pyneuronaut?source=rss-ec4999822430------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 17:37:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pyneuronaut/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Decision Models Like Jev and OpenAI’s Decisions API Are the Answer to Tool Schema Bloat]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">What I measured at 31 tools, and why it matters more as catalogs grow.</p><p class="medium-feed-link"><a href="https://medium.com/@pyneuronaut/decision-models-like-jev-and-openais-decisions-api-are-the-answer-to-tool-schema-bloat-13e92ff96932?source=rss-ec4999822430------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@pyneuronaut/decision-models-like-jev-and-openais-decisions-api-are-the-answer-to-tool-schema-bloat-13e92ff96932?source=rss-ec4999822430------2</link>
            <guid isPermaLink="false">https://medium.com/p/13e92ff96932</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Sarath Chandra Bellam]]></dc:creator>
            <pubDate>Sun, 11 Oct 2026 08:37:55 GMT</pubDate>
            <atom:updated>2026-10-11T08:37:55.900Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Chinnaswamy Stadium Was IPL’s Batting Heaven. It Isn’t Anymore.]]></title>
            <link>https://medium.com/@pyneuronaut/chinnaswamy-stadium-was-ipls-batting-heaven-it-isn-t-anymore-626f3cfd982e?source=rss-ec4999822430------2</link>
            <guid isPermaLink="false">https://medium.com/p/626f3cfd982e</guid>
            <category><![CDATA[cricket]]></category>
            <category><![CDATA[srh]]></category>
            <category><![CDATA[dc]]></category>
            <category><![CDATA[ipl]]></category>
            <category><![CDATA[rcb]]></category>
            <dc:creator><![CDATA[Sarath Chandra Bellam]]></dc:creator>
            <pubDate>Wed, 22 Apr 2026 07:32:55 GMT</pubDate>
            <atom:updated>2026-04-22T07:32:55.682Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>For fifteen years, every commentator walking into M. Chinnaswamy Stadium has said the same thing: <em>“Expect runs. Short boundaries, thin air, true bounce — it’s a batting paradise.”</em></blockquote><p>The data says that sentence was <strong>true in 201*</strong>. It is <strong>not true in 202*</strong>.</p><p>This is the story of how a venue earned its batting-heaven reputation, how the league caught up and overtook it, and why the new batting heaven is actually in <strong>Delhi</strong>, with <strong>Hyderabad</strong> now outscoring Bangalore as the high-scoring Southern ground.</p><p>During IPL’s first decade, Chinnaswamy wasn’t just a good batting venue — it was <strong>elite</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vqWRJuVnv-WhXfh3K-ZvQw.png" /></figure><p>Look at where Hyderabad sits historically — <em>below average</em>. That’s the story this analysis is about to flip.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YTsgjLT5c0ACsUpPVl7_cA.png" /></figure><p>What made Chinnaswamy special in the pre-2020 era?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A1tCuzqsk8zetb4HrtAznA.png" /></figure><p>Chinnaswamy was #1 for sixes, #1 for 200+ totals, and #1 for death-overs scoring.</p><h3>The Shift (2023–2024): The League Catches Up</h3><p>Two structural changes reshaped IPL scoring:</p><p><strong>1. Impact Player rule (2023) : </strong>a bonus batter in the playing XI, inflating totals league-wide.</p><p><strong>2. T20 power-hitting revolution</strong> : batting intent changed across every ground, not just historically flat pitches.</p><p>The league’s average first-innings total jumped from <strong>~166 (2017–19) to ~189 (2024), </strong>a 14% leap in six years. Every flat pitch got carnage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rmdcC9m7CLPBUB_15_2dEg.png" /></figure><h3>Season-by-season: The crossover</h3><p>The absolute scores kept climbing at Chinnaswamy, so it <em>felt</em> the same. But every other venue was climbing faster. Two pivot moments stand out:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JIi6s2YH9ypIhPvntAApug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VJFfjCJkN_IjXECXBHTbfw.png" /></figure><h3>Where We Are Now (Last 3 Seasons): The Reputation Is a Hangover</h3><p>Re-rank the league using only 2024–2026 data. The hierarchy is unrecognisable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Haya6uZDZcIl0VPczWRJSw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A0YCjYdEPGcVKQK4jls7Uw.png" /></figure><p>At <strong>−0.21</strong>, Chinnaswamy is now the literal league-average first-innings venue. A batter walking in today should expect exactly what they’d get at an average IPL ground — no bonus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kJfKLv36dLpVEkJD-b-5PQ.png" /></figure><p>The bat-first winning margin dropped from <strong>40 runs to 22 runs</strong>. When the team batting first wins at Chinnaswamy, they win by nearly half the margin they used to. That’s a ground where defensibility has collapsed — or where chasing has become the sensible strategy.</p><p><strong>Arun Jaitley (Delhi) is the new batting heaven</strong>: +23.80 runs above league average. A 212-run par score. Nothing in IPL comes close.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sT5eB1MRZfnp4Bo7EkcapA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vL_Bb5XIaXUwRLAp8jikvw.png" /></figure><p>That’s <strong>235 runs per first innings in 2024, </strong>a number that, ten years ago, would have been match-winning once per season across the entire league. Jaitley now produces it <em>routinely</em>.</p><h3>Hyderabad has overtaken Bangalore as the Southern high-scoring venue</h3><p><em>This is the headline reversal. The venue that was below league average for fourteen years is now the second-hottest batting ground in IPL.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4oixuzd0LrlLHf7TNXiuSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-1AfdXS2vyJTfzqgAj6WxQ.png" /></figure><p>Historically, <strong>more than half</strong> of first innings at Hyderabad finished under 150. The venue was a bowler’s paradise. That has fundamentally flipped, shorter square boundaries, a re-prepared surface, and SRH’s aggressive template have rebuilt the ground’s identity entirely.</p><p><strong>Hyderabad is now the Southern batting heaven, not Bangalore.</strong></p><h3>How this was calculated</h3><ul><li>First-innings totals only, to remove chasing bias.</li><li>Season-adjusted: each venue compared to the league average of the same season, so the league-wide scoring boom doesn’t fake a trend.</li><li>Super-over runs excluded. Minimum 20 matches for all-time ranking, 5 for the last-3-seasons ranking.</li><li><strong>Historical = seasons ≤ 2022. Recent = 2023–2026</strong> (Impact Player era onwards).</li><li>2020/21, 2021, 2022 are covid-affected or neutral-hosted — Chinnaswamy and Hyderabad hosted zero matches; gaps reflect that.</li><li>2026 is in progress (3 Chinnaswamy matches, 2 Hyderabad, 2 Arun Jaitley so far). Directional, not final.</li><li>Brabourne’s +13.98 all-time delta is from a short 27-match, 4-season window — not comparable to 100+-match samples.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=626f3cfd982e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Context Relevance to Context Efficiency: The Rise of Context Window Architecture]]></title>
            <link>https://medium.com/@pyneuronaut/context-relevance-to-context-efficiency-the-rise-of-context-window-architecture-ce0d30e97a3d?source=rss-ec4999822430------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce0d30e97a3d</guid>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[ai-agents-in-action]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agents]]></category>
            <dc:creator><![CDATA[Sarath Chandra Bellam]]></dc:creator>
            <pubDate>Thu, 27 Nov 2025 05:12:51 GMT</pubDate>
            <atom:updated>2025-11-27T05:12:51.726Z</atom:updated>
            <content:encoded><![CDATA[<p>Since 2024, the focus has been on context relevance. Tool calling fundamentally changed how we use LLMs. It moved us from chat assistants to agents, systems that can actually do things in the real world. We got multi-agent architectures, orchestration frameworks, MCP servers connecting to everything. The progress has been incredible.</p><p>But there’s a problem hiding in plain sight: <strong>clogging the context window somewhere, using way more tokens than actually need. And as agents get more capable with more tools, this problem is getting worse, not better.</strong></p><p>Let’s consider an example. An agent with access to 50 tools via MCP, a pretty normal setup when connecting to GitHub, a database, and some internal APIs. Those tool definitions alone eat up <strong>10–20% of the model’s context window</strong> before any reasoning about the actual task even begins.</p><p>That’s just the beginning. Then there’s:</p><ul><li><strong>Intermediate tool results</strong> : A single API call might return thousands of rows. A meeting transcript could be 50K tokens. All of that flows through context.</li><li><strong>Tool chaining overhead : </strong>When tool A’s output feeds tool B, which feeds tool C, the model re-reads everything at each step.</li><li><strong>Conversation history : </strong>Previous turns accumulate. The agent keeps carrying information it doesn’t need for the current step.</li></ul><p>The result : Context limits hit faster. Costs rise up. And here’s the counterintuitive part : <strong>performance actually degrades</strong> as context grows. Recent research on “context rot” showed models dropping from 99% accuracy at 1K tokens to 70% at 32K tokens. Bigger isn’t always better.</p><p>Reference : <a href="https://research.trychroma.com/context-rot">https://research.trychroma.com/context-rot</a></p><h3>The Anthropic Approach</h3><p>Anthropic recently shared two approaches that point to where this is all heading.</p><h4>1. Code Execution with MCP</h4><p>This approach tackles tool definition overhead directly. Instead of loading all 50 tool schemas upfront, it generate a file tree of all available tools from connected MCP servers making each tool corresponds to a file. The agent discovers tools by exploring the filesystem: listing the ./servers/ directory to find available servers (like github and slack), then reading the specific tool files it needs (like listIssues.ts and createPR.ts) to understand each tool&#39;s interface.</p><p>It’s like giving the agent a file system to navigate:</p><pre>servers/<br>├── github/<br>│   ├── createPR.ts<br>│   └── listIssues.ts<br>├── slack/<br>│   └── sendMessage.ts</pre><p>The agent explores what it needs, when it needs it. Combined with selective result extraction , only pulling specific fields from tool outputs, this cuts the tool definition tax dramatically.</p><p>Anthropic reported going from <strong>150,000 tokens down to 2,000 tokens</strong> on real workflows. That’s a 98%+ reduction. And it’s not just about efficiency, sensitive data can flow between systems without ever passing through the model.</p><blockquote><strong>Limitation</strong>: Tool output schema is critical for tool chaining and selective output picking. But in the MCP specification, output schema is optional. Most MCP servers don’t define it. This limits the tool chaining capability of this approach today. The tool discovery part works well, it’s the chaining that hits a wall without structured output definitions.</blockquote><h4>2. Tool Search with Regex and BM25</h4><p>A simpler alternative: treat tool discovery as a search problem. Instead of file system navigation, tools get indexed and retrieved using traditional search techniques.</p><ul><li><strong>Regex-based search: </strong>Pattern matching on tool names and descriptions. Fast, predictable, but limited to exact or pattern matches.</li><li><strong>BM25 search: </strong>Classic information retrieval ranking. Handles fuzzy matching better, weighs term frequency and document length. Works well when tool descriptions are well-written.</li></ul><p>These approaches are lighter weight than the code execution pattern and don’t require changes to how MCP servers are structured. The tradeoff: less precise than schema-aware discovery, more dependent on good tool naming and descriptions.</p><p>Reference:</p><ol><li><a href="https://www.anthropic.com/engineering/code-execution-with-mcp">https://www.anthropic.com/engineering/code-execution-with-mcp</a></li><li><a href="https://www.anthropic.com/engineering/advanced-tool-use">https://www.anthropic.com/engineering/advanced-tool-use</a></li></ol><h3>LangChain’s Deep Agents: Same Problem, Similar Solutions</h3><p>LangChain’s Deep Agents architecture targets the exact same space. Their framework boils down to four strategies:</p><ul><li><strong>Write: </strong>Agents offload intermediate work into a virtual filesystem or external storage. This keeps bulky data out of the main context.</li><li><strong>Select: </strong>The main agent pulls back only what it needs. Retrieval is not classic vector RAG by default. It is more like targeted file reads or controlled passing of summaries from subagents.</li><li><strong>Compress: </strong>Context trimming and summarisation kick in when traces get large. The goal is to keep only essential state and avoid runaway token growth.</li><li><strong>Isolate: </strong>Subagents handle focused tasks inside their own clean context window. They run tool calls and heavy reasoning privately, then return a short result to the parent.</li></ul><p>The sub-agent pattern is particularly interesting. Instead of one agent with a bloated context trying to do everything, focused sub-agents spawn in isolation and return compressed summaries. Each operates in a clean context window optimised for its specific task.</p><p>Reference: <a href="https://github.com/langchain-ai/deepagents">https://github.com/langchain-ai/deepagents</a></p><h3>The Shift: From Relevance to Efficiency</h3><p>2024–2025 was about <strong>context relevance, </strong>making sure agents have access to the right information. RAG, tool calling, MCP connections to every system imaginable. The question was: “Can my agent reach what it needs?”</p><p>2026 will be about <strong>context efficiency, </strong>using that access intelligently without drowning in tokens. The question becomes: “How do I get the same result with fewer tokens?”</p><p>The shift is from “give the agent access to everything” to “give the agent access to everything, but only load what it needs for this specific step.”</p><p>This isn’t just an optimisation problem. It fundamentally changes how agent systems get architected:</p><ul><li><strong>Token budgets become first-class concerns : </strong>Just like memory management in traditional software</li><li><strong>Architecture patterns change</strong> : Smaller, focused agents beat monolithic ones</li><li><strong>Cost models flip : </strong>The most capable system isn’t the one with the most context, it’s the one that achieves results with the least</li></ul><h3>Practical Implications</h3><p>For anyone building agents today, a few things to consider:</p><ol><li><strong>Measure token consumption per step</strong> : The bloat might be surprising</li><li><strong>Question every tool result: </strong>Does the full response need to enter context, or just a summary or specific values ?</li><li><strong>Consider file-based patterns: </strong>Let agents write to and read from files as external memory</li><li><strong>Design for compaction: </strong>Plan how context will be summarised before hitting limits (Refer How Claude Code, Copilot summarise conversation during long chats )</li><li><strong>Evaluate sub-agent patterns: </strong>Sometimes spawning a focused agent beats expanding context</li></ol><h3>Looking Ahead</h3><p>As models get larger context windows, context engineering becomes <em>more</em> important, not less. A 1M token window doesn’t mean using 1M tokens, it means more room to be strategic about what gets included.</p><p>The agents that win in production won’t be the ones with access to the most information. They’ll be the ones that consistently surface the right information at the right time while keeping context lean and focused.</p><p>Context relevance got us to agents that can theoretically do anything. Context efficiency will get us to agents that reliably do the right thing, at scale, at reasonable cost.</p><p>That’s the next frontier.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce0d30e97a3d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Delete Amazon S3 Vectors Using AWS CLI]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Amazon recently introduced S3 Vectors, a new managed service for storing and querying embeddings directly in S3. It&#x2019;s designed for&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@pyneuronaut/how-to-delete-amazon-s3-vectors-using-aws-cli-e282b885797b?source=rss-ec4999822430------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@pyneuronaut/how-to-delete-amazon-s3-vectors-using-aws-cli-e282b885797b?source=rss-ec4999822430------2</link>
            <guid isPermaLink="false">https://medium.com/p/e282b885797b</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[embedding]]></category>
            <category><![CDATA[s3-vectors]]></category>
            <category><![CDATA[aws-cli]]></category>
            <category><![CDATA[s3]]></category>
            <dc:creator><![CDATA[Sarath Chandra Bellam]]></dc:creator>
            <pubDate>Mon, 20 Oct 2025 14:13:22 GMT</pubDate>
            <atom:updated>2025-10-20T14:13:22.422Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Agents, Tools, and the Subtle Art of Tool Design]]></title>
            <link>https://medium.com/@pyneuronaut/agents-tools-and-the-subtle-art-of-tool-design-0683da3baa2e?source=rss-ec4999822430------2</link>
            <guid isPermaLink="false">https://medium.com/p/0683da3baa2e</guid>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Sarath Chandra Bellam]]></dc:creator>
            <pubDate>Sat, 13 Sep 2025 06:48:06 GMT</pubDate>
            <atom:updated>2025-09-13T06:51:54.706Z</atom:updated>
            <content:encoded><![CDATA[<p>In the early days of deep learning, our models were like brilliant but absent-minded mathematicians: dazzling at pattern recognition but helpless at doing things. Fast-forward to today — LLMs like GPTs or LLaMAs can reason, plan, and communicate. But drop them into the real world and ask them to <strong>book a flight</strong> or <strong>pull live stock prices</strong>, and they just… hallucinate.</p><p>This is where <strong>agents</strong> come in. Think of an agent as an LLM that doesn’t stop at words — it decides, acts, and iterates. Agents take a goal like “<em>Summarise this 50-page PDF and email it to my boss”</em> and figure out:</p><ol><li>What steps to take.</li><li>What external capabilities are needed.</li><li>When to stop and ask for help.</li></ol><p>They’re not just chatbots; they’re autonomous collaborators.</p><h3>What Are Tools to Agents?</h3><p>An LLM agent without tools is like a chess grandmaster without a chessboard — plenty of strategy, but nowhere to move the pieces.</p><p>Tools are capability wrappers. A tool could be:</p><ul><li>A <strong>web search API</strong>: fetch knowledge outside the LLM’s static training.</li><li>A <strong>database connector</strong>: pull structured data.</li><li>A <strong>calendar API</strong>: schedule events.</li><li>Even a <strong>Python interpreter</strong>: run computations or scripts.</li></ul><p>In essence, tools bridge the gap between the agent’s reasoning space and the messy, ever-changing dynamic world. But simply having tools isn’t enough — their design determines whether an agent becomes powerful or perilous.</p><p>A poorly designed tool is like handing a Swiss Army knife to a toddler: technically powerful, but dangerous or useless. Good tool design makes agents:</p><ul><li><strong>Understandable</strong> — The tool’s anatomy (Name, Description, Input &amp; Output Schema) must be crystal clear.</li><li><strong>Composable</strong> — Tools should play nicely with each other. Agents often chain them: search → scrape → summarize → email.</li><li><strong>Safe</strong> — Permissions and constraints are non-negotiable. If a tool can move money or delete data, you want guardrails (ex: <a href="https://github.com/Azure-Samples/SQL-AI-samples/tree/main/MssqlMcp">https://github.com/Azure-Samples/SQL-AI-samples/tree/main/MssqlMcp</a>)</li><li><strong>Discoverable</strong> — Agents need metadata (names, descriptions, examples) so their planner can pick the right tool at the right time.</li></ul><p>The design goal: <strong>minimise friction between intent and action</strong>.</p><h3><strong>A Mental Model</strong></h3><p>I like to think of agents as language operating systems. The LLM is the kernel: it handles reasoning, planning, and “sys calls.”</p><p>Tools are the applications: a <strong>web_search</strong> tool is like a browser, a <strong>pdf_parser</strong> like a file reader, a calendar API like your system calendar app.<br> Without apps, your OS is inert. Without a robust OS, your apps are dumb. The magic happens in how the kernel and the apps communicat<strong>e</strong>—the shared rules and data formats that let them work together seamlessly.</p><p><strong>A Quick Example:</strong></p><p>Let’s say you build a research assistant agent with three tools (web_search, pdf_parser, email_sender<strong>)</strong>.</p><ul><li>It starts with a question: “Find the most recent transformer architecture papers and summarise the innovations.</li><li>It picks a <strong>web_search</strong> tool to fetch papers.</li><li>Calls a <strong>pdf_parser</strong> tool to extract text.</li><li>Uses its own reasoning to draft a summary.</li><li>Optionally invokes an <strong>email_sender tool</strong> to deliver the result.</li></ul><p>Notice how the LLM didn’t know these capabilities out of the box — it reasoned about which tools to use and when based on tool schema.</p><h3>Designing an Effective Tool for LLMs 🛠</h3><p>Think of an LLM agent as a brilliant but slightly naïve collaborator. To help it succeed, your tool must be designed like you’re teaching a very clever intern who doesn’t like ambiguity.</p><h4>Make Purpose Obvious</h4><p>Give tools self-describing names and short, crisp descriptions.</p><ul><li>❌ <strong>processData()</strong> – vague and scary.</li><li>✅ <strong>convert_csv_to_json</strong> – clear intent.</li></ul><p>A tool’s name and description are its <em>advertisement</em> to the agent’s planner. Clarity reduces mistakes.</p><h4>Define Input and Output Schemas</h4><p>Defining input and output schemas for LLM tools is like introducing type definitions for method arguments and return values in programming. It formalises what the agent can send and what it can expect back.</p><p>Without schemas, the LLM would have to guess the shape of data — leading to brittle calls or misinterpretations. A schema acts as a contract:</p><ul><li><strong>Inputs</strong>: What fields, types, and constraints a tool accepts.</li><li><strong>Outputs</strong>: The structure and types of data the tool will return.</li></ul><p><strong>Example:</strong></p><pre>def web_search(query: str, max_results: int = 5) -&gt; List[Dict[str, str]]:<br>    &quot;&quot;&quot;<br>    Searches the web for the given query and returns a list of results.<br><br>    Args:<br>        query (str): The search keywords.<br>        max_results (int): Maximum number of results to return. Default is 5.<br><br>    Returns:<br>        List[Dict[str, str]]: A list of search results where each result contains:<br>            - &#39;title&#39;: The title of the page.<br>            - &#39;url&#39;: The URL of the page.<br>            - &#39;snippet&#39;: A short description or snippet.<br>    &quot;&quot;&quot;<br>    # --- Dummy implementation for demo purposes ---<br>    results = []<br>    for i in range(max_results):<br>        results.append({<br>            &quot;title&quot;: f&quot;Result {i+1} for &#39;{query}&#39;&quot;,<br>            &quot;url&quot;: f&quot;https://example.com/{i+1}&quot;,<br>            &quot;snippet&quot;: f&quot;This is a dummy snippet for &#39;{query}&#39; (result {i+1}).&quot;<br>        })<br>    return results</pre><h4>Show, Don’t Just Tell</h4><p>Include at least one example call and response in your metadata. LLMs learn faster from examples than from paragraphs of prose.</p><h4>Handle Errors Gracefully</h4><p>Return structured error objects ( <em>{“error”: “Invalid Date format”}</em> ) instead of raw text dumps. This lets the LLM recover or retry rather than spiral into nonsense.</p><h4>Keep Tools Small and Safe</h4><p>A tool that “can do anything” is dangerous. Split big powers into narrow, composable tools. Narrow scope → safer execution and easier planning.</p><h4>Tool Granularity</h4><p>Tool granularity is about how much functionality you pack into a single tool — whether a tool should do one very specific thing or handle a broad range of actions.</p><p><strong>Fine-grained</strong></p><ol><li>Each tool does one job and does it well.</li><li>safer, composable, and flexible (best starting point).</li><li>Easier for the LLM to reason about, mistakes affect smaller scopes.</li><li>Requires chaining multiple calls — slightly more planning overhead for the agent.</li></ol><p><strong>Coarse-grained</strong></p><ol><li>A single tool performs multiple actions or a whole workflow.</li><li>convenient for repetitive workflows but riskier.</li><li>Good for repetitive, well-defined tasks.</li><li>Harder for the agent to adapt or recover if one step fails. More complex interface and higher risk if permissions are broad.</li></ol><p>At its core, effective tool design removes ambiguity. APIs give you raw power; tools give LLMs usable superpowers. Combine clean tools with MCP-style prompts and you get a flexible, programmable agent ecosystem. This is where agents stop hallucinating and start getting things done.</p><p>The future of AI won’t be defined solely by bigger LLMs with more parameters or flashier benchmarks. The real frontier lies in how gracefully agents wield their tools.</p><p>An agent without tools is a genius trapped in a box. A tool without thoughtful design is just another API lost in the noise.<br> The winners of the next decade won’t be those with the largest checkpoints but those who master the subtle craft of tool design — making interfaces so clear, so safe, and so composable that an agent can think, act, and transform entire industries.</p><p>The race isn’t about building the smartest brain anymore.<br><strong>It’s about giving that brain the right hands — and the right operating system to move them.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0683da3baa2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What can we expect from Model Context Protocol in the near Future]]></title>
            <link>https://medium.com/@pyneuronaut/what-can-we-expect-from-model-context-protocol-in-the-near-future-fe8ec515e050?source=rss-ec4999822430------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe8ec515e050</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[model-context-protocol]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[mcps]]></category>
            <dc:creator><![CDATA[Sarath Chandra Bellam]]></dc:creator>
            <pubDate>Sat, 21 Jun 2025 17:32:04 GMT</pubDate>
            <atom:updated>2025-06-21T17:32:04.532Z</atom:updated>
            <content:encoded><![CDATA[<p>The Model Context Protocol has already pushed the boundaries of AI, and its roadmap suggests an even more exciting future. Recent updates (MCP Project Update from Jerome Swannack, Member of Technical Staff at Anthropic) hint at enhancements that will make our conversations with machines not just faster, but richer, more intuitive, and genuinely collaborative.</p><p>Two forthcoming capabilities — <strong>Elicitation</strong> and <strong>Tool Output Schema</strong> — represent more than incremental tweaks. They transform AI from a passive respondent into an active partner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ganxpd7d_xa8AI4e" /></figure><h4>Elicitation: When Your AI Becomes a Travel Buddy</h4><p>Today, interacting with AI often feels like a one-way street: you give a command; it spits back an answer. <strong>Elicitation</strong> flips that dynamic. By letting an AI ask for additional details via a structured JSON schema, every exchange becomes a dialogue.</p><p><strong>Picture this:</strong><br> You tell an AI travel agent, “I’d like a vacation.” Instead of bombarding you with questions all at once, it might begin with:</p><ol><li><em>“Great! Where would you like to go?”</em></li><li>After your destination: <em>“What’s your budget for flights and accommodation?”</em></li><li>Then: <em>“Are you leaning toward adventure, relaxation, or culture?”</em></li><li>Finally: <em>“Here are three hotels that fit — would you like to book one?”</em></li></ol><p>That gentle back-and-forth feels far more natural and lets the AI guide you rather than overwhelm you.</p><h4>Tool Output Schema: Glue for an AI Toolchain</h4><p>The “<strong>Tool Output Schema</strong>” feature will revolutionise how different AI tools and services work together. Currently, when one AI tool needs to pass information to another, it often has to send a large amount of raw data, which is inefficient and costly. This new feature will allow for the transfer of structured data, making the entire process more streamlined.</p><p><strong>Imagine a business-intelligence workflow:</strong><br> A data-analysis agent pulls last quarter’s sales, delivering tidy, schema-rich results instead of a text dump. A separate visualization agent instantly turns that structured payload into charts — no manual cleanup, no wasted time. Suddenly, complex multi-agent pipelines become both feasible and affordable.</p><p>The technical leap forward is only half the story. The MCP team is committed to openness on two fronts:</p><p><strong>Open-Source Resources</strong> — Expect a library of remote MCP server and client examples. Developers will be able to tinker, learn, and spin up their own MCP-powered applications in record time.</p><p><strong>Community-Driven Governance</strong> — Plans are underway to shift protocol stewardship away from Anthropic. With an independent governing model, the community itself will steer MCP’s evolution — keeping it transparent and aligned with real-world needs.</p><h4>What This Means for All of Us</h4><p>The next wave of MCP isn’t just about smarter code; it’s about <strong>collaboration</strong>:</p><ul><li><strong>For end-users:</strong> Conversations with AI will feel more like chatting with a knowledgeable colleague than interrogating a search bar.</li><li><strong>For businesses:</strong> Structured, low-latency data hand-offs turn once-complicated workflows into plug-and-play solutions.</li><li><strong>For developers and researchers:</strong> An open protocol governed by its community lowers the barrier to experimentation and innovation.</li></ul><p>Taken together, Elicitation, Tool Output Schema, and a shift toward open governance mark a turning point. MCP is poised to usher in an era where AI doesn’t just answer; it collaborates. Where disparate tools don’t merely coexist; they cooperate. And where progress isn’t locked behind corporate gates, but shared with everyone ready to build what comes next.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe8ec515e050" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystifying Generative AI :]]></title>
            <link>https://medium.com/@pyneuronaut/demystifying-generative-ai-2638c1933a20?source=rss-ec4999822430------2</link>
            <guid isPermaLink="false">https://medium.com/p/2638c1933a20</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Sarath Chandra Bellam]]></dc:creator>
            <pubDate>Thu, 19 Jun 2025 08:28:22 GMT</pubDate>
            <atom:updated>2025-06-21T17:36:42.835Z</atom:updated>
            <content:encoded><![CDATA[<h3>Beyond the Hype: Understanding Generative AI Through the Car Analogy</h3><p>Generative AI, or GenAI, has surged into the spotlight, sparking enthusiasm, curiosity, and even concern. It feels revolutionary because it’s capable of creating something entirely new — writing stories, generating art, composing music, and much more. But beneath all the hype, GenAI isn’t magic; it’s technology. Specifically, it’s technology powered by Large Language Models (LLMs), which have transformed the way we interact with computers.</p><h4>What Exactly is Generative AI?</h4><p>Generative AI is a type of artificial intelligence capable of producing new and original content by learning patterns from existing data. Imagine teaching someone how to draw by showing them thousands of images. Over time, they’d recognise styles, techniques, and themes, eventually being able to create new drawings independently. Similarly, generative AI models analyse vast amounts of data — text, images, music — and learn the patterns within, enabling them to produce novel outputs based on this learned knowledge.</p><h4>What are Large Language Models (LLMs)?</h4><p>Large Language Models are specialised generative AI models designed to understand and generate human language. Trained on vast datasets of written text — from internet articles and books to social media — they master the nuances and structures of language, enabling them to predict and generate fluent, coherent, and contextually relevant text.</p><p>You can think of an LLM as the world’s most advanced auto-complete system. Given some input text, an LLM predicts the most likely next words or sentences, forming meaningful responses. Popular examples include GPT-4 by OpenAI, Claude by Anthropic, Grok by xAI and LLaMA by Meta.</p><p>To better grasp GenAI, let’s compare it with something familiar: the car industry.</p><p><strong>1. Car Manufacturers: The Model Builders</strong></p><p>In the automotive world, companies like Ford, Tesla, or Toyota design, manufacture, and assemble cars. Similarly, in generative AI, organizations like OpenAI, Google, Anthropic, and Meta act as the manufacturers. They build, train, and refine AI models — developing sophisticated “engines” capable of performing impressive tasks like writing essays or solving complex problems.</p><p><strong>2. Car Dealers: The LLM Providers</strong></p><p>Just as car dealerships deliver vehicles from factories to buyers, LLM providers offer models directly to users and businesses. Sometimes the manufacturers themselves act as dealers — like Tesla selling directly to customers. OpenAI, for example, both builds and distributes GPT-4 through its API and user-friendly platforms like ChatGPT. Provider platforms like Azure, AWS and Hugging Face function similarly to large dealerships, hosting and distributing many models from different creators, making them easily accessible to developers.</p><p><strong>3. Drivers: The Developers</strong></p><p>Developers who integrate generative AI models into applications are akin to drivers. They directly interact with the technology through APIs, guiding AI models to produce specific results, much like a driver steering a car towards a destination. Developers choose their route (by designing prompts), control the speed and direction (by fine-tuning parameters), and are responsible for the final journey (the quality of the output).</p><p><strong>4. Passengers: Everyday Users</strong></p><p>Most users of GenAI are passengers. They benefit from generative AI without having to understand how to build or drive the system. Using interfaces such as ChatGPT , Perplexity, Microsoft Copilot or AI-driven productivity tools is like taking a comfortable ride in a taxi. Passengers simply specify what they want, and the technology handles the rest.</p><h4>It’s Not a Black Box: How GenAI Actually Works</h4><p>Despite its remarkable capabilities, GenAI is built on understandable and transparent mechanisms. At its core, a Large Language Model processes language through “tokenization,” breaking down input into manageable pieces. The model then uses a neural network known as a Transformer, which employs a technique called self-attention to evaluate the importance of each word within a context. This process lets the model generate text that feels natural and contextually relevant.</p><p>Each time the model generates a response, it predicts the next best word, guided by learned statistical patterns from billions of training examples. This computational dance — though complex — is entirely based on math, data processing, and pattern recognition.</p><h4>Kickstarting Your GenAI Journey</h4><p>Whether you’re a developer or a non-developer, the best way to start your generative AI journey is by engaging with accessible tools and learning resources.</p><p><strong>For Developers:</strong></p><ul><li>Explore APIs like OpenAI’s GPT-4, Anthropic’s Claude, or Hugging Face’s model repository.</li><li>Utilise beginner-friendly platforms like Google Colab or Kaggle notebooks, which provide free access to GPU computing environments.</li><li>Leverage frameworks such as LangChain to build sophisticated AI applications by integrating various models and tools.</li><li>Experiment with open-source models, and consider fine-tuning them with your own datasets.</li></ul><p><strong>For Non-Developers:</strong></p><ul><li>Engage with intuitive, no-code platforms like ChatGPT, Perplexity, Canva AI, or Notion AI to experience generative AI directly in user-friendly interfaces.</li><li>Participate in interactive learning resources and courses available through platforms like Coursera, Google, and YouTube.</li><li>Try out demos on Hugging Face Spaces to interact with various AI models effortlessly.</li></ul><h4>Navigating the GenAI Road Safely and Creatively</h4><p>Generative AI opens exciting possibilities for everyone, from curious learners to professional developers. As we continue to explore this technology, it’s vital to approach it responsibly and with a clear understanding of its strengths and limitations.</p><p>Just like driving safely requires following traffic rules and staying alert, using generative AI safely means recognizing its boundaries — like potential inaccuracies or biases — and using it ethically. By understanding the technology behind the hype, we can all become more informed users, leveraging GenAI to enhance creativity, productivity, and innovation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2638c1933a20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering AI Agent Evaluation: Metrics, Strategies, and Best Practices]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Evaluating AI agents isn&#x2019;t just a &#x201C;pass-or-fail&#x201D; checkbox. Done well, it uncovers hidden flaws, guides rapid iteration, and builds the&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@pyneuronaut/mastering-ai-agent-evaluation-metrics-strategies-and-best-practices-0e184ec344b6?source=rss-ec4999822430------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@pyneuronaut/mastering-ai-agent-evaluation-metrics-strategies-and-best-practices-0e184ec344b6?source=rss-ec4999822430------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e184ec344b6</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[evaluation]]></category>
            <dc:creator><![CDATA[Sarath Chandra Bellam]]></dc:creator>
            <pubDate>Wed, 18 Jun 2025 05:16:05 GMT</pubDate>
            <atom:updated>2025-06-18T05:17:33.944Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[AI’s Evolution: From Chatbots to Agents]]></title>
            <link>https://medium.com/@pyneuronaut/ais-evolution-from-chatbots-to-agents-75af386fcfee?source=rss-ec4999822430------2</link>
            <guid isPermaLink="false">https://medium.com/p/75af386fcfee</guid>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[Sarath Chandra Bellam]]></dc:creator>
            <pubDate>Sat, 14 Jun 2025 18:42:59 GMT</pubDate>
            <atom:updated>2025-06-14T18:42:59.027Z</atom:updated>
            <content:encoded><![CDATA[<p>It feels like just yesterday that we were all collectively mind-blown. Suddenly, you could have a conversation with a computer, and it… made sense? You’d ask it to write a poem about a grumpy cat, and it would deliver something surprisingly witty.</p><p>That initial spark, that “wow” moment, was our first real taste of what Large Language Models (LLMs) could do. But as amazing as it was, it was just the first step on a much bigger journey. How did we go from a clever chatbot to an AI that can act as a proactive partner or a peer progammer ?</p><p>Let’s take a walk through this incredible evolution.</p><h3>The Magic Trick: When AI Learned to Talk</h3><p>We all remember that first chat. It was like discovering a new form of life, one that lived inside our computers and had seemingly read the entire internet. These LLMs were the brains behind the magic. But that magic was too big for a simple chat window. Developers everywhere saw the potential. They wanted to plug that brain into their own apps and services. The key to unlocking this was the <strong>API</strong>, or Application Programming Interface.</p><p>Now, don’t let the jargon fool you. Think of an API as a really good waiter. You don’t need to know what’s happening in the kitchen (the complex LLM); you just give your order to the waiter (the API), and they bring you back exactly what you asked for.</p><p>This simple connection sparked a revolution, powering everything from email assistants to smarter customer service. But even with this, the AI was still just a brilliant talker. It could give you the world’s best recipe, but it couldn’t preheat your oven.</p><h3>Giving the AI Hands: The Dawn of Tools</h3><p>So, how do you teach an AI to <strong>do</strong> things? You give it tools.</p><p>It’s a concept developers call <strong>Tool Calling</strong> and it’s as straightforward as it sounds. Imagine you ask your travel app, <strong>What’s the weather like in Paris?</strong> The AI itself doesn’t know — the weather changes by the minute!</p><p>But it knows it has a <strong>get_weather</strong> tool. So it reaches into its digital toolbox, runs that tool to check a real-time weather service, and then tells you, <strong>Looks like it’s sunny in Paris!</strong> in plain English.</p><p>Suddenly, the AI could do more than just talk. It could book a flight, order a pizza, or search a database. In a digital sense, it had hands.</p><h3>The Real Leap: AI Gets a Promotion to “Agent”</h3><p>This is where things get really interesting. Having a toolbox is great, but what if you have a big, complicated project? You don’t want to hand your assistant a hammer and ask for a nail, then a saw and ask for a cut. You want to say, “<strong>Build me a bookshelf</strong>.”</p><p>This is the leap from a simple tool-user to a true **<strong>AI Agent</strong>**.</p><blockquote>An agent is like a project manager. You give it a high-level goal, like, “Plan a fun, budget-friendly weekend trip for me.” An agent doesn’t just use one tool. It makes a <em>*plan*</em>.</blockquote><p>It thinks, “<strong>Okay, first I’ll search for cheap flights. Then, I’ll check the weather for those destinations. After that, I’ll find affordable hotels with good reviews.</strong>” It uses its tools sequentially, reasons about the results, and can even change its plan if it hits a snag. If it gets stuck, it might even ask you a question, “<strong>I’ve found two great options, which one sounds better to you?</strong>”</p><p>It’s not just following orders; it’s collaborating with you.</p><h3>What’s Under the Hood?</h3><p>Seeing this in code isn’t as scary as you might think. Developers pick a “<strong>brain</strong>” (LLMs), write simple functions for each tool (like the `get_weather` example below), and then use an Agent Framework to tie it all together.</p><pre>def get_weather(city: str) -&gt; str:<br>    &quot;&quot;&quot;Gets the current weather for a given city.&quot;&quot;&quot;<br>    # This is a simplified example. <br>    # In a real app, you&#39;d use a weather API.<br>    if &quot;paris&quot; in city.lower():<br>        return &quot;Sunny with a temperature of 22°C&quot;<br>    elif &quot;london&quot; in city.lower():<br>        return &quot;Cloudy with a chance of rain&quot;<br>    else:<br>        return &quot;Weather information not available.&quot;</pre><p>Frameworks like <strong>ADK</strong>, <strong>LangChain</strong>, <strong>LlamaIndex</strong>, <strong>CrewAI, </strong>or <strong>AI SDK </strong>are like construction kits for building agents. They handle the complex parts, letting creators focus on what they want their agent to achieve.</p><h3>From Tools to Ecosystems: The MCP Revolution</h3><p>Now, AI tools are powerful, but they each exist as isolated islands. When you want an agent to access your Notion docs, analyse data in Sheets, and then update your Figma designs, you’re back to building custom integrations for each. That’s where the **<strong>Model Context Protocol (MCP)</strong>** comes in.</p><p>Think of MCP as a USB-C port for AI systems. It’s an open standard that creates a universal way for AI agents to connect with tools, data, and services — regardless of how they’re built or where they live.</p><p><strong>Why MCP Matters:</strong></p><p>MCP transforms AI agents from smart conversationalists to genuinely useful partners by:</p><ol><li><strong>Eliminating integration headaches</strong>: No more custom code for each new tool.</li><li><strong>Creating plug-and-play compatibility</strong>: New tools can join the ecosystem instantly.</li><li><strong>Enabling complex workflows</strong>: Agents can chain multiple tools together seamlessly.</li><li><strong>Keeping data secure</strong>: Sensitive information stays within your infrastructure</li></ol><p>This standardisation is what transforms a collection of clever tools into a true ecosystem where AI agents can flexibly solve complex, multi-step problems without developers having to rebuild integrations for every new use case.</p><h3>The Future is a Conversation</h3><p>The journey from a simple chatbot to a proactive agent marks a huge shift in our relationship with technology. We’re moving away from being directors giving specific commands and becoming collaborators, working alongside our AI teammates to solve problems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75af386fcfee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The MCP Revolution: How Tool Granularity Can Make or Break Your AI’s Performance and Cost]]></title>
            <link>https://medium.com/@pyneuronaut/the-mcp-revolution-how-tool-granularity-can-make-or-break-your-ais-performance-and-cost-d9b5a66182b3?source=rss-ec4999822430------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9b5a66182b3</guid>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[model-context-protocol]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <dc:creator><![CDATA[Sarath Chandra Bellam]]></dc:creator>
            <pubDate>Mon, 02 Jun 2025 07:38:36 GMT</pubDate>
            <atom:updated>2025-06-02T07:44:56.599Z</atom:updated>
            <content:encoded><![CDATA[<p>In the rapidly evolving landscape of AI integrations, the Model Context Protocol (MCP) stands out as a groundbreaking standard. Introduced by Anthropic in November 2024 (Anthropic’s MCP Announcement), MCP is designed to standardise how AI applications interact with diverse data sources. Think of it as the USB-C of AI applications — a universal connector that simplifies the integration between AI models and external tools.</p><p>At its core, MCP operates on a client-server model:</p><ul><li><strong>MCP Clients</strong>: AI applications or agents that request context or actions.</li><li><strong>MCP Servers</strong>: Tools that expose data or functionalities to clients.</li><li><strong>Transport Layer</strong>: Utilizes JSON-RPC 2.0 for communication, ensuring a standardised message format.</li></ul><p>This architecture allows AI models to access and interact with various data sources and tools seamlessly, promoting interoperability and reducing integration complexity.</p><p>But beyond the protocol and APIs lies a <strong>deeper insight that reshapes the economics and architecture of AI systems</strong>:</p><blockquote><strong><em>The way you design tools in MCP directly dictates how expensive, complex, and scalable your clients will be.</em></strong></blockquote><p>It’s not just about what your tools do — but how much your clients have to do because of them. Poorly designed, <strong>low-level tools</strong> force <strong>clients</strong> into <strong>imperative</strong>, token-hungry behavior. Well-designed, <strong>high-level tools</strong> allow clients to become <strong>declarative</strong> — lean, goal-focused, and efficient.</p><p>In other words: <strong>Tool design defines the paradigm. Paradigm defines cost.</strong></p><h3>The Imperative vs Declarative Dilemma</h3><p>To understand this, let’s clarify what imperative and declarative mean in the context of <strong>MCP</strong> and <strong>AI</strong>:</p><ul><li><strong>Imperative Programming:</strong> This approach involves specifying exactly how a task should be performed, step by step. In AI, this means the model has to orchestrate multiple tool calls to achieve a goal.</li><li><strong>Declarative Programming:</strong> Here, you specify what you want to achieve, without detailing the steps. The system figures out how to accomplish the task. In AI, this allows the model to focus on the goal, while the tool handles the execution.</li></ul><p>In the context of MCP, the design of your tools determines whether your AI clients operate imperatively or declaratively. This choice has significant implications for token usage, which is critical because tokens — the basic units of text processed by large language models (LLMs) — directly affect operational costs.</p><p>Let’s consider a practical example. Suppose you want your AI Agent/Assistant to provide a summary of all work items in a project. Depending on how your MCP tools are designed, this simple request can lead to vastly different outcomes in terms of efficiency and cost.</p><h3>The Imperative Approach: Traffic Controller</h3><p>If your tools are fine-grained and low-level, your MCP client might have to make multiple calls to achieve the desired result. For instance:</p><blockquote>Call get_work_items(type=”bug”)</blockquote><blockquote>Call get_work_items(type=”task”)</blockquote><blockquote>Call get_work_items(type=”story”)</blockquote><blockquote>Call get_work_items(type=”epic”)</blockquote><blockquote>Process and aggregate the results from all these calls.</blockquote><blockquote>Generate a summary based on the aggregated data.</blockquote><p>This approach is imperative because the MCP client has to manage each step individually. Each call returns a payload of data, and the client must handle the logic to combine these results. This leads to high token consumption because the model has to process and store intermediate results, increasing the cost. It’s like asking someone to bake a cake by fetching each ingredient from a different store, then mixing and baking it themselves.</p><h3>The Declarative Approach: One Call to Rule Them All</h3><p>Now, imagine if you had a higher-level tool that could handle the entire task with a single call:</p><blockquote>Call get_project_workitems_summary()</blockquote><p>In this declarative approach, the MCP client simply requests the summary, and the MCP server tool handles all the underlying operations — fetching the data, aggregating it, and generating the summary. This results in minimal token usage because the client doesn’t need to process multiple responses or manage complex logic. It’s like hiring a baker who delivers a finished cake with one request.</p><h3>Designing for Declarative Excellence</h3><p>To ensure your MCP tools enable declarative behavior, consider these strategies:</p><ol><li><strong>Think Use Cases, Not Data Models:</strong> Design tools that align with common user intents rather than just mirroring the underlying data structures. For example, a tool like <strong>get_project_workitems_summary()</strong> directly addresses a user’s need for a summary.</li><li><strong>Identify Imperative Hotspots:</strong> Track which requests trigger multiple tool calls. These are areas where you can benefit most from creating higher-level tools.</li><li><strong>Provide Coarse-Grained Tools:</strong> For frequent use cases, create tools that encapsulate entire workflows, reducing the need for multiple calls.</li><li><strong>Monitor Token Usage:</strong> Regularly check token consumption before and after implementing higher-level tools to quantify the benefits.</li></ol><blockquote><strong>Keep Fine-Grained Tools for Flexibility:</strong> <em>Declarative tools shine in enterprise settings where common use cases are repeated frequently. These coarse-grained tools encapsulate entire workflows, reducing client-side complexity.</em></blockquote><p>The way you design your MCP tools has a profound impact on the performance and cost of your AI systems. By favouring declarative approaches through well-designed, high-level tools, MCP clients can be lean, efficient, and scalable. When your tools match user intent, client-side code shrinks, token costs fall, and your entire system becomes more composable and future-ready.</p><p>If you’re building AI applications with MCP, take a step back and evaluate your tool design. Are you forcing your clients into imperative complexity, or are you empowering them with declarative simplicity? The choice is yours, and it could make all the difference in your AI’s success.</p><p>As someone deeply involved in AI development, I can attest to the transformative potential of protocols like MCP. It’s not just about connecting AI to data sources; it’s about rethinking how we structure our AI systems to be more efficient and user-centric. The shift from imperative to declarative thinking is a mindset change that can pay dividends in both development time and operational costs.</p><p><strong>Note</strong>: This article was edited with AI assistance for clarity and polish.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9b5a66182b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>