<?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 Kelly Kohlleffel on Medium]]></title>
        <description><![CDATA[Stories by Kelly Kohlleffel on Medium]]></description>
        <link>https://medium.com/@kelly.kohlleffel?source=rss-47129bfda899------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*S2sroOY-mD_xpb6UbRDHZg.jpeg</url>
            <title>Stories by Kelly Kohlleffel on Medium</title>
            <link>https://medium.com/@kelly.kohlleffel?source=rss-47129bfda899------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 19:10:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kelly.kohlleffel/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[What a dbt Project Is Worth to an Agent]]></title>
            <link>https://medium.com/@kelly.kohlleffel/what-a-dbt-project-is-worth-to-an-agent-5fcc29cd29b6?source=rss-47129bfda899------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fcc29cd29b6</guid>
            <category><![CDATA[dbt]]></category>
            <category><![CDATA[dbt-semantic-layer]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[context-engineering]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Kelly Kohlleffel]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 17:11:21 GMT</pubDate>
            <atom:updated>2026-08-30T17:26:04.787Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Benchmarking five interfaces into one dbt project: what each one fixed, what it cost, and which model to put behind it</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9A2DaSztlP-9Tu8Uy2Gejg.png" /></figure><p>Last week I asked two AI agents the same question against the same four demo retail tables: what is total revenue. The one running Haiku summed the line items and gave me $384,020.70. The one running Opus looked at the orders first, saw that 192 of the 750 were cancelled, left them out, and gave me $287,279.51, with a note explaining the choice and both numbers quoted to the cent. An analyst could have asked whether cancelled orders count before answering, but neither agent did. I wanted to explore why the two agents handled the same question differently and what the available dbt interfaces did to that result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wraWZfK1snJzHXt38eORrg.png" /><figcaption>Total revenue on raw SQL, same four tables: Haiku $384,020.70, Opus $287,279.51</figcaption></figure><p>So I measured it, and along the way I got a much clearer picture of what a dbt project is worth once the consumer of the data is an agent rather than a person. The value of dbt in AI workflows gets talked about a lot, but what I was interested in was the specific techniques dbt makes available for an agent, what each one does for accuracy, trust, and cost, and when to use each one, so this post walks through some of the options with the numbers attached.</p><h3>Why I measured it</h3><p>I actually had two motivations for this work. The first was MotherDuck’s agent benchmark, which I learned about from a great webinar Jacob Matson and Alex Monahan delivered last week, <a href="https://streamyard.com/watch/hi97bwYPUu6d"><strong>Do AI Agents Need a Semantic Layer?</strong></a>. They published a benchmark methodology for reuse as part of the webinar that included tool-restricted agents, an explicit check for agents bypassing the governed layer, and efficiency reported next to accuracy.</p><p>The second motivation was my own interest in how agents work. Every agent I build against a dbt project starts with a decision about the interface: raw SQL over the tables, the Semantic Layer, or Agents Schema and context via the manifest and its documentation. I didn’t really have a clear answer of what to use and when to use it, for the agent or for the type of model behind it.</p><p>So I built a harness where the interface changes and the model and the questions don’t change. The agent gets a business question and a small set of tools, and that’s it. It uses the tools until it has an answer, and the answer has a fixed shape: a number or a small table, a note if it thinks the question is ambiguous, and an option to say the data can’t answer it. Every question had a verified answer before any agent saw it. The join questions were checked with SQL. The why questions had the cause planted in the data, so the right answer was known going in. Scoring is a straight comparison against those answers. Wrong means the agent answered and missed and trust means it got it right, or it correctly said the data couldn’t answer. A right answer that came with a flag of doubt counts as luck, not trust.</p><p><strong>Here are the five interfaces; each is a dbt artifact:</strong></p><p><strong>Raw SQL.</strong> The only thing the agent sees about the data is what a DESCRIBE returns: table names, column names and types. One SQL tool, no documentation of any kind. The tables are dbt models built over dbt sources.</p><p><strong>Agents Schema, available.</strong> The same, plus the database holds the tables that dbt Labs’ open <a href="https://github.com/dbt-labs/agents_schema">Agents Schema</a> standard publishes from the project: model descriptions, column descriptions, lineage. That documentation is the context everyone is talking about giving agents, so I use both words below. The agent is told the tables exist, and nothing makes it read them.</p><p><strong>Agents Schema, required.</strong> The same tables, but the agent’s SQL against the data is rejected until it has read the documentation at least once.</p><p><strong>Manifest tools, the context layer.</strong> Every dbt parse writes a manifest: one file holding every model, every column and its description, and the lineage between them. Here the agent gets three tools over that file: search it by keyword, look up a model&#39;s columns, and pull the plain-English definitions for a model. It also gets SQL, but the harness rejects any query until the agent has consulted the manifest at least once. Same context as the Agents Schema, delivered as tools the agent calls instead of tables it queries.</p><p><strong>Semantic Layer.</strong> The agent can ask for named metrics by named dimensions and nothing else; no SQL tool exists in this arm. This is the governed one. I ran it two ways, through local MetricFlow and through dbt platform’s hosted Semantic Layer API.</p><p>I ran every interface against two sets of questions. The join questions are 25 questions over orders, line items, customers and products that need joins to answer, with grain and fan-out traps mixed in and two questions the data can’t answer at all. The why questions are ten questions asking why a metric moved between two periods, over data where the cause was planted ahead of time. Two models ran everything on DuckDB, Claude Haiku 4.5 as the smallest and cheapest and Claude Opus 5 as the largest, three times each, plus one extra pass of the Semantic Layer questions on Snowflake to check dbt platform’s hosted API against local MetricFlow.</p><p>Before the join work, I ran a first round with the same harness on 60 single-table questions across three industries, with four Claude models (Haiku 4.5, Sonnet 5, Opus 5, Fable 5), three interfaces (raw SQL, the Semantic Layer, and the manifest tools), and three engines (DuckDB, Snowflake, and Databricks), 6,480 runs in all. The join questions are where the five interfaces get compared, and I pull the first round in for two things it measured that the join round couldn’t: how the four model sizes compare, and whether the engine changes the result.</p><h3>Five interfaces, 25 join questions</h3><p>Here are the join questions, 75 runs per cell. Cost per trusted answer is the model spend in the cell divided by the answers you could act on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r50BWll2-YwXMGD9G-_AmA.png" /><figcaption>The Semantic Layer is the only row where both models reach zero, and the cheapest row for both.</figcaption></figure><p>Below, reading down the Haiku column, documentation/context takes the small model to zero and the Semantic Layer keeps it there for less money than raw SQL. Reading down the Opus column, context helps and does not finish the job; only the Semantic Layer gets Opus to zero, and it does that at a third of the cost per trusted answer of any other interface. The last row is the only one where both models reach zero, and it is the cheapest row for both. Six of each cell’s 75 runs are the two unanswerable questions, which every interface declined correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJAvZv94epikprA9il4s0Q.png" /><figcaption>Wrong answers out of 75 by interface, Haiku and Opus</figcaption></figure><h3>Two kinds of wrong</h3><p>Haiku’s four raw-SQL misses were one mistake repeated: asked for the average order total, it averaged line items and answered $255.33 where the order average is $512.03, three runs out of three, with no flag of doubt. The order total is not stored anywhere in those tables; it has to be summed from line items, and the column documentation says exactly that. Once Haiku read the documentation, through the required Agents Schema tables or the manifest tools, the mistake was gone: zero wrong in 150 runs across the two documented interfaces. When the Agents Schema tables were merely available, it caught the mistake once in three runs, which lines up with how often it looked: 0.09 reads per run.</p><p>Opus’s eleven misses were the revenue policy. It excluded cancelled orders from total revenue, from Electronics revenue, from average order total, and disclosed each time. Then it read the documentation and on the required Agents Schema interface it queried the documentation tables about four times per run and kept the policy; two of three runs still excluded cancellations on the revenue question, and the same on Electronics. With the manifest tools it was one run in three, on both questions. The documentation described the columns, and the columns were not what Opus disagreed about. Behind the Semantic Layer, total_revenue is defined once, and in 75 runs Opus was wrong zero times.</p><p>For Haiku, avoiding that class of error cost about a cent per answer. The Semantic Layer did something different: it gave Opus a defined business rule for revenue rather than leaving the model to decide whether cancelled orders should count. Tests and contracts on those definitions were not exercised in these runs; they are what keeps the definition true after the benchmark ends. The context and the semantic models came out of the same dbt project: the tables were dbt models over dbt sources, the documentation was model and column descriptions, one dbt parse produced the manifest that both the tools and the Agents Schema tables consume, the semantic models sit beside them, and the project compiled to DuckDB, Snowflake, Databricks and a dbt platform environment without a line changed. I did not use a tool outside dbt to build any interface.</p><h3>The why questions are a different job</h3><p>The why questions asked which factor drove a metric between period one and period two, from a closed list: category mix, subcategory mix, pricing, order volume, status mix, or nothing material. Each question had one planted cause. A few were set up to be tricky on purpose: one where a visible factor moved the metric in the wrong direction, two where nothing had really moved, and one where two causes were an even split, so the right answer was to name one and mention the other.</p><p>Opus got these right at every interface, 148 of 150 runs, and the other two were declines rather than misses. It caught the wrong-direction question, and on the even-split question it named one cause and put the other in its note with the numbers worked out to the dollar. Haiku missed a few at every interface, and the misses were the same kind each time: it named the factor that moved visibly instead of the one that moved the metric. The Semantic Layer did not fix that, because working out the cause is something the agent does after it has the numbers, and no interface does that part for it.</p><p>What the Semantic Layer did do is change the cost of getting the inputs. Haiku on the Semantic Layer reached its answer in 3.4 turns at two cents per run. On every other interface it used 13 to 17 turns, one query per turn, at up to twenty cents, and when I forced it to read documentation before querying it ran out of turns nine times in 30. Opus, which plans its queries, needed four turns on raw SQL and 6.6 on the documentation interfaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZBHzHXcSCmedXeVZ0STT4A.png" /><figcaption>Haiku turns per run on the why questions, by interface</figcaption></figure><h3>Context has to be delivered</h3><p>The Agents Schema available interface taught me the most about how context actually gets used. The context was sitting in the warehouse, in the standard tables, and the prompt told the agent the tables were there. Haiku read them 0.09 times per run on the join questions and never once on the why questions. Opus read them 3.4 times per run on the join questions and zero times on the why questions. Publishing the context into the warehouse was not enough on its own; the agent had to be made to look at it.</p><p>Making it look was one rule, the same one the manifest tools already enforced: reject data queries until the context has been read. Applied to the Agents Schema tables, it raised Haiku’s reads to 2.4 per run, took its wrong answers to zero, and did it at two-thirds of the tokens the manifest tools cost because reading a table is cheaper than a search-and-lookup conversation.</p><p>The earlier single-table study had already shown me the other half of this. The most capable model in that round, Fable 5, was the worst manifest-tools performer at 7.0% wrong, because its tools let it browse three industries’ documentation and it answered a supply-chain forecasting question from a retail column of the same name, nine runs out of nine on that question. Scoping the tools to the question’s domain took it to 3.3%, its own raw-SQL baseline, in a controlled A/B where the other model did not move.</p><p>With the manifest tools allowed to see every model in the project, including the two-period tables that hold the same retail data over again, Opus summed revenue across both datasets ($905,533.21, then $1,289,553.91), matched gold by luck 32 times in 75, and cost thirty cents a run; scoped to the question’s tables it was three wrong and fourteen cents.</p><p>I consider this a form of the model overthinking, and it overthinks in two directions: it searches wider than the question needs, which is what happened here, and it reads more into the question than was asked, which is what happened with the revenue policy. dbt has a different feature for each. Scoping the interface handles the first, and a governed metric handles the second. dbt produces the context and the metrics; deciding how much of the project an agent can see, and whether it has to read the context before it queries, is still up to whoever builds the agent, and in these runs those two decisions moved the numbers as much as anything dbt supplied.</p><h3>Trust, scale, cost</h3><p>The single-table testing round showed this first. On raw SQL, wrong-rate tracked the price of the model: 7.8% for Haiku down to 3.3% for Fable. Behind the Semantic Layer every model landed between 3.0% and 3.5%, <strong>so Haiku answered as accurately as Fable writing its own SQL at a thirteenth of the cost per answer ($0.0054 against $0.0707)</strong>. On the join questions, the two models I ran both went to zero behind it. That is what makes Haiku viable for the governed questions in the routing I use below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xd-Ki6MeGcZK1qKCIAK0Vg.png" /><figcaption>Wrong-answer rate, raw SQL to Semantic Layer, four models</figcaption></figure><p>The same project produced the same golds on DuckDB, Snowflake and Databricks (the Databricks arm read Fivetran’s Managed Data Lake in place), 52 of 52 checks per engine on single tables and 23 of 23 on joins, and then again through dbt platform’s hosted Semantic Layer, which reproduced the local results exactly: zero wrong for both models on Snowflake, hosted and local. The Semantic Layer column was flat across engines in the single-table round while raw SQL varied by dialect and the variation fell on the smallest model. In these runs, once the metric definition was fixed, the engine stopped changing the answer.</p><p>On cost, the lowest number in the whole benchmark was Haiku behind the Semantic Layer at $0.0051 per trusted answer. <strong>The Semantic Layer was also the cheapest interface for both models on the join questions and for three of the four models on the single-table questions.</strong> The semantic models get written once and every question that hits them benefits, and the column descriptions that fixed Haiku’s mistakes cost almost nothing to write and about a cent per answer to read.</p><h3>Which interface, and which model behind it</h3><p>Here’s the routing I am considering for future agents based on this benchmark:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IJH_4LlGiTiNx4iveQVw9w.png" /><figcaption>Interface and model, by question type</figcaption></figure><p>Based on these runs, governed questions are where I can use Haiku instead of a larger model. Questions that repeatedly require raw SQL are also candidates for a metric definition.</p><p>Half of this routing is already running in an agentic app I recently built and am currently testing. Haiku reads the question and a one-line index of the connected sources, picks the few that look relevant, and Sonnet 5 does the reasoning with only those tools, so the stronger model never wanders through the whole catalog. If the selection step fails, the full set loads. What the app doesn’t have yet is the other half (it’s now in the backlog): a route where a question with a governed metric goes to Haiku on the Semantic Layer and Sonnet never runs.</p><h3>Which model, for which agent</h3><p>The two models did not just differ in accuracy. Haiku is only cheap when the interface is short: on the why questions it cost $0.110 a run on raw SQL against Opus’s $0.135, because it issued one query per turn and used 13 turns and 80k tokens where Opus finished in four, and it was only genuinely cheap behind the Semantic Layer, $0.022 against $0.138.</p><p>Haiku tended to answer the literal question. Opus was much more willing to decide what it thought the question meant, which is what produced the cancelled-orders split at the top of the post. Opus writes down its doubts (16 to 19 right-by-luck answers with ambiguity notes in its raw-SQL cells) and Haiku mostly does not (3 to 4), which matters a great deal if nobody reads the output before it gets used.</p><p>The two models also fail in opposite directions: Opus and Fable get lost in wide interfaces, while Haiku does not explore enough to get lost and will not read documentation unless the interface makes it, and making Haiku do that costs additional turns.</p><p>Before choosing a model, I’m going to start looking at three things specific to the agent: is the data governed, is the task retrieval or judgment, and does a person read the answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ehJ4IoC873oUKn4MWoYgOw.png" /><figcaption>Starting model and interface, by agent profile</figcaption></figure><p>When nobody is going to read the answer before it gets used, I start the agent on the Semantic Layer or on context it is required to read. Those were the two places where Haiku’s mistakes went away, and it rarely flagged those mistakes itself. This came from two models and demo data, so I treat it as a starting point.</p><h3>What the dbt project is worth to my agents</h3><p>Everything the agents touched came out of one dbt project, and I didn’t build any of the five interfaces with a tool outside of dbt. You don’t have to choose one of these interfaces. One dbt project gives you all five, and the routing above is just a decision about which one a given question goes through.</p><p>Three questions I can now ask about any agent before I point it at a dbt project, each tied to something that went wrong in these runs:</p><ol><li><strong>How much of the project can the agent see, and is it more than the question needs?</strong> A stronger model will explore all of it. Opus summed revenue across two datasets when both were visible; scoped to the right tables, it didn’t.</li><li><strong>Does the question have a governed definition, or will the model supply its own?</strong> Opus answered revenue with its own cancelled-orders rule on every interface except the Semantic Layer.</li><li><strong>Does the agent have to read the context before it queries, or is the context just there?</strong> Haiku read the Agents Schema tables 0.09 times per run when they were just there and 2.4 times when the harness insisted.</li></ol><p>And here is my agent build “template”, or more likely a Claude skill enhancement, for dbt projects going forward based on this benchmark:</p><ol><li><strong>Document every column.</strong> This is the context that fixed Haiku’s mistakes.</li><li><strong>Write a semantic model for every KPI the business considers governed.</strong> This is what fixed Opus’s revenue policy.</li><li><strong>Put tests on those definitions</strong> so they hold after the agent ships.</li><li><strong>Publish the dbt project where an agent can reach it at runtime</strong>: A repo isn’t callable. The metrics and docs have to be served, through the hosted Semantic Layer, the Agents Schema tables in the warehouse, or the dbt MCP Server.</li><li><strong>Start with Haiku on the Semantic Layer.</strong> If it comes back saying the metrics can’t answer the question, hand the question to Opus with the docs. For a “why did this move” agent, use Opus from the start.</li></ol><p>For now, this is the way I’m going. The models, the interfaces, and dbt itself are all moving quickly enough that I expect to be rewriting this list within a few months.</p><p>If you are at <a href="https://www.getdbt.com/dbt-summit"><strong>dbt Summit</strong></a> in a couple of weeks, let’s connect there!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fcc29cd29b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Hard Part of Autonomous AI Isn’t the AI]]></title>
            <link>https://medium.com/@kelly.kohlleffel/the-hard-part-of-autonomous-ai-isnt-the-ai-60cf49576852?source=rss-47129bfda899------2</link>
            <guid isPermaLink="false">https://medium.com/p/60cf49576852</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Kelly Kohlleffel]]></dc:creator>
            <pubDate>Sun, 23 Aug 2026 16:13:14 GMT</pubDate>
            <atom:updated>2026-08-23T16:13:14.751Z</atom:updated>
            <content:encoded><![CDATA[<h4>Climbing Boris Cherny’s Steps of AI Adoption with Fivetran Connector SDK Builds</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HCeINmKygSkNM2_t9uRTFg.png" /></figure><p>Two Snowflake Summits ago, in June 2025, more than 800 people built a custom Fivetran connector with us using the Fivetran Connector SDK over four days in our in-booth hands-on lab. Every one of them did it the same way: paste a prompt into the Anthropic Workbench, let Claude generate a connector.py, copy it by hand into VS Code, debug and deploy from the terminal, then build a Streamlit-in-Snowflake app with Cortex AI on top of the synced data. Every step worked, and every step needed a person to carry the output from one window to the next.</p><p>If you’re not familiar with it, <a href="https://fivetran.com/docs/connector-sdk">Fivetran’s Connector SDK</a> lets you write a custom connector in Python against any source with an API and get production behavior out of the box: incremental syncs, schema handling, checkpointed state, retries. Teams have been building custom connectors this way with AI assistance for a couple of years now, myself included, and the Fivetran CSDK product team is building towards native autonomous connector generation of its own.</p><p>By the fall of 2025, I’d moved off the manual, copy-paste build entirely, onto my fivetran-connector-builder, a Claude skill that carried the same standards (plus more) that the workbench prompt used to spell out by hand, run from inside a Claude Code session instead of copied between browser tabs.</p><p>My first connector built that way, <a href="https://github.com/fivetran/community_connectors/tree/main/snowflake_cortex/snowflake-cortex-livestock-weather-intelligence">Snowflake Cortex Livestock Weather Intelligence</a>, still went through a manual slog to get submitted that January: 27 commits and 25 rounds of review over 23 days to get from open pull request to merged, with the Fivetran team helping me push it across the line by hand. That’s why I built fivetran-connector-sdk-submission, a second skill just for submission, separate from fivetran-connector-builder, the one that builds the connector.</p><p>Even with both skills running, I was still heavily involved in every new connector after that: watching each build, answering questions mid-run, walking each submission through review by hand. Measured against <a href="https://claude.ai/code/artifact/bfdfaef9-bc62-4dfe-ba9e-c58a26c9accf">Boris Cherny’s Steps of AI Adoption</a>, I wasn’t past Step 2: orchestrating a handful of agents yourself, kicking off each one by hand.</p><p>Step 3 is supervised autonomy, and one of the specific things Cherny names for crossing that line is letting Claude kick off Claude. That’s the step I was trying to get to. I already had AI helping me write connectors; what I wanted was to see how far I could take the process without being involved once the run started.</p><p>The goal was a Claude Code session that could profile a new API cold, write the connector and its tests, verify its own work against a real database, and open a mergeable pull request against Fivetran’s Connector SDK community repository without me stepping in along the way.</p><p>This ran on a live 3.9-billion-record biodiversity dataset. The agent built it and opened the pull request in late July. Review and merge took another few weeks, wrapping up in mid-August.</p><h3>What happened</h3><p>GBIF, the Global Biodiversity Information Facility, aggregates species occurrence records from museums, research institutions, and citizen science apps worldwide: what species, where, and when. Joined against climate data, land-use data, or a research team’s own field observations already sitting in a warehouse, those records show how species distributions are shifting over time, which is what conservation research and environmental monitoring teams actually want to know.</p><p>A Claude Code session, running fivetran-connector-builder, built <a href="https://github.com/fivetran/community_connectors/tree/main/gbif">exactly that connector</a> for Fivetran&#39;s Connector SDK community repository. I started the run by hand and didn&#39;t touch the build itself again after that. It profiled the live API and found two failure modes in the data that a first-pass build would likely have missed. It fixed both, checked the fix against a real database instead of trusting its own code, and handed the result to a submission gate it doesn&#39;t control. The gate passed and the pull request opened the same day, 570 lines and 53 tests. Over the next 19 days, a separate routine handled review, fixes, and re-review on its own; I clicked merge once it was ready.</p><h3>What ran without me</h3><p><strong>Zero mid-run input, once started.</strong> I kicked off this run by hand, and from the first API probe to the open pull request, no human answered a question, approved a step, or edited a file.</p><p><strong>Permissions were widened before the run, never during it.</strong> Every command the agent can execute was allowlisted in a prior session. When a run hits something outside the allowlist, it doesn’t ask me to click yes, it fails, and I review the gap afterward.</p><p>git clone wasn&#39;t on the allowlist, so there was no way to get a local working copy of the repo. The agent built the commit directly against the existing fork through GitHub&#39;s Git Data API instead, one blob and tree at a time, rather than stopping to ask for a wider permission.</p><p><strong>The gate is not the agent’s to modify.</strong> A separate script, submit_gate.py, decides whether a pull request opens. The agent cannot argue with it, cannot patch it mid-run, and cannot ship around it.</p><p><strong>The review cycle didn’t need me.</strong> The PR sat open for real review for 19 days: Fivetran’s own reviewers and an automated code-review bot left comments across several rounds. A separate routine, not the one that built the connector, read the comments, pushed the fixes, and asked for re-review, without me answering any of it.</p><p>I was also working on that routine during the same 19 days, adding the re-gate sweep that rechecks open PRs, the logic that resolves a bot’s thread once its fix is verified but leaves a human’s thread alone, and a scheduler guard so a routine can’t quietly go dead. None of those changes touched the connector’s own code. I still handle the final merge myself once the pull request is ready.</p><h3>The gate does the trusting</h3><p>The pipeline runs in four steps. It refreshes standards against recent merges, checks the ramp for duplication, builds the connector through the fivetran-connector-builder skill, then hands the result to the fivetran-connector-sdk-submission skill, which assembles the pull request and passes it to submit_gate.py.</p><p>That gate won’t let the pull request open unless everything on this list passes:</p><ul><li><strong>An 8-stage compliance gate</strong> reproducing the repo’s CI exactly</li><li><strong>The full test suite</strong>, 53 tests on this connector</li><li><strong>Two debug syncs against the live API</strong>, where the second must resume from the first’s real saved state, not start over</li><li><strong>A credential scrub</strong> across everything that would ship</li></ul><p>The gate refused exactly once across these builds, a formatting stage failure on black --line-length=99. The run fixed the one thing the refusal named, re-ran the gate, and exited clean.</p><p>That’s the perimeter principle I’ve written about before: a narrow probabilistic core, where the model proposes, surrounded by wide deterministic guardrails that decide what actually ships.</p><h3>What the agent caught</h3><p>As mentioned, GBIF is a 3.9-billion-record dataset, and the agent found two failure modes without being told where to look. The first was in the schema: top-level fields named order, class, and key, with live values like order: &quot;Rosales&quot; and class: &quot;Magnoliopsida&quot;. It renamed them to taxon_order and taxon_class during profiling, before a line of connector code existed, and dropped key as a duplicate of gbifID.</p><p>The rename was verified by executing a real CREATE TABLE against DuckDB with the actual schema, not by reading the code, and the check has a negative control: reinject order as a field name and four tests fail, including the one that builds the table.</p><p>The second issue was the API’s pagination ceiling. The agent found that offset=100001 returns HTTP 400 because the API caps paging far below the row count. It bounded the sync window and proved resume behavior across the cap: the second debug run picked up at offset 300 from the first run&#39;s state.</p><p>This was one of the more interesting parts of the run for me. Finding the problems is useful, but proving the fixes against the actual behavior of the database without me being there to make that call is what made me much more comfortable letting the agent keep going.</p><h3>What the review actually found</h3><p>As part of Fivetran’s normal repository review process, Copilot’s automated review caught real issues on this PR, twice. The first pass wanted the README brought in line with the repo’s standard boilerplate and flagged inconsistent checkpoint and state-handling in connector.py. The second pass, after those fixes landed, found a real bug: config values like taxon_key and country would crash the connector with an AttributeError if a user supplied them as a JSON number instead of a string. A human reviewer approved the PR but still asked for the open comment threads to be resolved before GitHub would allow the merge.</p><p>Neither one was in the submission gate before the PR opened, because the gate only enforces what a previous review already turned into a test. The checkpoint finding did become one: it’s now a registered failure class, checkpoint-drops-a-state-key-it-reads, with its own enforced test, so the next connector gets it for free. The taxon_key type-coercion bug hasn&#39;t gone through that step yet. It&#39;s a genuinely new failure mode, and as of this writing a future connector could still ship the same bug.</p><p>I actually like that the system still has gaps I can point to. Each new failure gives me something I can turn into a check or test so the next connector doesn’t have to learn the same lesson again.</p><p>The builds only run alone because the standards they follow are encoded in the fivetran-connector-builder skill itself, not somewhere only I remember them. The registry backing it holds 16 known failure classes, 13 enforced by tests that fire on any future connector. The other 3 are flagged as review-only by design, catchable only by reading for meaning, not by a regex. The taxon_key bug isn&#39;t in that count at all yet.</p><h3>Why I run it this way</h3><p>A loop can only run as long as its harness can verify. In this build, that meant figuring out how much of the outcome I could reliably check without being present. Every hour spent building the gate, the debug-resume requirement, and the negative controls is an hour I’m not spending supervising a build today.</p><p>By the five criteria I’ll walk through in the next piece, this connector is already about 80% of the way to full autonomy. The one piece it’s missing is a scheduled start instead of my own hand on the run.</p><p>At this point, what limits how quickly I can build these is mostly the pace I’ve chosen to run them. I already have several more connectors lined up behind GBIF. Semantic Scholar is submitted as PR #63, with USGS Earthquake Catalog and Stack Exchange queued behind it.</p><p>The rule I’m running under is simple: at most one new pull request opens per week, and the next one can’t open until the last one merges. I built that straight into submit_connector_pr.py, so it&#39;s not a note the routine has to remember, it&#39;s code that refuses to let anything else happen.</p><p>I’m deliberately keeping the pace measured because the goal isn’t to see how many connectors I can generate. I want each one to add something meaningful to the community repo, ideally a useful connector pattern that someone else can pick up and use in their own work. I also don’t want to overwhelm the Fivetran team reviewing these contributions. For now, I still handle the final merge myself once a pull request is ready.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60cf49576852" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build AI Skills for AI Leverage (and Improve Them Every Time You Use Them)]]></title>
            <link>https://medium.com/@kelly.kohlleffel/build-ai-skills-for-ai-leverage-and-improve-them-every-time-you-use-them-a2e5ff626d07?source=rss-47129bfda899------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2e5ff626d07</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[fivetran-connector-sdk]]></category>
            <category><![CDATA[claude-skills]]></category>
            <category><![CDATA[cortex-code-skills]]></category>
            <category><![CDATA[snowflake-cortex-code]]></category>
            <dc:creator><![CDATA[Kelly Kohlleffel]]></dc:creator>
            <pubDate>Mon, 23 Mar 2026 13:54:56 GMT</pubDate>
            <atom:updated>2026-03-23T13:54:56.198Z</atom:updated>
            <content:encoded><![CDATA[<h4>Lessons on Skills from contributing to the Fivetran Connector SDK examples repo</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z4qDI98v3BVTaTmHZxLFCg.png" /><figcaption>Using the Fivetran Connector SDK Submission Skill in either Claude Code or Cortex Code</figcaption></figure><h3>A skill that worked, but could be better</h3><p>I already had an AI skill for submitting custom connectors to the official <a href="https://fivetran.com/docs/connectors/connector-sdk">Fivetran Connector SDK</a> examples repository. I’d used it on a previous submission, and it covered the core workflow, including credential scrubbing (if needed), directory placement, git workflow, and PR creation, but I still needed a significant amount of guidance from the Fivetran product team to make it all the way through the process.</p><p>I had built a connector for the Oura Ring API (one of my favorite APIs since it holds my health data), pulled daily activity, sleep, readiness, stress, and heart rate data across five tables, ran fivetran debug with all records landing cleanly, and ran my submission skill to push it through to the example repo. The skill worked fine for the basics, but this connector hit different edges than the previous one. The upstream work was different, so the downstream process surfaced things the skill hadn&#39;t needed to handle before.</p><p>This post is about that experience and how skills need to be continually refined. The skill went through multiple iterations as I kept using it, and each time something new came up that was worth building in for the next time to help save time and effort.</p><h3>What the Fivetran Connector SDK does</h3><p>Before I get into the skill, it’s worth understanding what the Fivetran Connector SDK makes possible for every Fivetran customer. Fivetran ships over 750 pre-built connectors that cover the vast majority of data movement needs. But every organization has 20–30, if not a couple of hundred, sources that aren’t in the Fivetran catalog and are very specific to their organization. Maybe it’s a wearable health API, a proprietary inventory system, or a government open data feed that updates quarterly.</p><p>The Fivetran Connector SDK lets you write a Python-based connector for any data source and deploy it directly into the Fivetran platform. Your custom connector gets the same scheduling, monitoring, schema management, and destination delivery as every other Fivetran connector, with no separate infrastructure to maintain. Fivetran’s ceiling doesn’t stop with the 750 connector catalog, it’s pretty much any source with an API.</p><p>So I wanted to contribute my Oura Ring connector back to the community examples repo so others could use it as a reference, and that contribution process is where this skill evolution started.</p><h3>What’s an AI skill, and why does it matter?</h3><p>A skill is a structured markdown document that teaches an AI coding assistant how to perform a specific workflow. Think of it as encoding expertise into a repeatable playbook for standardization, predictability, and acceleration that an AI assistant can follow step by step. I use skills with <a href="https://docs.anthropic.com/en/docs/claude-code">Claude Code</a> and <a href="https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-code">Snowflake Cortex Code</a>, but the same markdown files work with other AI coding environments that support custom instructions, so the approach is portable across tools.</p><p>My first version of the Fivetran Connectors SDK submission skill covered the process for one contributed connector and addressed scrubbing credentials from configuration files, placing files in the correct directory, creating a feature branch, and opening a PR. It was a reasonable starting point, but it also lacked some key aspects that became apparent in the second connector submission.</p><h3>CI found some gaps on the first push</h3><p>I submitted the Oura Ring connector and CI failed on the first push. The Fivetran repo has specific formatting and linting requirements for black and flake8 that were different from the defaults I’d been using locally. None of the issues were difficult to fix individually, but each one was a rule that my skill should have caught before I pushed.</p><p>So I updated the skill with the correct formatting commands, the right linting configuration, and a pre-push validation step. Every one of those rules was something I hadn’t known about until CI told me, but it was used to better inform my submission skill.</p><h3>What the PR review taught me about my skill</h3><p>CI passed, and I opened the PR, and then the Fivetran SDK team reviewed it and flagged some conventions that again my skill was not proactively catching. And this is an important distinction for me because the connector itself worked fine. It synced data correctly, handled pagination, and managed state, but getting a connector approved as an official example in the Fivetran CSDK repository is a different bar than getting a connector to work. The examples repo has specific conventions around docstrings, placeholder formatting, README structure, and file organization that don’t affect whether the connector runs in your local environment but do affect whether it gets merged into the Fivetran example repo.</p><p>For example, the schema() function needs the exact SDK template docstring with a specific documentation URL, not a paraphrase. Configuration files need angle-bracket placeholders like &lt;YOUR_ACCESS_TOKEN&gt; instead of descriptive strings like &quot;your_token_here&quot;. Table headings in the README need to be uppercase. The accreditation line belongs inside the &quot;Additional considerations&quot; section rather than as its own heading. If the connector doesn&#39;t need extra dependencies, you skip the requirements.txt entirely.</p><p>I was counting on my existing skill to handle most of this, and it didn’t. These are standards that my skill had no way to know about until someone flagged them during a review, even though I had done my best to capture the submission requirements during initial skill creation and build.</p><p>I ended up updating my connector-builder skill (which generates connector code) to include new anti-patterns and checklist items. Plus, the connector submission skill got README validation, schema URL checks, and checkpoint comment verification, and all of that came from a single PR review cycle.</p><p>I think this is actually the most valuable type of skill update you can make. Your initial version of a skill only captures what you know based on a limited frame of reference, and it’s not until you’ve been through a few real builds and reviews that the skill starts to fill out to capture the edge cases. The reviewer feedback helps flesh it out quickly because they’re bringing context that’s sometimes difficult to get on your own.</p><h3>Anticipating what reviewers will always ask</h3><p>I pushed the fixes, CI went green, and I waited for PR re-review. One of the reviewer’s responses was, “Can you please test with fivetran debug along with test data and add the details.&quot;</p><p>I already had the test results from the initial build, but I hadn’t included them in the PR. It makes sense that a reviewer wants to see proof that the connector actually works before approving it, but I was creating unnecessary round trips by waiting for the request instead of providing the results up front.</p><p>Since I always run fivetran debug to test the connector before submitting, I had the results. I just hadn&#39;t included them in the PR after the most recent set of changes. My next version of the submission skill added a step to capture the sync summary with tables, record counts, upserts, and checkpoints, format it as a markdown table, and include it directly in the PR description so reviewers see the test results up front. Later on, I also added the raw debug output as a collapsible details block under the summary (this additional detail was added to the skill as well).</p><h3>Process matters as much as code</h3><p>The code issues were fixed, and I’d posted the debug results, but the PR was still sitting in “Changes Requested,” and I wanted to get it approved and off my plate.</p><p>The problem wasn’t technical this time, it was how I communicated the fixes to the Fivetran team. The reviewers had left specific inline comments, but I’d posted a single detailed comment with how I had addressed everything. But a combined message makes it more difficult for a reviewer who has eight open comment threads to resolve. They have to reread every diff to verify each concern individually, which can take unnecessary time when they’re reviewing dozens of PRs.</p><p>So I went back and replied to every comment thread with a specific commit reference such as “Fixed in commit 156d756&quot;, &quot;Removed in commit d9f4c0c&quot;, &quot;Applied all table heading suggestions.&quot; Then I posted a summary tagging every reviewer with a commit-by-commit breakdown of what was addressed. That became the input for the current final version of the skill, and it had nothing to do with code quality.</p><h3>Five iterations in 17 days</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*cGofDzUujr2jsk_Z7P5bMg.png" /></figure><p>Every version was triggered by a real failure, not just a planning session. If something broke or stalled, I fixed it and added instructions to the skill to prevent it from happening again.</p><h3>The pattern you can apply to your own skills</h3><p>If you’re building AI coding skills for Claude Code, Cortex Code, or any tool that supports custom instructions, I believe this approach works well:</p><ol><li>Start with what you know and use it immediately on real work. Don’t wait for the skill to be “complete” because it never will be. The gaps will show up under real conditions as you are using the skill.</li><li>Treat every failure as a skill update. When CI breaks, that’s a missing pre-push check, or when a reviewer catches something, that’s a missing validation rule, and when the process stalls, that’s a missing workflow step. Each failure is basically the feature request for version N+1.</li><li>Expect the skill to expand beyond code. My submission skill started as “scrub credentials and open a PR” and ended up managing CI formatting, live testing, PR descriptions, and reviewer communication. That expansion is natural, and I think it’s a sign the skill is maturing.</li><li>Think about how you can share it with your team. We have started a shared skills repository for our team, so when I update the submission skill, everyone on our team gets the improvement. The next person submitting a connector won’t hit the same CI failures, won’t get the same reviewer feedback, and won’t have their PR sit idle for the same reasons.</li></ol><h3>The bigger picture</h3><p>The Fivetran Connector SDK means that any API can become a Fivetran connector. The 750+ catalog is a starting point, not a limit, but contributing connectors back to the community, with all the SDK conventions, CI requirements, and review standards involved, has a bit of added complexity and requires standardization.</p><p>That complexity and standardization is exactly the kind of thing AI skills are built for. And the skills get better every time you use them, which is the compounding effect that makes this approach worth investing in.</p><p>If you’re interested in building your own Fivetran connectors, the <a href="https://fivetran.com/docs/connectors/connector-sdk">Connector SDK documentation</a> is the best place to start. And if you’re building AI skills for any workflow, don’t wait until the skill feels complete because you likely won’t know. Just start using it and make adjustments as needed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2e5ff626d07" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From My Oura Ring to a Working Snowflake Cortex Agent in 29 Minutes Using Cortex Code Skills]]></title>
            <link>https://medium.com/@kelly.kohlleffel/from-my-oura-ring-to-a-working-snowflake-cortex-agent-in-29-minutes-using-cortex-code-skills-0e8c3dbb7791?source=rss-47129bfda899------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e8c3dbb7791</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[cortex-code]]></category>
            <category><![CDATA[claude-skills]]></category>
            <category><![CDATA[snowflake-cortex-code]]></category>
            <category><![CDATA[cortex-skills]]></category>
            <dc:creator><![CDATA[Kelly Kohlleffel]]></dc:creator>
            <pubDate>Tue, 17 Mar 2026 12:42:51 GMT</pubDate>
            <atom:updated>2026-03-17T13:48:35.233Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Why Skills Are Replacing Prompt Engineering</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*2yZwd4c7-9wVO6db0LxCdA.jpeg" /><figcaption>My Oura ring and tennis racket with an image rendering courtesy of Google Gemini and Nano Banana</figcaption></figure><p>My wife gave me an <a href="https://ouraring.com/">Oura Ring</a> about three years ago, and I’ve been hooked on the real-time health data it collects ever since. Activity is my favorite metric to track (I play tennis three to four times a week, so there’s always something to measure). Sleep is the bane of my existence (and it has a big-time effect on my overall health. I’m an early to bed, early to rise guy). Readiness is directly tied to sleep for me, and probably for everyone. Heart rate and stress are less interesting to me personally since I typically run low to medium on stress levels.</p><p>The Oura app does a solid job surfacing daily summaries, and its Advisor capability keeps getting better. But the questions I actually want to ask go beyond what the app can show me today. Questions like: <strong><em>how does the time of day that I play tennis affect my sleep and readiness that same night?</em></strong> The data is all there in the ring. I just needed a way to ask more specific, regular questions of the data as I thought of them.</p><p>So I was prepping for an upcoming Snowflake webinar focused on Cortex Code and Skills, and I wanted a build that would resonate with the audience, something personal and fast that showed the full arc from raw data to a working Snowflake Cortex Agent. I looked at the ring on my finger and thought, <em>I wonder how fast I can get from here to a Cortex Agent that can answer those kinds of questions.</em> I’ve been testing Snowflake Cortex Code over the past month, and this time paired it with a couple of custom skills. Full disclosure: I’d built an Oura Ring connector previously, but I didn&#39;t want to reuse any of the learning or code from that experience.</p><p>The total build was 29 minutes, and the way I got there, using Cortex Code with Fivetran and Snowflake, taught me more about where AI-assisted development is headed than anything I’ve written in the <a href="https://medium.com/@kelly.kohlleffel/one-skill-two-ai-coding-assistants-snowflake-cortex-code-and-claude-code-92e0de8dfed2">two</a> <a href="https://medium.com/@kelly.kohlleffel/my-first-spin-with-snowflake-cortex-code-five-agents-in-one-evening-a16bd40317aa">previous</a> posts in this series.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*-l20-Y-_JR2CmVzhQfsixA.png" /><figcaption>Oura Health Agent in Snowflake Intelligence built with Cortex Code + Skills</figcaption></figure><h3>Prompt Engineering Is Dead (at least the way we thought about it just a year ago)</h3><p>I’ve been thinking (and sometimes saying) this a lot lately. <strong>Prompt engineering is gone, dead, in the way we used it and thought about it just a year ago.</strong> If you’re still investing time in crafting the perfect prompt, you’re working on the wrong thing.</p><p>What replaced it? <strong>Skills</strong> and <strong>Instructions.</strong></p><p>My 30-second pitch on Skills. Skills are the fastest way to gain AI leverage with standardization and predictability for ANY type of workflow. Development, sales, marketing, finance, operations, legal, you name it. Instead of crafting a one-time prompt and hoping for a good result, you formalize a workflow into a skill that consistently delivers repeatable outcomes. And then it gets better, because every time you use a skill, you can refine it, add guardrails, and eliminate failure modes you discovered along the way.</p><p>A prompt helps you once, but a skill helps you every time you do that same type of work. Skills compound over time, and that compounding is the most important thing about them.</p><h3>What 29 Minutes in Cortex Code Actually Looked Like</h3><p>The entire build happened inside Snowflake Cortex Code, Snowflake’s AI coding assistant powered by Claude. I chained three personal skills back-to-back:</p><p><strong>Phase 1:</strong> fivetran-connector-builder, to build a custom Fivetran connector for the Oura Ring API and get data flowing into Snowflake</p><p><strong>Phase 1b:</strong> fivetran-connector-sdk-submission, to package and submit the connector to the official Fivetran SDK examples repository</p><p><strong>Phase 2:</strong> cortex-mcp-alert-system-builder, to create a Snowflake Cortex Agent with semantic views over the synced data</p><p>The first two skills ran so fast that the connector was built, tested, deployed, and submitted before I even started on the Cortex Agent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*5Ag2LdKyBm-NHTbvjgQQ_w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r1vycOtFIRqPXqaKidku6A.png" /><figcaption>Oura data is flowing into Snowflake via the Fivetran custom connector: Cortex Code + Fivetran CSDK + Skills</figcaption></figure><p>By the end, I had my most recent 1,678 health records flowing through Fivetran into Snowflake, a unified semantic view joining activity, sleep, readiness, and stress data across 23 facts and 3 dimensions, and a Snowflake Cortex Oura Health Agent that could now answer the exact kind of question I couldn’t get from the Oura app, like “How does the time of day that I play tennis affect my sleep and readiness?” with specific dates, scores, and trend analysis. The whole pipeline, from Oura Ring API through Fivetran ingestion to Snowflake Cortex Agent, was built conversationally in Cortex Code without leaving the terminal.</p><p>The Fivetran connector build was clean, and Cortex Code, guided by the skill, ran a structured interview, gathered API requirements, confirmed that Oura offers Personal Access Token authentication (simpler than OAuth2 for headless connectors), generated SDK v2+ compliant code on the first pass, and deployed in about 7 minutes. One minor hiccup: the SDK didn’t auto-detect the configuration file, and I needed an explicit --configuration flag, which is standard when using the Fivetran Connector SDK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0J2ebLeexw7OoV8lq4zog.png" /><figcaption>Cortex Code using my personal Fivetran Custom Connector Builder Skill</figcaption></figure><h3>When the Bundled Skill Fell Short, a Personal Skill Closed the Gap</h3><p>Phase 2 is where I learned something important about the relationship between bundled skills and personal skills.</p><p>I started with the bundled Snowflake semantic-view skill that ships with Cortex Code. It’s a reasonable starting point, and for many use cases it probably works fine. But in this build, it generated incorrect SQL syntax for CREATE SEMANTIC VIEW and produced multiple compilation errors. I spent about 12 minutes troubleshooting in Cortex Code before I made the call to pivot.</p><p>I switched to my personal cortex-mcp-alert-system-builder skill, which contains a working reference implementation from a Higher Education (HED) student retention agent I&#39;d built previously. That reference had correct semantic view DDL patterns, working facts/dimensions/extensions syntax, and a proven agent configuration structure.</p><p>The personal skill got the semantic view and agent working on the first try. The remaining 10 minutes were refinement: adding a display name, orchestration instructions based on the HED pattern, health score thresholds, and 10 sample questions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*RQ12zG_jxJ2BBCM0lyJDTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*exQ5_xQRwc-osL3wQMoQIA.png" /><figcaption>Final semantic view built with a Personal Skill in Cortex Code</figcaption></figure><p>I want to be fair about this because this isn’t a knock on bundled skills. I have a library of Snowflake bundled skills I’d never build personally, and they’re great to grab off the shelf when I need something outside my usual workflows. But this experience did shape my thinking about the balance between bundled and personal.</p><p><strong>Personal skills earn trust through iteration.</strong> Almost every time you use a skill, you’ll want to tweak something, add a guardrail, or fix a rough edge. If my fivetran-connector-builder skill has issues one day, I&#39;ll refine it, and the next day those same issues are gone for the next build. That cycle of use, refine, and improve is what builds deep trust over time.</p><p><strong>Bundled skills give you breadth you’d never build yourself.</strong> There are bundled Snowflake skills covering data lineage, profiling, migration, and more. They’re valuable precisely because they extend your reach without requiring your investment.</p><p><strong>The best thing you can do</strong> is take a bundled skill and customize it for how you work, how you build, how you market, and how you work with customers. Make it more personal to your workflow and use case. And all of them, personal and bundled, are available in Cortex Code. You can invoke a specific skill when you want or let Cortex Code choose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0MPcgApQywGqKMcSzvrgFQ.png" /><figcaption>Personal Skills and Bundled Skills are available in Cortex Code</figcaption></figure><h3>Cross-Skill Workflows: Skills That Chain Into Each Other</h3><p>This build demonstrated something I’m genuinely excited about as an emerging pattern: <strong>cross-skill workflows.</strong> I chained fivetran-connector-builder into fivetran-connector-sdk-submission into cortex-mcp-alert-system-builder inside Cortex Code, and the output of each skill became the input context for the next. The Fivetran connector built the data pipeline into Snowflake, the SDK submission skill packaged and submitted it to the official Fivetran Connector SDK examples repository, and then the Cortex Agent builder created the intelligence layer on top of the synced data. Cortex Code orchestrated the entire sequence conversationally.</p><p>This isn’t a one-off for me as I’ve mapped out several cross-skill chains that I’m actively using:</p><pre>Chain A: Data Pipeline to Analytics to Alertsfivetran-connector-builder<br>    |-&gt; fivetran-connector-sdk-submission (submit to official repo)<br>    |-&gt; dbt-project-builder<br>         |-&gt; dbt-transformation-census-activation-builder<br>         |    |-&gt; cortex-mcp-alert-system-builder<br>         |-&gt; cortex-mcp-alert-system-builder (direct)<br>              |-&gt; fivetran-connector-builder (loop back)<br>Chain B: Cortex AI<br>cortex-agent-orchestrator<br>    |-&gt; cortex-mcp-alert-system-builder<br>         |-&gt; fivetran-connector-builder (loop back)<br>Chain C: SE Productivity<br>account-research-brief-generator<br>    |-&gt; session-prep-followup-generator<br>    |    |-&gt; product-update-communication-builder<br>    |-&gt; product-update-communication-builder<br>         |-&gt; session-prep-followup-generator</pre><p>If you notice the loopbacks, skills don’t just have to chain linearly. They can feed back into each other, creating continuous workflows rather than one-way pipelines. A Cortex Agent build might surface a need for a new data source, triggering the connector builder, which then feeds back into the agent builder for a richer semantic view.</p><p>One thing I’d suggest is that when you create a new skill, let Cortex Code analyze all of your skills and suggest cross-skill workflow candidates. You may discover combinations you hadn’t considered.</p><h3>Reference Implementations Are the Secret Ingredient</h3><p>The reason my personal skill succeeded where the bundled skill didn’t comes down to one thing: <strong>a working reference implementation.</strong></p><p>The cortex-mcp-alert-system-builder skill includes the HED student retention agent as a complete, tested reference. When I pointed it at the Oura health data, the skill had a production-proven pattern to follow. Correct CREATE SEMANTIC VIEW syntax with facts, dimensions, and extensions, and a working agent spec with orchestration and response instructions, plus sample questions that actually map to real metrics. The HED reference accelerated this build, and without it, the debugging of semantic view DDL syntax in Cortex Code would have taken much longer.</p><p>My advice for anyone building skills is this:</p><p><strong>Keep the skill.md focused.</strong> Separate out references so it doesn’t get too large. My orchestrator builder skill evolved into a hub-and-spoke structure, with a main SKILL.md that handles the shared workflow and A2A REST specifics and troubleshooting loaded as separate reference files only when needed. Multi-Tool users never see the A2A REST content, so the context stays focused.</p><p><strong>Include at least one working reference implementation.</strong> Provide a real example that you’ve actually built, tested, and deployed, because that’s what the skill will use as its pattern when it builds the next one.</p><p><strong>Package it up.</strong> Skill.md plus a reference folder equals a skill package that Cortex Code can use. Updating any piece is as simple as editing text, or better yet, asking Cortex Code to update it for you.</p><h3>There is a Compounding Effect</h3><p>If you’ve been following this series, you’ve watched a compounding effect play out across three posts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*M9PuwWWY8WBdR_ovXy0_HA.png" /><figcaption>The compounding effect of Skills</figcaption></figure><p>Each build refines the skill and each refinement eliminates a failure mode. The skill I used for the Oura connector had already absorbed lessons from previous builds, including SDK v2+ compliance, pagination patterns, state management, and configuration file handling. The result was a first-pass success with zero code revisions needed.</p><p>Skills compound, and they don’t just save time on the current build. They make every future build faster, more reliable, and more consistent.</p><h3>Skills Beyond Code</h3><p>Skills aren’t limited to building Snowflake Cortex Agents in Cortex Code or Claude Code. Any repeating workflow you run through either tool can be formalized into a skill.</p><p>A hospital administrator can formalize the process for reviewing and routing patient discharge summaries. A marketing team at a consumer brand can standardize how campaign performance gets analyzed and reported to leadership. A finance team can build a skill for quarterly close procedures. A construction project manager can build one that ensures every change order follows the same documentation and approval steps. An operations manager at a manufacturing company can standardize how production downtime gets documented and escalated so every incident follows the same root-cause analysis process. The pattern is universal, and none of those examples involve writing a single line of code.</p><p>Anyone, regardless of role, level, or industry, should <strong><em>ask themselves: How can I use their skills to accelerate my work and bring more standardization and predictability to how things get done?</em></strong></p><blockquote>I like how <strong>Peter Yang, Product Lead at Roblox</strong>, stated it in a recent LinkedIn post, <strong>“My job is to automate my job. That’s all of our jobs from now on.”</strong></blockquote><h3>For Leaders: The 2026 Imperative</h3><p>If you aren’t using skills right now, you’re leaving money on the table.</p><p>This isn’t about teaching your team prompt engineering or helping them become “prompt engineers.” That’s yesterday’s conversation. The question for leaders in 2026 is: <strong><em>How do I give my team AI leverage and acceleration with skills?</em></strong></p><p>Skills are the biggest accelerator for using AI effectively and driving value. They’re easy to use once you understand the pattern, and they’re applicable to every role, every level, every organization, and every industry.</p><p>The compounding effect means the earlier you start, the more value you accumulate. A skill created today gets refined tomorrow, shared next week, and drives consistent outcomes across your organization for months to come.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*xSJSvAfZxfaeH0sYhatzjw.png" /></figure><h3>The Bottom Line</h3><p>I started with nothing but an Oura Ring on my finger and some API documentation. Twenty-nine minutes later, using Snowflake Cortex Code with three custom skills, I had a production-ready Fivetran custom connector syncing 1,678 health records into Snowflake, a unified semantic view, and a Cortex Agent answering conversational questions about my sleep, activity, readiness, and stress patterns that my Oura Ring application couldn’t.</p><p>The speed came from the skills, not from me. They’ve been refined across multiple builds, and Cortex Code with Fivetran and Snowflake made the whole thing feel like a conversation instead of a project. The skills already knew the patterns, had working references baked in, and handled the sequencing and validation that used to eat up most of my build time.</p><p>Prompt engineering got me started four years ago, but skills in Cortex Code are how I actually get things built in Snowflake now.</p><p><em>If you want to explore building your own skills for Cortex Code, the Cortex Agent Orchestrator Builder skill is available at github.com/kellykohlleffel/cortex-code-skills. Drop it into your Claude Code skills directory (where Cortex Code can also pick it up) and the next time you need to build a Snowflake Cortex Agent, just ask for one.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e8c3dbb7791" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One Skill, Two AI Coding Assistants (Snowflake Cortex Code and Claude Code)]]></title>
            <link>https://medium.com/@kelly.kohlleffel/one-skill-two-ai-coding-assistants-snowflake-cortex-code-and-claude-code-92e0de8dfed2?source=rss-47129bfda899------2</link>
            <guid isPermaLink="false">https://medium.com/p/92e0de8dfed2</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[claude-skills]]></category>
            <category><![CDATA[snowflake-cortex-code]]></category>
            <category><![CDATA[cortex-code]]></category>
            <category><![CDATA[cortex-code-skills]]></category>
            <dc:creator><![CDATA[Kelly Kohlleffel]]></dc:creator>
            <pubDate>Tue, 03 Mar 2026 13:37:34 GMT</pubDate>
            <atom:updated>2026-03-03T13:37:34.369Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building Snowflake Cortex Orchestrator Agents with Shared Skills</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YHHKIBJwJdKzzDc_daLXXQ.png" /><figcaption><em>The LocalLink Hospitality A2A orchestrator operating in Snowflake Intelligence as it routes a cross-domain question across multiple sub-agents.</em></figcaption></figure><p>In my <a href="https://medium.com/@kelly.kohlleffel/my-first-spin-with-snowflake-cortex-code-five-agents-in-one-evening-a16bd40317aa">last post</a>, I took Snowflake Cortex Code for a first spin and had five working agents in a single evening, including an A2A REST-based orchestrator agent. One thing I noted at the time was that the cold start added some overhead (time). The first agent took 39 minutes because Cortex Code had to discover syntax, learn patterns from existing agents in my account, and iterate through DDL formatting on its own, but once it learned my patterns, everything after got faster.</p><p>That thought stuck with me and in prepping for an office hours session this past week, I built one more orchestrator agent for the financial services industry. I found myself following the same sequence of instructions as before including discovering the warehouses, inspecting the semantic views, choosing between Multi-Tool and A2A REST, generating data-grounded sample questions, creating the agent via REST API, etc. The steps, instructions, and gotchas were very similar to those before. This was yet another repeating workflow that I needed to formalize with a Cortex Code skill.</p><h3>Skills: The Shared Layer Between Snowflake Cortex Code and Claude Code</h3><p>If you read the previous post, you&#39;ll remember that one of the things that stood out most to me about Cortex Code was the shared skill layer with Claude. A skill I create for Claude Code is immediately available in Cortex Code, and vice versa. They&#39;re just structured markdown files stored locally, and both tools read them.</p><p>Your own Claude Code skills are listed as Your Project Skills (Custom)and there are also development skills, data lineage and profiling, as well as migration (snowconvert-assessment). I expect this list to continue to expand almost daily. If you haven&#39;t seen them yet, here are some of the Snowflake bundled skills available:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*CEWJtD5YesXZ20zCJtxy3w.png" /><figcaption>Cortex Code Bundled Skills</figcaption></figure><p>Since I knew that approach worked, I created the Cortex Agent Orchestrator Builder skill in Cortex Code and deployed it to my regular Claude Skills directory. That gives me complete freedom to use the skill from either Cortex Code or Claude Code, depending on which CLI I&#39;m in. I have two AI coding assistants with a shared playbook, so I avoid duplication, additional syncing, or any export/import steps.</p><p>For me, this continues to be the most powerful thing about Skills. They compound and every workflow you formalize becomes available everywhere you work, and they get better as you refine them over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZqD8Y21ULwVnOxOiVr38ow.png" /><figcaption><em>The orchestrator builder skill’s hub-and-spoke structure: a main SKILL.md with A2A REST and troubleshooting references loaded only when needed.</em></figcaption></figure><h3>What the Orchestrator Builder Skill Actually Does</h3><p>The skill encodes everything I learned from building orchestrators through back-and-forth conversations with Cortex Code into a 7-phase guided workflow with mandatory stopping points. Without the skill, you&#39;re steering Cortex Code through each step conversationally, catching issues as they come up and course-correcting along the way. With the skill, Cortex Code already knows the full workflow. You trigger it and monitor progress, stepping in at the mandatory checkpoints to confirm selections, while the skill handles the sequencing, guardrails, and validation on its own.</p><p><strong>Phase 0: Infrastructure Discovery.</strong> This runs first every time. The skill will never assume a warehouse named COMPUTE_WH exists. It runs SHOW WAREHOUSES and asks you to pick one, and it prevents the most common first-time failure I ran into.</p><p><strong>Phase 1: Agent Discovery and Selection.</strong> The skill discovers all available Cortex Agents in your account and presents them for you to choose from. You select which 2–6 sub-agents to include in the orchestrator. It always asks, even if you say &quot;all agents,&quot; because confirming the selection prevents surprises downstream.</p><p><strong>Phase 2: Semantic View Analysis.</strong> Before generating a single sample question, the skill inspects every semantic view and documents the actual dimensions, metrics, and dimension values. It also uses cortex semantic-views ddl to discover the actual underlying table name rather than guessing. The skill enforces exact matching so you don&#39;t have to.</p><p><strong>Phase 3: Pattern Selection.</strong> The skill presents both orchestration options with trade-offs, the same trade-offs I described in the previous post. Multi-Tool builds multiple Cortex Analyst tools into a single agent, giving you SQL visibility, faster response times, and simpler debugging. It continues to work very well and is the simpler path for most use cases. I just used this pattern again to build a Cortex Agent for our team&#39;s internal use. A2A REST gives you true agent isolation when you genuinely need it (different security contexts, different team ownership, compliance). The skill supports and recommends both, but defaults to Multi-Tool, which aligns with my conclusion after building both patterns.</p><p><strong>Phase 4: A2A Infrastructure (A2A REST only).</strong> If you chose A2A REST, the skill creates Python UDFs and for each sub-agent that call the Cortex Agent REST API with the correct headers, inline configuration, and execution environment format. It then tests each UDF individually before wiring them into the orchestrator. These are the only Snowflake Agent tools you need for the A2A orchestrator agent.</p><p><strong>Phase 5: Sample Question Generation.</strong> The skill generates 10 data-grounded questions using only the real metrics, dimensions, and values discovered in Phase 2. Questions are structured in tiers: single-agent questions that target one sub-agent, two-agent cross-domain questions, and a full-orchestration question that requires all sub-agents. This ensures the orchestrator gets tested across its complete routing logic.</p><p><strong>Phase 6: Question Validation.</strong> Every sample question gets tested using a 3-tier approach: simple tests (one sub-agent, CLI or Snowflake Intelligence), medium tests (two sub-agents, Snowflake Intelligence), and full tests (all sub-agents, Snowflake Intelligence). This is the checkpoint that catches dimension mismatches and metric references that appear to be correct but match nothing.</p><p><strong>Phase 7: Agent Creation and Deployment.</strong> The skill creates the complete agent_spec.json, deploys the agent through the REST API, sets profile metadata, and validates the configuration isn&#39;t empty. It also includes optional real-time thinking instructions, so the orchestrator streams its reasoning as it routes questions to sub-agents, creating a much more interactive experience in Snowflake Intelligence.</p><h3>A Skill That Gets Better Each Time You Use It</h3><p>I continued to update the skill after each orchestrator I built with Cortex Code. Every time I hit an issue, I added a guardrail so the next build wouldn&#39;t run into the same problem. A few examples:</p><ul><li>SQL CREATE AGENT silently produced some empty specs, so the skill enforces REST API creation and verifies the config afterward</li><li>Assumed warehouse names like COMPUTE_WH cause downstream failures and cost you time, so the skill runs SHOW WAREHOUSES first and asks you to pick a verified one from the list</li><li>Sample questions that reference metrics or dimension values that don&#39;t exist in the semantic view return empty results with no error, so the skill inspects every semantic view before generating any questions</li><li>A missing &quot;type&quot;: &quot;warehouse&quot; field in the execution environment produces an error that doesn&#39;t tell you what&#39;s actually wrong, so the skill templates it correctly from the start</li><li>When 3–4 sub-agents each return verbose responses, the combined output exceeds practical limits and the orchestrator notes that responses appear truncated. The skill now bakes conciseness instructions directly into every sub-agent UDF to keep responses data-focused and within bounds</li></ul><p>I expect the skill to continue evolving as I have requirements to build more orchestrators and as Snowflake adds new capabilities to Cortex.</p><h3>From 39 Minutes to About 10</h3><p>The past few days, I&#39;ve been running Claude Sonnet 4.6 (Opus 4.6 is also available in Snowflake Cortex) for all of my Cortex Code agent builds, and it&#39;s been excellent. I used the skill with Cortex Code to build a Hospitality LocalLink A2A orchestrator that coordinates four hospitality guest services agents: Performance (satisfaction and ratings), Optimization (inefficiencies and improvements), Financial (costs and ROI), and Strategic (roadmaps and recommendations). Each sub-agent has its own semantic view, and the orchestrator routes questions to the right specialist or fans out across multiple agents for cross-domain analysis.</p><p>The whole build in Cortex Code, from infrastructure discovery through creating and testing four UDFs, generating validated sample questions, and deploying a working orchestrator into Snowflake Intelligence, takes about 10 minutes. The biggest chunk of that time is the UDF testing, since each test is a live Cortex agent call via REST API that takes 15–25 seconds. With four sub-agents to validate, that&#39;s about 90 seconds waiting for agent responses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HgDaT8P2hT81vePA6vrFiQ.png" /><figcaption><em>Cortex Code is executing the orchestrator builder skill, with the skill handling sequencing and validation while I monitor progress at the checkpoints.</em></figcaption></figure><p>Compare that to the first A2A REST orchestrator agent build in the previous post, which took 39 minutes. The skill eliminates the discovery time, avoids the issues I described above, and gets you to a validated, working orchestrator agent much quicker (roughly 4–5x faster).</p><h3>The Skills Pattern Is Important Beyond Orchestrator Agents</h3><p>Any repeating workflow you run through Cortex Code or Claude Code can be formalized into a skill that makes the process reliable, repeatable, and shareable. The orchestrator agent builder captures lessons I learned over multiple builds and makes them available to anyone who installs the skill. You don&#39;t have to waste any time, just start building a Snowflake Cortex orchestrator agent.</p><p>I expect this pattern to become more common as Snowflake Cortex Agents mature, and right now, the skill supports both orchestration patterns and coordinates 2–6 sub-agents (I set the min at 2 and max at 6 in the skill). As Snowflake adds native A2A features to Cortex, the skill will evolve with them. The skill itself has already evolved from a single markdown file into a hub-and-spoke structure, with a main SKILL.md that handles the shared workflow, and A2A REST specifics and troubleshooting loaded as separate reference files only when needed. Multi-Tool users never see the A2A REST content, which keeps the context focused. Updating any piece is as simple as editing text, or better yet, asking Cortex Code to update it for you.</p><p>It&#39;s worth noting that skills aren&#39;t just for Cortex Code, Claude Code, and developing Cortex Agents. I genuinely believe that anyone, regardless of role, level, or industry, should ask themselves how they can use skills to accelerate their work and bring more standardization to how things get done.</p><h3>Try It Out</h3><p>The Cortex Agent Orchestrator Builder skill is available at <a href="https://github.com/kellykohlleffel/cortex-code-skills">github.com/kellykohlleffel/cortex-code-skills</a>. You can ask Cortex Code to drop the skill markdown file into your Claude Code skills directory for you, and the next time you need to build an orchestrator agent, just ask for one and the skill handles the rest.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92e0de8dfed2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Spin with Snowflake Cortex Code: Five Agents in One Evening including A2A]]></title>
            <link>https://medium.com/@kelly.kohlleffel/my-first-spin-with-snowflake-cortex-code-five-agents-in-one-evening-a16bd40317aa?source=rss-47129bfda899------2</link>
            <guid isPermaLink="false">https://medium.com/p/a16bd40317aa</guid>
            <category><![CDATA[cortex-code]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[snowflake]]></category>
            <category><![CDATA[snowflake-cortex-code]]></category>
            <dc:creator><![CDATA[Kelly Kohlleffel]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 16:41:50 GMT</pubDate>
            <atom:updated>2026-02-20T12:20:05.692Z</atom:updated>
            <content:encoded><![CDATA[<h4>If you’ve been using Claude and Claude Code, you’ll feel right at home.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hsjXI1x_6iyj3iW6CIYVNw.png" /></figure><p>A week ago, I used Snowflake Cortex Code for the first time inside Snowflake Snowsight to build a couple of simple Streamlit apps. That was my first exposure to it (it went GA just recently), but it was enough to get me interested in testing the CLI version of Cortex Code, and all my Snowflake friends were giving rave reviews and encouraging me to try it. So I installed the Cortex Code CLI and started using it for the first time with a specific goal in mind. I wanted to replicate something I had already built using an MCP server.</p><p>That prior build, covered in one of my <a href="https://medium.com/@kelly.kohlleffel/mcp-as-an-intelligent-orchestration-layer-for-multiple-snowflake-cortex-agents-e427a29dca6d">last posts</a>, was a multi-agent MCP server that orchestrated multiple Snowflake Cortex Agents through a single conversational interface. It works really well, but the question I wanted to answer with Cortex Code was, can I get to the same place, maybe even faster, without leaving Snowflake?</p><p>The answer was yes, and I didn’t need to give Cortex Code a single line of prior code to do it.</p><p>One more thing worth saying upfront was that this was a deliberate cold start. I intentionally didn’t give Cortex Code any prior work to learn from, no sample JSON configs, no agent templates, or anything I’d previously built. I wanted to see what it would do on its own with simple prompts from me. That choice added some discovery time, and I’ll explain that more below.</p><h3>Quick Setup, Then Straight to Work</h3><p>Installation of the Cortex Code CLI was fast, and connecting to Snowflake was equally fast. The <a href="https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code-cli">instructions</a> were clear and straightforward, and within a few minutes, I was in a working session using my Snowflake account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-U6NyR5k26onheAA95Zqlw.png" /><figcaption>Cortex Code CLI in a VSCode terminal session</figcaption></figure><p>From there, the interaction with Cortex Code is completely conversational, even in the CLI. It doesn’t feel like a command-line tool. It feels like talking to Claude, because it essentially is. You ask questions, you get answers, you iterate. There’s no mode-switching between “now I write code” and “now I describe what I want.” You just describe what you want. If you’ve used Claude Code before, the ramp-up time is essentially zero.</p><p>The first thing I did was ask Cortex Code what it could do. Then I asked what skills it had access to, and I definitely liked the answer I got back.</p><h3>Skills: Out-of-the-Box (Cortex Code Skills) and Your Own (Claude Skills)</h3><p>Cortex Code ships with a solid set of bundled skills covering the things you’d actually use it for day-to-day in Snowflake:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zHeLkHE-WGRx6i2wdTggvA.png" /><figcaption>Output from this question to Cortex Code: “What skills do you have access to?”</figcaption></figure><p>That’s already a capable toolkit, and I’m sure many more will be added quickly.</p><p>And when I asked Cortex Code what else it had access to, it listed my custom Claude Skills, the project-specific skills I’ve built for my own workflows. Skills like kelly-working-preferences, fivetran-connector-builder, mcp-server-builder, etc., and more than a dozen others I’ve created over time.</p><p>Cortex Code reads them all (they are stored locally on my Mac), and it can use them. This means that I can create a skill once, inside my Claude skills repository, and use it interchangeably with Claude, Claude Code, Claude Desktop, or Cortex Code. I haven’t stress-tested every edge case yet, but based on what I saw in this session, the skill layer appears to be genuinely shared across interfaces.</p><p>For me, Skills are the most powerful innovation Anthropic has built into Claude right now, and the fact that they’re fully available in Cortex Code from day one, including your custom skills, sets Cortex Code apart. As you build skills over time, they compound in value everywhere you work.</p><h3>The Cortex Code Build: Agent 1 in 49 Minutes, Five Agents by Evening</h3><p>I didn’t hand Cortex Code a template or a pre-built config. I pointed it at a table, described what I wanted, and let it work.</p><p>The table: MY_DATABASE.INDUSTRIES_INSURANCE.ICP_RECORDS750 insurance claims records with 35 columns covering claim types, customer segments, amounts, processing times, satisfaction ratings, and operational costs.</p><p>I asked Cortex Code to analyze the dataset, create a semantic view in the same schema, and then build an agent that used that semantic view. One prompt. No additional context provided.</p><p>Here’s the timing detail that I pulled directly from the terminal logs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VVeVAPWNd0oXB7b_6p-LHQ.png" /><figcaption>Cortex Code: less than 3 hours to get the CLI installed and get to a working A2A build</figcaption></figure><p>The semantic view it created, ICP_CLAIMS_ANALYTICS_SV, came back with 11 facts, 18 dimensions, and 10 metrics. One thing I noticed immediately: Cortex Code figured out the correct DDL syntax by examining existing semantic views in my account using the GET_DDL function. I didn’t tell it to do that. It found other sample agents in my Snowflake account and learned the correct syntax and patterns by observation, and that’s what I was hoping to see from Cortex Code.</p><p>The cold start trade-off is worth acknowledging directly. I was tempted to give Cortex Code a sample agent configuration JSON upfront, but I held off because I wanted to see how long it would take on its own. If I had provided the configuration from the start, I estimate agent creation would have taken less than half the time. The learning and discovery phase adds real overhead that templates and examples eliminate. Something to keep in mind as you’re creating your second, third, and tenth agent is that the first one teaches Cortex Code your patterns and everything after gets faster.</p><h3>Getting the Agent Right</h3><p>The initial agent came back very close to what I wanted, but it was missing 4 things. I wanted a display name, an agent description, 10–12 example questions, and there should have been an icon representing the agent, so I flagged all four in a single message.</p><p>Cortex Code fixed them, and in doing so, it worked out the correct DDL structure for Cortex Agents. The COMMENT and PROFILE clauses go before the FROM SPECIFICATION block. The sample_questions need to be formatted as an array of {question: “…”} objects. These aren’t immediately obvious from the documentation, and getting there took a few iterations, but Cortex Code was doing the iterating, not me. I had already worked this out when I built a REST API Cortex Agent generator, and I was tempted to provide a sample file to Cortex Code, but again, I held off since I wanted to see what Cortex Code could do from scratch.</p><p>One thing I changed in the final sample questions: the initial set included routing prefixes like “Ask the Analytics Agent…” That puts the burden on me as a user to understand the underlying architecture and agent structure. Better design allows for natural business questions, where the orchestrator determines routing based on content. Just like I believe that an agent’s users shouldn’t have to be (or become) prompt engineers, they also shouldn’t need to know what’s under the hood. They should just be able to ask what they want to know.</p><p>The final agent created by Cortex Code ended up with 12 working sample questions, a display name, an orange-colored document icon, and a description that accurately reflected the underlying data. Total time from first prompt to working Agent 1 with all metadata in place was 49 minutes. That includes data analysis, semantic view creation, agent creation, refinements, and getting it deployed into Snowflake Intelligence (which is just a matter of clicking “preview in Snowflake Intelligence”. The Q&amp;A, cost analysis, and documentation along the way are all baked into that number.</p><h3>Round Two: A Second Agent and Then Orchestration</h3><p>With the analytics agent working, I had Cortex Code build a second specialized agent, ICP_CLAIMS_PROFITABILITY_RISK_AGENT, backed by a second semantic view focused on financial performance and risk, including profit margins, operational costs, predicted outcome probabilities, and high-risk indicators.</p><p>Both agents drew from the same underlying dataset, just through different lenses, one focused on operational analytics and the other on financial performance and risk.</p><p>At this point, I had the same challenge I referenced in my MCP server post. Business questions naturally span two or three or more domains. “Which claim types have the longest processing times AND the highest operational costs?” isn’t a question for one agent, so I asked Cortex Code to build an orchestration layer.</p><h3>Getting to A2A Orchestration with Cortex Code</h3><p>My goal was agent-to-agent (A2A) orchestration, where one orchestrator agent coordinates two separate child agents as distinct services. I ended up creating three orchestration agents with Cortex Code in total as the architecture evolved, each one a step forward from the last.</p><p>The first was ICP_CLAIMS_ORCHESTRATION_AGENT, a multi-tool orchestrator that directly references both semantic views within a single agent, requiring no REST calls, no UDFs, and no external access integrations. It worked well out of the gate, and I’ll come back to why I ultimately preferred this pattern for most real-world scenarios.</p><p>The second was ICP_CLAIMS_ORCHESTRATION_A2A_AGENT, a conceptual A2A pattern that routes to the analytics and profitability agents, but it relies on the SNOWFLAKE.CORTEX.AGENT_RUN() SQL function, which exists but doesn’t actually execute tools. Child agents show intent to query but never run the SQL. It was a useful step for thinking through the routing logic, but not a working solution for true A2A.</p><p>The third was ICP_CLAIMS_ORCHESTRATION_A2A_REST_AGENT, the agent-to-agent implementation via REST API. Getting here required working through a couple of things that were less well documented, since A2A and multi-agent orchestration are not yet features in Snowflake Cortex.</p><p>The first REST approach used the stored agent endpoint: /api/v2/databases/…/agents/{name}:run. This returns a 401 due to role resolution issues with DEFAULT_ROLE when using PAT authentication and even with correct headers, the stored agent lookup fails. The solution that Cortex Code used was to switch to the inline configuration endpoint, /api/v2/cortex/agent:run, where you pass the complete agent configuration directly rather than referencing a stored agent by name. Once Cortex Code made that switch, the tools executed properly against real data.</p><p>Two specifics are worth calling out, and I didn’t track these down myself. Cortex Code found the correct format by examining existing code in the codebase, which proved faster and more reliable than working through the schema reference docs. If, for some reason, you’re doing this on your own without Cortex Code, here are a couple of call-outs:</p><p><strong>The </strong><strong>X-Snowflake-Authorization-Token-Type header is required.</strong> Without it, you get “JWT sub claim empty” errors even with a valid PAT token and a correct Authorization header. It’s easy to miss because the error message doesn’t point directly at the missing header.</p><p><strong>The </strong><strong>tool_resources format for generic UDF tools is specific.</strong> The working format requires “type”: “function”, “identifier” (not “udf”), and an “execution_environment” block with a warehouse inside it. The wrong format produces an “empty execution environment” error that similarly doesn’t tell you exactly what’s off.</p><p>Here’s the Snowflake Cortex agent orchestrator configuration I ended up with:</p><pre>{<br>  &quot;agent_name&quot;: &quot;ICP_CLAIMS_ORCHESTRATION_A2A_REST_AGENT&quot;,<br>  &quot;display_name&quot;: &quot;ICP Claims A2A REST Orchestrator&quot;,<br>  &quot;description&quot;: &quot;True Agent-to-Agent orchestration via REST API. This orchestrator invokes ICP_CLAIMS_ANALYTICS_AGENT and ICP_CLAIMS_PROFITABILITY_RISK_AGENT as separate services, enabling genuine multi-agent coordination with context flow. Each child agent maintains its own semantic view and executes queries independently, demonstrating a pattern where different teams could own and maintain specialized agents while a central orchestrator coordinates cross-domain insights.&quot;,<br>  &quot;instructions&quot;: {<br>    &quot;response&quot;: &quot;Response Format:\n- Present unified business insights\n- When using both agents, synthesize findings into actionable conclusions\n- Use tables for comparative data\n- Currency: $X,XXX.XX | Percentages: X.X% | Ratings: X.X/5&quot;,<br>    &quot;orchestration&quot;: &quot;You are the ICP Claims Agent-to-Agent (A2A) REST Orchestrator. You coordinate TWO SEPARATE Cortex Agents via REST API calls:\n\n## CHILD AGENT 1: ICP_CLAIMS_ANALYTICS_AGENT\n- Invoked via: call_analytics_agent tool\n- Expertise: Customer satisfaction (CSAT 1-5), processing times, claim status, outcomes, errors\n- Has its own semantic view: ICP_CLAIMS_ANALYTICS_SV\n\n## CHILD AGENT 2: ICP_CLAIMS_PROFITABILITY_RISK_AGENT  \n- Invoked via: call_profitability_agent tool\n- Expertise: Profit margins, operational costs, outcome probabilities, risk scores\n- Has its own semantic view: ICP_CLAIMS_PROFITABILITY_RISK_SV\n\n## ORCHESTRATION PROTOCOL:\n\n1. **ANALYZE** the user&#39;s question to determine which data domains are needed\n\n2. **ROUTE** to appropriate agent(s) based on the question content:\n   - Satisfaction, processing time, status, outcomes -&gt; call_analytics_agent\n   - Profit, margin, cost, risk, probability -&gt; call_profitability_agent\n   - Questions spanning both domains -&gt; Call BOTH agents\n\n3. **INVOKE** the child agent(s) by calling the appropriate tool(s)\n   - Formulate focused sub-questions for each agent based on their expertise\n   - The child agent will query its own data and return results\n\n4. **SYNTHESIZE** responses:\n   - Single agent: Present the agent&#39;s response clearly\n   - Both agents: Combine findings into unified business insights\n   - Draw conclusions that connect operational metrics with financial outcomes\n\n## IMPORTANT:\n- Each child agent is a REAL, SEPARATE Cortex Agent with its own tools\n- They execute their own queries against their semantic views\n- You are orchestrating, not directly querying data\n- For cross-domain questions, call BOTH agents and synthesize their responses&quot;<br>  },<br>  &quot;sample_questions&quot;: [<br>    &quot;How do customer satisfaction ratings correlate with profit margins across our customer segments?&quot;,<br>    &quot;Which claim types have both long processing times and high operational costs?&quot;,<br>    &quot;Compare Enterprise and Small Business customers on satisfaction and profitability&quot;,<br>    &quot;What is the relationship between claim approval rates and profit margins by category?&quot;,<br>    &quot;Where do we have low customer satisfaction but high profitability - potential churn risk?&quot;,<br>    &quot;Which claim types are most efficient - fastest processing with best margins?&quot;,<br>    &quot;How do high-risk claims impact customer satisfaction and overall profitability?&quot;,<br>    &quot;Give me a complete view of Auto claims - satisfaction, processing times, and financial performance&quot;,<br>    &quot;Which segments should we prioritize for satisfaction improvements to protect margins?&quot;,<br>    &quot;Provide a portfolio health check covering customer experience and financial metrics&quot;<br>  ],<br>  &quot;tools&quot;: [<br>    {<br>      &quot;name&quot;: &quot;call_analytics_agent&quot;,<br>      &quot;type&quot;: &quot;custom_function&quot;,<br>      &quot;description&quot;: &quot;Invokes the ICP_CLAIMS_ANALYTICS_AGENT via REST API. This is a SEPARATE Cortex Agent specialized in customer satisfaction, processing times, claim status, and operational metrics. Pass your question and it will query its own semantic view (ICP_CLAIMS_ANALYTICS_SV) to get the answer.&quot;,<br>      &quot;function_identifier&quot;: &quot;MY_DATABASE.INDUSTRIES_INSURANCE.INVOKE_ANALYTICS_AGENT_VIA_REST&quot;,<br>      &quot;database_schema&quot;: &quot;MY_DATABASE.INDUSTRIES_INSURANCE&quot;,<br>      &quot;warehouse&quot;: &quot;MY_WAREHOUSE&quot;,<br>      &quot;timeout&quot;: 180<br>    },<br>    {<br>      &quot;name&quot;: &quot;call_profitability_agent&quot;,<br>      &quot;type&quot;: &quot;custom_function&quot;,<br>      &quot;description&quot;: &quot;Invokes the ICP_CLAIMS_PROFITABILITY_RISK_AGENT via REST API. This is a SEPARATE Cortex Agent specialized in profit margins, costs, outcome probabilities, and risk assessment. Pass your question and it will query its own semantic view (ICP_CLAIMS_PROFITABILITY_RISK_SV) to get the answer.&quot;,<br>      &quot;function_identifier&quot;: &quot;MY_DATABASE.INDUSTRIES_INSURANCE.INVOKE_PROFITABILITY_AGENT_VIA_REST&quot;,<br>      &quot;database_schema&quot;: &quot;MY_DATABASE.INDUSTRIES_INSURANCE&quot;,<br>      &quot;warehouse&quot;: &quot;MY_LAB_WAREHOUSE&quot;,<br>      &quot;timeout&quot;: 180<br>    }<br>  ],<br>  &quot;metadata&quot;: {<br>    &quot;database&quot;: &quot;MY_DATABASE&quot;,<br>    &quot;schema&quot;: &quot;INDUSTRIES_INSURANCE&quot;,<br>    &quot;created_on&quot;: &quot;2026-02-19T12:23:01.372+00:00&quot;,<br>    &quot;owner&quot;: &quot;MY_ROLE&quot;<br>  }<br>}</pre><p>The orchestrator analyzes the user’s question, routes to the appropriate child agent(s), and combines the responses. Cross-domain questions go to both agents, each queries its own semantic view and returns results, and the orchestrator pulls it all together into a unified answer.</p><p>When I saw it working, I was genuinely pleased with what Cortex Code had accomplished in a very short period of time.</p><h3>My Take on the A2A Approach vs. the Multi-Tool Approach</h3><p>Here’s something worth sharing about how this actually played out as I was working with Cortex Code. Cortex Code built the multi-tool orchestrator first, and it built it in 11 minutes. It didn’t just default to that pattern either, in fact, it pushed back on my requested A2A approach multiple times, recommending the single-agent multi-tool design as the right architecture. Its reasoning was sound because I’d have one agent, two semantic view tools, no REST calls, no UDFs, no external access integrations, and full SQL visibility in the UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*_mk-60YZISY0no_VnRNB2w.png" /><figcaption>Multi-tool Agent (2 Cortex Analyst tools in a single agent) provides better visibility than A2A</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*xpz61yse-rpamCcczvYTHw.png" /><figcaption>Multi-tool Agent final result</figcaption></figure><p>I didn’t actually disagree that in this use case multi-tool was the right approach (I’ve used it before with Snowflake Cortex Agents very successfully), but I wanted to see if Cortex Code could get me more of a true A2A approach, and I had to push it down that path. The A2A REST implementation took 39 minutes, most of which was service setup and debugging (and again, convincing Cortex Code that I really wanted to do this). It delivered, but the contrast in effort was pretty distinct.</p><p>Cortex Code was right about one thing in particular regarding visibility with the A2A REST agent. I couldn’t see the SQL queries being executed. The child agents were running queries in the background and returning answers, but the queries themselves weren’t visible in the orchestrator UI. When you can’t see the query, it’s harder to trust the answer, and that matters a lot when you’re putting something in front of a business user or demoing to a customer. The multi-tool approach within a single agent doesn’t have this challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*yOlcJkh28GAa9QrQ2OakiA.png" /><figcaption>A2A REST Agent provides limited visibility into what is happening behind the scenes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*SBbzkeGzLfysjwUsB5KmZg.png" /><figcaption>A2A REST Agent final result</figcaption></figure><p>Query transparency is what builds trust in the results, but this A2A pattern trades that visibility for architectural separation. I’m guessing that when Snowflake adds A2A features to Snowflake Cortex (vs this type of custom build), this limitation and others will be addressed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5dgVj-EA6RTIde_Wsuhx8Q.png" /></figure><p>My recommendation is to use the multi-tool orchestrator for demos and production. Reach for the A2A REST pattern only when you genuinely need agent isolation, such as different security contexts, different team ownership, or compliance requirements that demand separate audit trails.</p><p>A parallel lesson from this session with Cortex Code is the same one I drew from the MCP server project. Most use cases today don’t actually need true A2A, and the multi-tool pattern delivers 90% of the coordination benefit with better transparency, faster execution, and simpler debugging. And in this case, Cortex Code did its best to convince me of that before going ahead and building it out.</p><h3>What Snowflake Is Building with Cortex Code</h3><p>One thing that stood out across the entire session is that Snowflake is deliberately mirroring the Anthropic product playbook (which is the best in the industry, in my opinion):</p><ul><li><strong>Cortex Code CLI</strong> = Claude Code</li><li><strong>Cortex Code in Snowsight</strong> = Claude Web UI</li><li><strong>Cortex Code Desktop (I assume will be available soon)</strong> = Claude Desktop</li></ul><p>That alignment goes beyond UI parity because Snowflake is also leveraging Anthropic’s engineering innovations directly, most importantly (for me), <strong>Skills</strong>. And as I noted earlier, that shared skill layer means improvements to Claude flow directly into the Snowflake experience.</p><p>When Anthropic ships something new, Snowflake customers benefit almost immediately <a href="https://www.anthropic.com/news/snowflake-anthropic-expanded-partnership">based on the partnership between the two companies</a>. The two platforms are moving together, and that’s a meaningful strategic advantage for Snowflake customers who are already building on Claude.</p><p>One thing worth noting: Claude Opus 4.6 and Claude Sonnet 4.6 (both brand new from Anthropic) aren’t yet available in Snowflake Cortex. Cortex Code was running on Claude Opus 4.5 for this session. I expect the newer models to appear in Cortex very soon (<a href="https://docs.snowflake.com/en/user-guide/snowflake-cortex/aisql#regional-availability">here’s the current list of what’s available in the Snowflake docs</a>), given the pace of alignment between the two platforms.</p><h3>What Did This Cortex Code Agent Build Session Cost?</h3><p>I asked Cortex Code to pull the compute and token costs from Snowflake’s account usage logs. Here’s the actual breakdown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8xb2qJ90BOyET-J_Vw_mRQ.png" /><figcaption>My Snowflake Cortex Code and Snowflake service cost profile for this session</figcaption></figure><p>For context, that session produced: five agents across multiple architectures, two semantic views, a multi-tool orchestrator, a true A2A REST orchestrator, supporting UDFs, and network rules, plus ~50 prompts worth of Q&amp;A, cost analysis, and documentation across 3 hours and 24 minutes.</p><p>All in, under six dollars.</p><h3>Bottom Line</h3><p>If you like using Claude and Claude Code, you will take to Cortex Code immediately. Assume that if Claude Code can do something, Cortex Code can do it just about as well, because it’s Claude under the covers with immediate access to your Snowflake services. The ramp-up time is essentially zero, plus the interface is familiar, and importantly, the Skills layer is shared.</p><p>What Cortex Code adds is that your data stays in Snowflake the entire time with security, governance, and audit trails intact. You’re not sending data to an external service or managing infrastructure outside the platform. You’re building agents against governed semantic models, deploying them into Snowflake Intelligence, and interacting with them through a conversational interface that feels natural from the first session.</p><p>The ability to go from a raw table in Snowflake to five working agents, two semantic views, a multi-tool orchestrator, and a true A2A REST orchestrator in a single evening session was extremely valuable for me and speaks to the work that Snowflake has done to make Cortex Code highly impactful for achieving fast business outcomes. Agent 1 was ready to go in 49 minutes, and the full session, including documentation, debugging, and a complete A2A implementation, wrapped up in 3 hours and 24 minutes. I was able to replicate my multi-agent MCP server in just an evening.</p><p>Go try Cortex Code. Just describe what you want and see what happens!</p><p>Kelly Kohlleffel leads Fivetran’s Global Partner Sales Engineering organization, working with technology and consulting partners to deliver modern data and AI solutions. He also hosts the <a href="https://www.fivetran.com/podcast"><strong>Fivetran Data Podcast</strong></a>, where industry leaders share their data journeys, visions, and challenges. Prior to Fivetran, Kelly held leadership and sales roles at NTT Data, Hashmap, Hortonworks, and Oracle. Connect with Kelly on <a href="https://www.linkedin.com/in/kellykohlleffel/"><strong>LinkedIn</strong></a> for insights on data, AI, sales and partnerships.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a16bd40317aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an MCP Server to Manage Other MCP Servers from Claude Desktop]]></title>
            <link>https://medium.com/@kelly.kohlleffel/building-an-mcp-server-to-manage-other-mcp-servers-from-claude-desktop-203da0395938?source=rss-47129bfda899------2</link>
            <guid isPermaLink="false">https://medium.com/p/203da0395938</guid>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[mcp-protocol]]></category>
            <category><![CDATA[fastmcp]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[Kelly Kohlleffel]]></dc:creator>
            <pubDate>Sat, 14 Feb 2026 18:47:02 GMT</pubDate>
            <atom:updated>2026-02-14T18:47:02.225Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Replacing my MCP server toggle script with a conversation</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bSppchUCdZXKwQbIGLDvlg.png" /></figure><p>Using MCP for simplification, standardization, and automation via Claude Desktop continues to surprise me. I’m learning more every day, and I’m still amazed at what’s possible. I also like taking on new challenges I run into, like this latest one.</p><p>If you are using MCP regularly, you know that every MCP server you enable in Claude Desktop incurs token and context overhead before Claude even reads your first question. The context overhead issue started cropping up regularly for me at around 10 servers, but I knew I was going to keep adding more (I’m hooked on pushing the limits with MCP right now). I’m currently at 32 MCP servers with 473 tools, and if I loaded all of them every time I opened Claude Desktop, I’d be burning ~140,000–150,000 tokens just on MCP tool definitions (70–75% of Claude’s 200K context window) before typing the first word of a question.</p><p>Having all 32 MCP servers running simultaneously would never be a requirement for me (at least not right now). I think of MCP servers as mini-apps or fit-for-purpose agents, and I typically use them in groups or presets, not all at once. The challenge is that I switch between MCP servers regularly (especially for demos and various activities throughout the day across various cloud data platforms), and each switch means going back to the terminal to enable or disable MCP servers that Claude Desktop has access to.</p><p>To address this problem, I built a Python script a few months ago to toggle servers on and off from the command line. It worked really well, but it still wasn&#39;t where I wanted to be. I’ve been testing new ideas with Claude during evening after-dinner walks (using Claude on my mobile, getting some work done, and a bit of exercise), and on one of these walks, I kicked around the idea of just using Claude via MCP to toggle. Since I’m already talking to Claude, and Claude calls all my MCP tools, why am I jumping back to a terminal when I could just ask Claude (via an MCP server) to manage my MCP servers?</p><h3>The Need to Control Context</h3><p>The MCP ecosystem is growing fast, and if you start using quite a few MCP servers in your day-to-day, I believe you’ll quickly hit the scaling problem that’s gotten worse for me as I’ve added more servers. Every enabled server loads its toolset into each conversation, whether you need those tools at the moment or not.</p><p>Each tool definition includes the function name, description, and JSON schema for parameters. Simple tools with no parameters might cost 80–120 tokens. Complex tools with multiple parameters and detailed descriptions can run 300–450 tokens. Based on typical tool definitions, the average runs 200–400 tokens per tool. So the math for me looked like this:</p><ul><li>4 servers (~35 tools) = ~7,000–14,000 tokens (manageable)</li><li>11 servers (~165 tools) = ~33,000–66,000 tokens (noticeable)</li><li>20 servers (~300 tools) = ~60,000–120,000 tokens (painful)</li><li>32 servers (~473 tools) = ~95,000–190,000 tokens (no go, basically your entire context window)</li></ul><p>That overhead reduces the space Claude has to reason, increases API costs, if you’re using the API, and slows response times.</p><p>The fix was obvious, enabling what I need only when I need it and making the ability to switch from one MCP server to another MCP server or sets of MCP servers easy and quick, preferably working directly from a Claude Desktop chat.</p><h3>From a Python Script to a Claude Conversation</h3><p>As mentioned, my first solution was a simple Python script python toggle_mcp_servers.py that would reconfigure Claude Desktop from the terminal. I could run python toggle_mcp_servers.py preset pipeline-health, and only the servers I needed were enabled. It was simple and effective, and it saved tokens/context, but each toggle required switching back to the terminal from Claude Desktop.</p><p>What I really wanted was the v2 Claude conversation you see below.</p><p><strong>v1 (Python script):</strong></p><pre># Terminal context switch<br>python toggle_mcp_servers.py disable oura<br>python toggle_mcp_servers.py enable pipeline_health preset<br>python toggle_mcp_servers.py save<br>python toggle_mcp_servers.py restart<br># Back to Claude Desktop</pre><p><strong>v2 (Claude Conversation):</strong></p><pre>Me: disable oura and enable pipeline_health preset<br>Claude: [searches my presets, applies config]</pre><p>Not in conversation: restart Claude Desktop*</p><p>One natural language request replaces four terminal commands and two context switches.</p><p><strong>* Note on Claude Desktop Restart:</strong> The MCP spec currently lacks an auto-restart capability. I still need to manually restart Claude Desktop after config changes (Claude prompts me to do this). Ideally, Anthropic would implement native config hot-reload for Claude Desktop as an option.</p><h3>What the MCP Cloud Server (my v2 toggle) Actually Does</h3><p>The MCP Cloud Server provides 11 tools across three areas:</p><p><strong>Local configuration management</strong> — The basics, including list servers (enabled and disabled), check status with token estimates, toggle things on/off, and rename servers. These write directly to your Claude Desktop config file.</p><p><strong>Preset management</strong> — Save server combinations tailored to specific workflows. Right now, I have 4 presets (I’m essentially the community at this point), but the infrastructure is built for future community sharing. Each preset shows which servers are included and estimated token savings.</p><p><strong>Preset sharing</strong> — Once you find a combination that works for a workflow, save it as a preset. Keep it private for your own use, or share it publicly if the community grows beyond just me.</p><p>Complex operations work conversationally. Saying rename fpr-financial-services-retention to fpr-financial-services-retention-cortex-multi-agent and update my Snowflake preset to use the new name would have required manual JSON editing and multiple CLI commands in v1. In v2, Claude just does it for me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KIHo7xQ34Jql_oG_hXGyZw.png" /><figcaption>Creating and managing MCP server presets through natural conversation with Claude</figcaption></figure><h3>Your Credentials Stay Local</h3><p>Importantly, your credentials never leave your machine. MCP configs can contain sensitive information such as API keys, passwords, and connection strings. The v2 architecture intentionally splits responsibility:</p><ul><li>The MCP server runs locally on your machine with access to your full config, including needed credentials</li><li>The cloud API (FastAPI on Google Cloud Run) stores only server names for presets, never credentials</li><li>When you apply a preset, the cloud returns a list of server names, and your local MCP server merges that with your credentialed config</li></ul><h3>Setup Takes Five Minutes</h3><p>The repo isn’t public yet while I complete testing, but setup will be simple. You’d just clone the repo and build the MCP server (it’s Node.js/TypeScript):</p><pre>cd mcp-server<br>npm install<br>npm run build</pre><p>And add it to your Claude Desktop config at</p><pre>~/Library/Application Support/Claude/claude_desktop_config.json</pre><pre>{<br>  &quot;mcpServers&quot;: {<br>    &quot;mcp-cloud&quot;: {<br>      &quot;command&quot;: &quot;node&quot;,<br>      &quot;args&quot;: [&quot;/path/to/mcp-server/build/index.js&quot;],<br>      &quot;env&quot;: {<br>        &quot;MCP_CLOUD_API_URL&quot;: &quot;https://your-cloud-run-url.run.app&quot;<br>      }<br>    }<br>  }<br>}</pre><p>Then restart Claude Desktop and ask, “What’s my current MCP setup with token overhead?”</p><p>Claude will show your current server/s, token overhead and suggest optimization presets. From there, explore your presets and apply one that matches your workflow or just starting using your enabled MCP servers.</p><h3>Both Versions Coexist</h3><p>The Python script still works and still has its place. Both versions read and write the same configuration files without conflicts.</p><p>If I’m already in the terminal and want a quick toggle, I can use the script, but if I’m mid-conversation in Claude Desktop and want to switch contexts, I use the MCP Cloud server (I keep it running all the time) and just tell Claude what I want. For complex multi-step operations or future community preset sharing, v2 is the only option.</p><p>This mirrors what I expect to see across the MCP ecosystem over the next 12–18 months. As MCP server collections grow from 5–11 to 20, 30, or 50+, the tools for managing them will need to evolve from manual to conversational.</p><h3>Here Are the Numbers</h3><p>Here’s one of my presets, Snowflake SKO27, in action. I am comparing having all 32 servers running (473 tools) vs my preset, which takes it down to 4 servers (36 tools), and it makes a big difference.</p><p><strong>Before (All 32 servers enabled):</strong></p><ul><li>473 tools loaded</li><li>~140,000–150,000 tokens just on the MCP tool definitions</li><li>~70–75% of the context window is consumed before typing anything</li></ul><p><strong>After (Snowflake SKO27 preset — 4 servers):</strong></p><ul><li>36 tools loaded</li><li>~4,200–5,600 tokens on MCP tool definitions</li><li>~2–3% of context window consumed</li></ul><p>That’s <strong>~135,000–145,000 tokens freed up</strong> in a single preset switch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LyvCYJ3uHzzkArjCNwH8Gg.png" /><figcaption>32 MCP servers with 473 tools loaded in Claude Desktop</figcaption></figure><p>Here are 4 servers in my Snowflake SKO27 preset:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VlWageOc4PI3uNp7WuR7SA.png" /><figcaption>Snowflake SKO27 preset in MCP Cloud: 4 servers, 36 tools, ~4,200–5,600 tokens</figcaption></figure><p>Scale that token savings across every conversation in your workday, and the compound effect matters, both in response quality and, if you’re using the API, in costs.</p><h3>Infrastructure That Costs Almost Nothing</h3><p>The cloud portion runs on Google Cloud Platform’s serverless stack, including Cloud Run for the API and Firestore for my preset storage. For personal use, this stays comfortably in GCP’s always-free tier at $0/month. Even if this were scaled to 2,000 users, projected costs are around $4.20/month.</p><p>The MCP server runs locally and is managed by Claude Desktop, with no maintenance required from the end user standpoint.</p><h3>What’s Next</h3><p>This MCP Cloud project is new, with the core 11 tools working and cloud infrastructure deployed. I’m looking for additional validation from my team and others on how well it’s working, and from there, would look to make it available.</p><p>Some interesting additions to consider in the future would include:</p><ul><li>Community features like preset likes and trending</li><li>Smart preset recommendations based on usage patterns</li><li>Scheduled configuration switching</li></ul><p>If you’re an MCP power user dealing with context overhead today, I think this pattern is worth watching. If you’re building MCP servers, I’d love to hear how you’re thinking about the context overhead problem and what your next MCP server project will be.</p><p>Kelly Kohlleffel leads Fivetran’s Global Partner Sales Engineering organization, working with technology and consulting partners to deliver modern data and AI solutions. He also hosts the <a href="https://www.fivetran.com/podcast"><strong>Fivetran Data Podcast</strong></a>, where industry leaders share their data journeys, visions, and challenges. Prior to Fivetran, Kelly held leadership and sales roles at NTT Data, Hashmap, Hortonworks, and Oracle. Connect with Kelly on <a href="https://www.linkedin.com/in/kellykohlleffel/"><strong>LinkedIn</strong></a> for insights on data, AI, sales and partnerships.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=203da0395938" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MCP as an Intelligent Orchestration Layer for Multiple Snowflake Cortex Agents]]></title>
            <link>https://medium.com/@kelly.kohlleffel/mcp-as-an-intelligent-orchestration-layer-for-multiple-snowflake-cortex-agents-e427a29dca6d?source=rss-47129bfda899------2</link>
            <guid isPermaLink="false">https://medium.com/p/e427a29dca6d</guid>
            <category><![CDATA[snowflake-cortex]]></category>
            <category><![CDATA[model-context-protocol]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[mcp-protocol]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Kelly Kohlleffel]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 23:34:43 GMT</pubDate>
            <atom:updated>2026-02-01T23:34:43.265Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Multi-stage workflows, cross-domain questions, combined risk scoring, and governed activation through a single conversation</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jBsvdQnj1aARZjrSId7f5w.png" /></figure><p>Snowflake Intelligence has made me a believer in AI agents, and I’ve written previously about the ability to ask natural-language questions and receive accurate answers from governed semantic models, which changes how we interact with data. For single-domain questions, it works great. You can ask your customer engagement agent about churn risk, and you get instant, accurate insights without writing SQL.</p><p>But business questions naturally span multiple domains. Financial Services leaders (my industry focus for this MCP Server) don’t ask single-domain questions, instead they ask business questions that require combined insights:</p><ul><li>“What’s the total revenue at risk from high-churn customers?” (requires engagement data for churn probability + financial data for account balances)</li><li>“Which customers should we contact first for retention interventions?” (requires churn risk × account balance × intervention success probability across both agents)</li><li>“Show me the top 10 customers prioritized by revenue exposure” (requires churn risk × account balance calculation)</li><li>“Show me a health scorecard for all customer segments” (requires multi-dimensional assessment: churn + financial performance + product effectiveness)</li><li>“Give me customers with declined product recommendations and calculate the lost revenue opportunity” (requires engagement data for recommendation history + financial data for ROI calculations)</li><li>“Which Premium customers have both high satisfaction and low product adoption?” (requires engagement metrics + financial performance data)</li><li>“Compare churn risk across segments with their average product recommendation approval rates” (requires engagement analysis + financial conversion metrics)</li></ul><p>Each of these questions needs insights from not one, but multiple Snowflake Cortex Agents. In Snowflake Intelligence, you’d query each agent separately and combine the results yourself. That works for simple combinations, but it breaks down for sophisticated workflows. You’d need to maintain context across queries, calculate combined metrics such as revenue exposure (churn × account balance), build prioritization formulas with multiple weighted dimensions, run multidimensional health assessments, and then figure out how to activate those insights for the teams that need them. The complex questions require orchestration, custom calculations, and data activation that aren’t available in a UI designed for a single agent.</p><blockquote>I’m confident Snowflake is working on multi-agent capabilities for Snowflake Intelligence because this feels like a natural evolution of the platform. But in the meantime, I wanted to see whether MCP could automatically handle querying and spanning Cortex Agents, along with a few other tasks.</blockquote><p>I had already developed 29 MCP servers that I toggle on and off depending on what I’m working on or demoing. This was the 30th: a <strong>multi-agent Financial Services MCP server</strong> designed specifically to answer questions that require insights from multiple Snowflake Cortex Agents in a single conversation.</p><h3>The Single-Agent Pattern in Snowflake Intelligence</h3><p>In Snowflake Intelligence, Cortex Agents are well-suited to domain-specific questions.</p><p><strong>You can ask your customer engagement agent:</strong></p><ul><li>Which customers have critical churn risk?</li><li>Show me Premium customers with low satisfaction</li><li>What’s the average churn probability by segment?</li></ul><p><strong>And you can ask your financial performance agent:</strong></p><ul><li>What’s the ROI on product recommendations by segment?</li><li>Which products have the highest approval rates?</li><li>Show me conversion rates by product type</li></ul><p>Each agent has its own semantic view and business logic, and answers questions within its domain with impressive accuracy. For most analytical workflows, this is exactly what you need.</p><p>The pattern that I wanted to address was that business questions naturally combine insights from multiple domains. “Show me customer churn risk AND product recommendation ROI performance” isn’t asking for two separate analyses. Instead, it’s asking for a single, integrated answer that links engagement patterns to financial outcomes.</p><p>Ultimately, I wanted to simplify and streamline my path to that integrated, combined answer plus I am simply enjoying pushing the limits of how far I can take MCP.</p><h3>What Multi-Agent Orchestration Actually Looks Like</h3><p>The multi-agent Financial Services MCP server automatically handles routing. When you ask a question, it analyzes the keywords and decides which agent (or agents) to query:</p><p><strong>Single-domain questions route to one agent:</strong></p><ul><li>“Which customers have critical churn risk?” → Engagement agent only</li><li>“Show me product recommendation ROI by segment” → Financial agent only</li></ul><p><strong>Cross-domain questions query both agents:</strong></p><ul><li>“Show me customer churn risk AND product recommendation ROI performance” → Both agents, combined response</li><li>“Which customers should we contact first for retention interventions?” → Both agents + priority calculation</li><li>“Show me a health scorecard for all customer segments” → Both agents + multi-dimensional scoring</li></ul><p>The user doesn’t need to know which agent answers. They ask a question in natural language and get a complete answer, regardless of how many agents contribute.</p><blockquote>This is what you can’t do in Snowflake Intelligence today. One question, multiple agents, combined insights in a single response.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*RsNXeYtBZFt15ql0kw-pmg.png" /><figcaption>Cross-domain, cross-agent questions are answered using MCP</figcaption></figure><h3>Architecture: Multi-Agent MCP Server Orchestrating Snowflake Cortex Agents</h3><p>The MCP server sits between Claude Desktop and Snowflake Cortex Agents, handling intelligent routing, context preservation, and data activation through Fivetran Census.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9uQudG6jYwHIvl8mviJ5Kw.png" /><figcaption>MCP acts as the orchestration and memory layer</figcaption></figure><h3>Intelligent Routing: Making Multi-Agent Feel Like a Single Agent</h3><p>The hardest part wasn’t building multi-agent capabilities. It was making them invisible to me as a user.</p><p>Users shouldn’t need to know which agent answers their questions. They should ask in natural language and automatically receive the correct answer from the appropriate agent (or agents).</p><p>I implemented keyword-based routing with three modes. This uses keyword matching as a simplistic first step; I do realize it may not be the optimal or final approach.</p><p><strong>Engagement-Only Routing:</strong></p><ul><li>Keywords: churn, risk, satisfaction, retention, customer alerts, account balance, revenue at risk</li><li>Routes to: Customer Engagement Agent</li><li>Example: “Which customers have critical churn risk?”</li></ul><p><strong>Financial-Only Routing:</strong></p><ul><li>Keywords: product performance, ROI, recommendation performance, conversion rate, sales amount, approval rate</li><li>Routes to: Financial Performance Agent</li><li>Example: “Show me product recommendation ROI by segment”</li></ul><p><strong>Multi-Agent Orchestration:</strong></p><ul><li>Detects both engagement AND financial keywords</li><li>Queries both agents</li><li>Example: “Show me customer churn risk AND product recommendation ROI performance”</li></ul><p>The routing logic had a critical insight from testing: <strong>account balance queries must route to the engagement agent</strong>, not the financial agent.</p><p>The account_balance field is in the engagement semantic view. Questions like “What’s the total revenue at risk?” need customer engagement data where account balances actually live. Early versions routed these to the financial agent and failed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*KVvlMe3y7XYBI-jrmUJloA.png" /><figcaption>“What’s the total revenue at risk?” demonstrates the interaction / orchestration between Cortex agents</figcaption></figure><h3>Agent Visibility: Solving the Black Box Problem</h3><p>Multi-agent orchestration introduced a trust problem for me during testing. When you ask a question and get an answer, which agent answered it? Did both agents contribute? Was the routing correct?</p><p>This was solved with agent visibility metadata in every response (and more testing):</p><h4><strong>Single-Agent Response:</strong></h4><ul><li>🤖 Agent Used: Customer Engagement Agent</li><li>📊 Semantic View: High-Value Customer Engagement</li><li>Found 70 customers with critical churn risk…</li></ul><h4><strong>Multi-Agent Response:</strong></h4><ul><li><strong>Customer Engagement Analysis (Customer Engagement Agent): </strong>Found 45 high-risk customers with churn probability &gt; 70%…</li><li><strong>Financial Performance Analysis (Financial Performance Agent): </strong>Product recommendation ROI metrics show…</li><li><strong>Combined Insights: </strong>High-risk customers in Premium segment represent both the highest churn risk and the highest ROI potential for product recommendations…</li></ul><p>This transparency builds trust, and users can see exactly which agent answered their question, verify routing decisions, and understand data sources without guessing.</p><p>It also helps me debug. When a query routes incorrectly, the agent indicator makes it immediately obvious.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*gR3RRbnKTFxf8DfYwGGH5w.png" /><figcaption>Multi-agent response via MCP to Snowflake Cortex agents</figcaption></figure><h3>Sequential Queries: Building on Previous Context</h3><p>The MCP server maintains context across agents and questions in ways that Snowflake Intelligence doesn’t currently support. Users naturally ask questions in sequence:</p><ol><li>“Which customer segments have the highest churn risk?”</li><li>“What’s the product recommendation ROI for those high-risk segments?”</li></ol><p>In Snowflake Intelligence, you’d need to:</p><ul><li>Query the engagement agent for segment-level churn rates</li><li>Identify the top 3 highest-risk segments (e.g., Individual, Family, Retail)</li><li>Switch to the financial performance agent</li><li>Query for product ROI for those specific segments</li><li>Manually correlate churn risk with ROI to prioritize interventions</li></ul><p>The MCP server keeps the first query’s results in context. When you ask the second question, it recognizes that you’re referring to the same segments and provides the combined analysis directly. There is no manual segment tracking, no context switching, and no re-querying of data you already have.</p><p>The system doesn’t just cache results. It intelligently correlates segment-level insights across agents to identify intervention priorities.</p><p>Knowing that the individual segment has an average churn rate of 54.8% is useful. Knowing that the individual segment has only a 16.8% product recommendation conversion rate tells you <strong>why</strong> they’re churning (a product-market fit failure) and <strong>what</strong> to fix. The MCP server automatically combines these insights without requiring you to manually correlate datasets.</p><p>The result includes:</p><ul><li>Segment churn rates from the engagement agent</li><li>Product recommendation ROI from the financial agent</li><li>Combined analysis showing churn risk correlated with conversion performance</li><li>Prioritized intervention strategy based on both dimensions</li></ul><h4><strong>Example output:</strong></h4><p>High-Risk Segment Analysis with ROI Context:</p><p><strong>1. Individual Segment</strong></p><p>Churn Risk: 54.8% (highest) | Conversion Rate: 16.8%</p><p>→ Issue: High churn + mediocre conversion = product-market fit problem</p><p>→ Priority: #1 intervention target</p><p><strong>2. Wealth Management</strong></p><p>Churn Risk: 54.7% (tied highest) | Conversion Rate: 8.8% (lowest)</p><p>→ Issue: Premium segment with catastrophic product acceptance</p><p>→ Priority: Executive escalation required</p><p><strong>3. Retail</strong></p><p>Churn Risk: 49.7% | Conversion Rate: 20.1% (highest)</p><p>→ Success Story: Lower churn + best conversion = model to replicate</p><p>This is what “maintaining context” actually means in practice. The system remembers what you just asked about (high-risk segments), automatically queries the second agent for those same segments, and builds on it the way a human analyst would.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*HPUlt2s1fvds1yrh.gif" /><figcaption>Sequential multi-agent questions and answers</figcaption></figure><h3>Multi-Stage Orchestration: Beyond Simple Questions</h3><p>Some business questions require more than just querying two agents and combining results. They need multi-stage workflows that combine insights across dimensions and calculate metrics that don’t exist in any single semantic view.</p><p>Consider this question: “Which customers should we contact first for retention interventions?”</p><p>This requires:</p><ol><li><strong>Engagement analysis</strong> — Which customers have high churn risk?</li><li><strong>Financial context</strong> — What’s the revenue impact? What’s the intervention success rate by segment?</li><li><strong>Priority calculation</strong> — Combine revenue at risk (50% weight) + intervention success likelihood (30% weight) + relationship health (20% weight)</li><li><strong>Tactical execution</strong> — Which specific customers should I call? What’s their email? Why are they at risk?</li></ol><p>The MCP server handles this as a four-stage orchestration:</p><ul><li><strong>Stage 1:</strong> Query engagement agent for high-risk customers (returns 137 individual customers)</li><li><strong>Stage 2:</strong> Query the financial agent for product recommendation conversion rates by segment</li><li><strong>Stage 3:</strong> Calculate priority scores: (revenue_at_risk × 0.5) + (conversion_rate × revenue_at_risk × 0.3) + (satisfaction × revenue_at_risk × 0.2)</li><li><strong>Stage 4:</strong> Rank segments, attach the top 3 customers per segment with full contact details</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*HwhWjdj1FVoffrqQ.gif" /><figcaption>Prioritized retention intervention plan based on multi-turn analysis</figcaption></figure><p>Notice the two-level analysis: strategic (segment-level priorities for resource allocation) and tactical (specific customers to call with contact details ready for Fivetran Census activation to Slack).</p><h3>Multi-Dimensional Health Scoring</h3><p>Another pattern that this MCP server addresses is these types of questions: “Show me a health scorecard for all customer segments,” which requires combining three dimensions that don’t exist in a single view:</p><ul><li><strong>Engagement risk</strong> (40% weight): Churn probability from the engagement agent</li><li><strong>Product effectiveness</strong> (35% weight): Recommendation conversion rates from the financial agent</li><li><strong>Revenue quality</strong> (25% weight): Revenue per customer from the financial agent</li></ul><p>The MCP server orchestrates both agents, calculates health scores (0–100 scale), and returns traffic light visualization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*ui2OLx013LgVwo3G.gif" /><figcaption>Health scorecard for all customer segments requiring multi-agent orchestration</figcaption></figure><p>These multi-stage workflows aren’t possible in Snowflake Intelligence today. They require orchestration, cross-agent data merging, custom calculations, and intelligent prioritization, all of which occur only when MCP acts as the orchestration layer.</p><h3>What Multi-Agent Enables That a Single-Agent Can’t</h3><p>The architecture unlocks capabilities with Snowflake Cortex Agents that are challenging and time-consuming today with Snowflake Intelligence alone:</p><h4><strong>Cross-Domain Analysis</strong></h4><ul><li>“Find high-risk customers, analyze their product recommendation history, calculate total financial exposure.”</li><li>“Which customers have both high churn risk AND high account balances?”</li><li>Single conversation, automatic agent routing, combined insights</li></ul><h4><strong>Context Preservation</strong></h4><ul><li>Follow-up questions build on previous results</li><li>Customer-level data automatically merged across agents (engagement + financial)</li><li>Combined risk scoring: churn_probability × account_balance to prioritize by actual revenue exposure</li><li>No manual copying of customer IDs between queries</li><li>Cached results enable instant calculations</li></ul><p><strong>Real-world example:</strong> Ask “Show me top 10 at-risk customers prioritized by revenue exposure” and the MCP Server does the following:</p><ol><li>Queries the engagement agent for churn probabilities and account balances</li><li>Calculates the combined risk score for each customer</li><li>Ranks by actual dollars at risk (not just churn percentage)</li><li>Returns a prioritized list with full context</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BMGgTCeodHZ_ftjzaNRSDw.png" /><figcaption>Cross domain analysis and context preservation with MCP</figcaption></figure><h4><strong>Multi-Stage Orchestration for Complex Workflows</strong></h4><ul><li>Questions requiring 3–4 stage workflows (query → query → calculate → prioritize)</li><li>Custom calculations that don’t exist in semantic views (priority scores, health scores)</li><li>Two-level analysis: strategic (segment-level) + tactical (customer-level with contact details)</li><li>Weighted scoring across multiple dimensions (risk + success probability + relationship health)</li></ul><p><strong>Examples:</strong></p><ul><li>“Which customers should we contact first?” → 4-stage orchestration combining churn, revenue, conversion rates, and satisfaction into priority scores with actionable customer lists</li><li>“Show me segment health scorecards” → Multi-dimensional assessment (churn 40% + conversion 35% + revenue quality 25%) with traffic light visualization</li></ul><h3><strong>Fivetran Census Data Activation Integration</strong></h3><p>After the MCP server queries Cortex Agents and calculates financial impact, Fivetran Census handles the last mile, delivering formatted alerts to where teams actually work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MTP0KcgJZy_xZ-kdNk_F1Q.png" /><figcaption>Send a Slack alert based on the Snowflake Cortex agent conversation via Fivetran Census and MCP</figcaption></figure><p>The MCP server doesn’t call Slack’s API directly. Instead, it writes to a Snowflake staging table and triggers a Fivetran Census sync. When the MCP server identifies high-risk customers with revenue exposure, Fivetran Census delivers those alerts to the designated Slack channel with complete context and recommended actions.</p><p>In addition to a separation of concerns, Fivetran Census provides delivery observability, retry logic, and format templates. If I want to add Teams notifications, SMS messages, or email alerts later, I can add a Fivetran Census sync with zero changes to the MCP server.</p><p>The workflow happens entirely in natural language through Claude Desktop. No application or dashboard switching, no manual message formatting, no API calls to manage. Query → Calculate → Activate, all from one conversation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*6KCgob61SlRMu4qEGpP3aQ.png" /><figcaption>Slack alert triggered by the Snowflake Cortex agent conversation, Fivetran Census and MCP</figcaption></figure><p>Fivetran Census extends well beyond communication and messaging platforms to CRM systems like Salesforce, email platforms, or any SaaS application (200+) that needs data activation.</p><h3>Validating the Capabilities</h3><p>I built a fairly comprehensive test suite to validate the multi-agent architecture, context preservation, and multi-stage orchestration. I ran this prior to launching Claude Desktop and testing, although Claude Desktop was the truest test.</p><p><strong>Test 1: Single-Agent Query Routing</strong></p><ul><li>Verify the engagement queries route to the engagement agent</li><li>Verify the financial queries route to the financial agent</li><li>Confirm the account balance questions route correctly</li></ul><p><strong>Test 2–5: Context Store and Combined Risk Scoring</strong></p><ul><li>Context store caches engagement and financial data correctly</li><li>Combined risk scores were calculated accurately (churn × account balance)</li><li>Top customers ranked by revenue exposure (not just churn %)</li><li>Multi-agent data merging works across both agents</li></ul><p><strong>Test 6–7: Query Complexity Detection</strong></p><ul><li>Simple queries detected and routed</li><li>Complex queries detected and routed to orchestration templates</li><li>Template matching works for budget optimization, customer prioritization, and health scorecards</li></ul><p><strong>Test 8–10: Multi-Stage Orchestration Templates</strong></p><ul><li>Budget optimization: 4-stage workflow validated</li><li>Customer prioritization: 4-stage workflow with priority scoring validated</li><li>Segment health scorecard: 4-stage workflow with multi-dimensional scoring validated</li><li>All templates correctly sequence engagement → financial → calculations → recommendations</li></ul><p><strong>Test 11–12: Advanced Orchestration Features</strong></p><ul><li>Conditional stage execution works (stages skip when criteria are not met)</li><li>Backward compatibility preserved (simple queries still work, and complex use multi-stage orchestration templates)</li></ul><h3>When Multi-Agent Actually Matters</h3><p>Not every MCP server needs multiple agents, and it’s nice to have the option to design for single or multi-agent. Below are some high-level considerations.</p><p><strong>Single-agent architectures work great when:</strong></p><ul><li>Your domain fits cleanly into one semantic model</li><li>Questions don’t span multiple data contexts</li><li>Users need depth in one area, not breadth across many</li></ul><p><strong>Multi-agent makes sense when:</strong></p><ul><li>Business questions naturally cross domains (“churn + financial impact”)</li><li>Separate semantic models already exist for good reasons</li><li>Users expect insights from multiple agents, not just raw data</li></ul><p>For my Financial Services use case, customer engagement and product financial performance are distinct domains with different stakeholders, metrics, and business logic. Forcing them into a single semantic model would introduce version drift and likely additional maintenance. Separate agents with intelligent orchestration is a reasonable pattern.</p><h3>What I’d Do Differently Next Time</h3><p><strong>Build routing test cases first.</strong> I validated routing with test queries, but I should have built a larger set of edge cases and various queries before moving forward with the routing logic.</p><p><strong>Explore alternatives to keyword-based routing.</strong> I used keyword matching for this implementation, but there are likely better approaches:</p><ul><li>Let Claude decide which agent(s) to query based on tool descriptions</li><li>Use semantic similarity on agent descriptions instead of keyword matching</li><li>Prompt engineering in tool descriptions to guide routing</li><li>Multi-step: query one agent, then intelligently decide if a second agent is needed</li></ul><p><strong>Test semantic query wording in Snowflake UI first.</strong> Cortex Analyst maps natural language phrases to specific fields, and seemingly similar phrases can map to completely different data. “Approval rates” returned zeros while “conversion rates” returned actual data with the same concept, but different phrasing. Start with working patterns and don’t invent new terminology.</p><p><strong>Design for heterogeneous data formats from day one.</strong> Some queries return pre-aggregated data (10 rows with segment counts), others return individual records (137 rows with customer IDs). Build format detection early rather than assuming all data is the same.</p><p><strong>Document routing decisions explicitly.</strong> When someone extends this server or builds a similar one, they need to understand why certain keywords route to specific agents. Inline comments help, but a routing decision log would be better.</p><p><strong>Plan for agent-to-agent communication.</strong> Right now, agents run in parallel or sequentially, orchestrated by the MCP Server’s CortexClient, but they don’t communicate with each other. For some scenarios, having the engagement agent pass context directly to the financial agent could enable new query patterns.</p><p><strong>Build more comprehensive test scenarios.</strong> I built this with test queries based on what I thought I would want to ask. Real-world questions likely use domain terminology I didn’t consider and expect insights in formats I didn’t plan for. Work with your business users to determine what is best.</p><h3>The Pattern Works Beyond Financial Services</h3><p>This approach isn’t specific to customer churn and product ROI. The same pattern works for any industry:</p><ul><li><strong>Higher Education:</strong> Student engagement agent + financial aid agent for retention analysis</li><li><strong>Healthcare:</strong> Patient health agent + cost analysis agent for outcome optimization</li><li><strong>Agriculture:</strong> Livestock health agent + weather impact agent for proactive alerts</li><li><strong>Manufacturing:</strong> Equipment performance agent + maintenance cost agent for predictive maintenance</li></ul><p>The implementation pattern stays consistent:</p><ol><li>Get your data pipeline in place with Fivetran moving data into Snowflake</li><li>Transform raw data into analytical views with dbt</li><li>Build semantic views over your key views — you can create these directly in Snowflake or use the<a href="https://hub.getdbt.com/Snowflake-Labs/dbt_semantic_view/latest/"> <strong>dbt_semantic_view package</strong></a> from Snowflake Labs to define semantic views as part of your dbt project</li><li>Create UDFs for domain-specific business logic</li><li>Configure specialized Cortex Agents for each semantic view</li><li>Implement intelligent routing in your MCP server to direct queries to the appropriate agent(s)</li><li>Add agent visibility for transparency</li><li>Set up Fivetran Census syncs for your activation channels</li></ol><h3>How This Fits Into the MCP Server Infrastructure</h3><p>My MCP servers connect to data platforms (Fivetran, Snowflake, Databricks, dbt), others to cloud services (AWS S3, Google Cloud, OneLake), some to specific use cases (pipeline health monitoring, student retention, clinical alerts), and some to APIs (National Parks, SpaceX, Solar System, Oura). I toggle them on and off using a simple command-line script depending on what I’m working on. For a pipeline health check, I enable one of my pipeline-health MCP servers, depending on which SaaS services I’m showcasing. For a student retention demo, I enable the HED (Higher Education) student retention server.</p><p>This multi-agent Financial Services MCP server (fpr-engagement-alerts-cortex-multi-agent) is just another server in that collection. When I’m working on financial services demos or partner sessions, I toggle it on. When I’m not, it’s off.</p><p>The architecture is self-contained:</p><ul><li>Two or more Snowflake Cortex Agents based on your domains (engagement and financial in this case)</li><li>Two or more semantic views in Snowflake</li><li>One MCP server with intelligent routing</li><li>Fivetran Census integration for alert delivery</li></ul><p>It doesn’t interfere with my other MCP servers. It doesn’t require restructuring existing infrastructure. It’s a purpose-built solution for a specific problem: traversing multiple Snowflake Cortex Agents that Snowflake Intelligence doesn’t support today.</p><h3>What Could Come Next</h3><p>This prototype demonstrates what’s possible when MCP acts as an intelligent orchestration layer. If I were to continue building on this foundation, here are three directions I’d consider, though I’ll likely move on to other projects and may never implement any of these.</p><h4>Pattern Detection and Template Learning</h4><p>The most interesting opportunity is a lightweight system that tracks frequently asked questions not covered by existing templates and semi-automatically generates new orchestration patterns.</p><p>The idea would be if 10–15% of queries follow a similar pattern (like “Which products should we promote to which segments?” or “Which customers are stalled in lifecycle stages?”), the system could suggest creating a specialized template rather than using generic orchestration every time.</p><p>This would make template development time even faster. The system analyzes successful generic orchestrations, extracts common stages, infers trigger keywords, and generates template scaffolding. From there, you review, refine, test, and deploy.</p><h4>Conversation Memory and Follow-Up Intelligence</h4><p>Right now, each query starts fresh, but anyone naturally asks follow-up questions: “Show me the same analysis as last week,” or “Has segment health improved since last month?”</p><p>A conversation memory system would enable temporal comparisons, progressive refinement, and collaborative workflows. You could track how metrics change over multiple runs, compare this month’s segment health to last quarter, or exclude certain segments from a previous analysis without re-explaining the entire context.</p><h4>Bi-Directional Census Integration</h4><p>The current workflow is one-way with the MCP server identifying high-risk customers → Fivetran Census sending Slack alerts → account managers responding in Slack → (workflow ends).</p><p>The bi-directional version would close the loop with Slack responses flowing back to Snowflake → MCP server tracking intervention outcomes → system measuring which interventions actually worked → adaptive scoring adjusting priority formulas based on real results.</p><p>This would enable questions such as “What’s our intervention success rate for the Premium segment?” and “How much revenue have we saved through interventions this quarter?” and would gradually improve the priority-scoring formula based on actual outcomes rather than assumptions, helping to move from recommendations to measurable ROI and continuous learning.</p><h4>What I’d Actually Build First</h4><p>If I did any of these, I’d start with pattern detection and template learning, mainly because it’s the most interesting to me, but it likely has the highest ROI (makes future template development significantly faster), requires no new MCP tools, and doesn’t change existing behavior. The other two depend on sustained usage patterns and external system integration that may or may not align with how this MCP Server would be used in practice.</p><p>But realistically, I’ll probably move on to the next MCP prototype. This one already demonstrates the core value that I was looking to prove: multi-agent orchestration, intelligent context preservation, custom calculations, and governed activation through a conversational interface.</p><p>The combination of Snowflake Cortex Agents, MCP orchestration, Claude Desktop, and Fivetran Census activation tells a compelling story about what’s possible when you remove UI constraints and let systems work together intelligently.</p><h3>What Multi-Agent Orchestration Through MCP Actually Enables</h3><p>This isn’t about building better technology (even though I think this is a leap forward). It’s more about answering questions that couldn’t be answered before.</p><p><strong>In Snowflake Intelligence:</strong></p><ul><li>“Which customers are at risk?” → Possible</li><li>“What’s our product recommendation ROI?” → Possible</li><li>“Show me both, together, in one answer” → <strong>Not possible today</strong></li></ul><p><strong>With the multi-agent MCP server:</strong></p><ul><li>All three questions work the same way</li><li>Natural language input</li><li>Context preserved across questions</li><li>Insights from multiple agents are combined automatically</li><li>Actions triggered through Fivetran Census to Slack</li></ul><p>The modern data stack is reaching the point where we can build conversational interfaces that drive real business decisions without ever having to navigate into individual platforms. MCP handles orchestration, Snowflake Cortex provides intelligence, and Fivetran Census delivers activation to where people work.</p><p>This is less about agents and more about removing UI constraints that force humans to act as orchestration layers. MCP removed the constraint (at least for now) that prevented me from asking needed business questions.</p><p>Kelly Kohlleffel leads Fivetran’s Global Partner Sales Engineering organization, working with technology and consulting partners to deliver modern data solutions. He also hosts the <a href="https://www.fivetran.com/podcast">Fivetran Data Podcast</a>, where industry leaders share their data journeys, visions, and challenges. Prior to Fivetran, Kelly held leadership and sales roles at NTT Data, Hashmap, Hortonworks, and Oracle. Connect with Kelly on <a href="https://www.linkedin.com/in/kellykohlleffel/">LinkedIn</a> for insights on data, AI, and partnerships.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e427a29dca6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Data Quality Paradox: Why Waiting for Perfect Data Kills AI Initiatives]]></title>
            <link>https://medium.com/@kelly.kohlleffel/the-data-quality-paradox-why-waiting-for-perfect-data-kills-ai-initiatives-bbf2fb52335a?source=rss-47129bfda899------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbf2fb52335a</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-strategy]]></category>
            <category><![CDATA[data-strategy]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[data-quality]]></category>
            <dc:creator><![CDATA[Kelly Kohlleffel]]></dc:creator>
            <pubDate>Wed, 14 Jan 2026 23:26:41 GMT</pubDate>
            <atom:updated>2026-02-01T22:49:55.542Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Part 1 of the Data Quality in the Agentic Age series, based on a Data Science Connect panel discussion</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*vywGxezbUwtd2YvLOb38WA.png" /></figure><p>I recently participated in a <a href="https://www.youtube.com/watch?v=4o3yM0mFzNQ">Data Science Connect panel discussion on “The Hidden Costs of Poor Data Quality in AI</a>,” alongside Jon Malloy of Snowplow, Girish Bhat of Revefi, and Nate Rain with Informatica. The conversation covered topics ranging from data governance frameworks to AI accuracy and ROI, and it reinforced patterns I see consistently across enterprises in their data and ai programs.</p><p>This multi-part series captures my key perspectives from that discussion.</p><p>I touched on two conversations that have stayed with me. I recently asked a CDO at a major networking company, which provides critical infrastructure for data and AI, “Where do you rank on data maturity, 1 to 10?”</p><p>He said, “We’re probably a three and a half.” I’d expected eight or nine.</p><p>Then, I was in a breakout session recently at a data and AI conference, and a speaker asked the room: “How many people trust their CRM data?” The overwhelming majority said no.</p><p>Your CRM is supposed to be your system of record for customer data, and the people who use it every day don’t trust it.</p><p>These two moments capture the data quality crisis facing organizations trying to build AI initiatives. Executives rate their data maturity lower than expected, while practitioners (and likely executives) don’t trust some of their systems of record. Somewhere between that honest assessment and the AI ambitions, most organizations get stuck.</p><p>What I’ve learned during my career of working with enterprises on their data and AI challenges is that data quality isn’t just a technical problem we can engineer our way out of; it’s a foundational business problem. Organizations that rate themselves low on data maturity inevitably struggle with AI initiatives, and the gap only widens when you layer AI on top of poor data foundations.</p><p>But the paradox is thinking that we can’t use AI until the data is perfect. This mindset is what is keeping some organizations from moving on AI initiatives right now.</p><h3>Why Data Quality Matters More Than the AI Model</h3><p>AI depends far less on a frontier model’s knowledge base than you might think. The real value shift happens when your private enterprise data drives AI context, instructions, and queries.</p><p>Frontier models, while extremely advanced, are generalists by design. Models like ChatGPT and Claude are trained on publicly available data. They can tell you about healthcare best practices, retail trends, and general finance regulations.</p><p>But when you need specific answers, such as “Which of our patients are at highest risk this week?” “What’s driving churn in our customer base?” or “Which of our products should we recommend to this specific customer?” that general knowledge doesn’t help.</p><p>A model should focus more on the context it’s given rather than on the foundational knowledge on which it was trained. The output that you get will be much better, and your output quality, especially precision and accuracy, goes way up as well.</p><p>Context is absolutely critical to get true value from AI, and quality data is the fundamental element of that context. You can have the most sophisticated model, great instructions, the best prompts, the perfect architecture, but if you’re feeding it poor-quality data as context, you’re severely limited in the value you can extract.</p><p>Context takes many forms, including datasets specific to an agent’s workflows that it can query or interact with, orchestration and response instructions, memory, and task-based workflows. At its core, though, it’s your private enterprise data providing that context to the model. Without quality data forming that context, the model has nothing meaningful to work with.</p><p>You can build what appears to be the optimal AI application for healthcare clinical decision support or CPG consumer insights, with rich context, instructions, examples, and guardrails, along with the latest models and frameworks. Without specific, focused, quality data from your enterprise providing that context, that AI application will fail.</p><p>Take healthcare clinical decision support, for example. You need an analysis of patient outcomes, treatment effectiveness, and medical error rates. You also need patterns in medication recommendations and readmission risks. That requires combining internal data from systems such as Epic or Cerner with external sources such as ClinicalTrials.gov and the NIH.</p><p>Without personalized quality data on patient outcomes, error rates, treatment effectiveness, and operational metrics serving as context for your AI, the value derived will be marginal at best.</p><h3>The Paralysis Problem (Perfection vs. Progress)</h3><p>The most common data quality issue isn’t actually missing data or inconsistencies. The biggest issue is thinking that you need perfect data quality before you can start with AI.</p><p>I recently heard <strong>Wei Manfredi, VP of Global Architecture, Data, and Gen AI at McDonald’s</strong>, speaking at an event. She made a point that really resonated with me. She said the belief that we can’t use AI until the data is perfect paralyzes organizations.</p><p>Wei talked about her approach to a 3-tier trust architecture that I think you should consider for AI initiatives:</p><p><strong>Tier 3 — Exploratory AI:</strong> 70% directional accuracy. This is where you’re testing hypotheses, exploring patterns, and getting directional insights.</p><p><strong>Tier 2 — Operational AI:</strong> 80–90% accuracy for customer insights and forecasting. These are apps and agents making business decisions, but with some tolerance for variance.</p><p><strong>Tier 1 — Mission Critical AI:</strong> 95%+ accuracy for financial reporting, regulatory compliance, and mission-critical operations.</p><p>My version of getting rid of perfect data paralysis is to start with a few datasets where you know the data well, you know its quality is high, and you have an AI app that would use that data as context that solves a business problem. Go with that to start, regardless of which tier it falls in.</p><p>In other words, you don’t need to wait until your entire data estate is perfect. Find the datasets you trust, match them to the right use-case tier (from Wei’s approach), and start delivering value.</p><h3>The New Dimension: Context Optimization and Token Optimization</h3><p>There’s another angle on data quality that needs to be considered today and that’s how blowing out context windows affects data quality and outcome quality.</p><p>Instead of loading all data into context, have your agent access a search tool with the appropriate columns and filters preconfigured for that agent’s specific task. Search and query can be done on the fly, just for what is needed for that particular question. You can take a similar approach with semantic views that your agent has access to.</p><p>The same applies to MCP servers and loading up numerous tools for a single MCP server. If your token usage is consumed with tool loading, there is nothing left to provide quality output even if the data quality is good. I go into more detail on this topic in a recent post here: <a href="https://medium.com/@kelly.kohlleffel/workflow-centric-mcp-building-a-clinical-alert-system-with-snowflake-cortex-and-fivetran-census-6e80ef259d6f">Workflow-Centric MCP: Building a Clinical Alert Solution with Snowflake Cortex and Fivetran Census</a></p><p>Data quality, data outputs, and data outcomes take on a whole new dimension when we have to consider context optimization and token optimization.</p><p>I built quite a few of what I called “micro Gen AI apps” a couple of years ago as prototypes using a RAG-based approach (e.g. California wine country itinerary builder) and it was important even with a smaller dataset to execute specific queries on the fly based on the question asked. The app would only search for the particular winery or vineyard that fit the prompt, not load every winery into context.</p><p>By doing so, the app remained focused, minimized the noise the model had to contend with, and ultimately produced high-quality output.</p><p>Today, that gets even more challenging when you think about data quality (and more importantly, outcome quality) and an agent that has orchestration instructions, response instructions, semantic view tools, search tools, and custom tools all at its disposal.</p><h3>Structural Issues Hold Organizations Back</h3><p>There are real structural issues holding organizations back. A few years ago, I ran a survey asking which governance solution categories organizations had fully solved. 64% answered “None of the Above.”</p><p>The technical issues are continuing:</p><ul><li>67% of organizations spend over 25% of engineering time on pipeline maintenance — and the backlog never ends</li><li>Manual pipelines and inconsistent schemas that teams are constantly firefighting</li><li>Governance issues that kill trust in the data</li><li>Context window management that affects whether quality data can even be used effectively</li></ul><p>Data quality issues aren’t isolated problems though. If you’ve got reliable metadata management and strong data observability, your data quality score goes up. If you’ve optimized your context windows and token usage, your outcome quality and accuracy for AI apps goes up. These categories are interconnected, and you can’t solve data quality in isolation.</p><h3>How to Think About Data Preparation for Gen AI</h3><p>It’s hard to get out of the mindset that we’ve been in regarding data prep for traditional analytics, namely bronze/silver/gold layers.</p><p>But Gen AI doesn’t necessarily need pre-aggregated views. It needs rich, granular context and the ability to dynamically orchestrate across tools.</p><p>For analytics, moving from bronze to silver to gold and creating aggregated views made perfect sense, but Gen AI is different.</p><p>When a clinician asks, “Which patients are at highest risk for readmission?” an agent doesn’t hit a pre-built aggregate table. It orchestrates across semantic views, runs searches, invokes custom functions, and pulls contextual data, all on the fly based on that specific question.</p><p>Bronze, silver, and gold work for analytics and can work for some Gen AI apps, but you should also consider context, tools, and orchestration. The question to ask is, “How can I provide the right context to make it easiest on the model to get the best accuracy, highest performance, and lowest cost?”</p><h3>The Path Forward: Start Small, Start Now</h3><p>Most organizations can’t achieve AI outcomes, not because their data will never be good enough, but because they’re either waiting for perfection instead of starting with what they know and trust, or they’re loading so much data into context that the model can’t effectively use it even when the quality is high.</p><p>That’s the real data quality issue we need to solve for AI, not just clean data, but the right amount of the right data at the right time in the right context.</p><p>The organizations winning with AI right now aren’t the ones with perfect data governance across their entire estate, which, in my opinion, will never happen. We’ve been fighting that battle for decades. The ones winning are the ones moving fast with platforms that handle the complexity for them, starting with datasets they know and trust, high-impact business problems and building incrementally from there.</p><p>Your data readiness continues to set the bar for how far you can go with AI.</p><h3>How to Start</h3><p>Pick a few datasets where you:</p><ul><li>Know your data well</li><li>Know its quality is high</li><li>Have a solvable business problem that would use that data as context</li><li>Know that AI is the right fit as a solution approach</li></ul><p>Don’t wait for perfect. Start with what you trust and match it to the right use case tier (from Wei’s example) and deliver value. Then repeat for the next dataset and the next use case.</p><p>The data quality conversation today has to include: Impact on business problem? AI-centric problem? How much data? Which data? When? How is it being accessed (semantic views, search tools, custom tools)? Are we optimizing for the specific task, or are we creating noise that the model has to filter?</p><p>Better context equals better outcomes. Data quality is just one component of that context, but it’s the foundation for everything else.</p><p>Stop waiting for perfect conditions and start moving with the data you trust. The gap between organizations that act now and those that wait for ideal conditions widens every day.</p><p><em>This is Part 1 of a multi-part series on Data Quality in the Agentic Age. Coming next: “Are AI Failures Data Quality Problems or Scope Problems?”</em></p><p>Kelly Kohlleffel leads Fivetran’s Global Partner Sales Engineering organization, working with technology and consulting partners to deliver modern data solutions. He also hosts the <a href="https://www.fivetran.com/podcast">Fivetran Data Podcast</a>, where industry leaders share their data journeys, visions, and challenges. Prior to Fivetran, Kelly held leadership and sales roles at NTT Data, Hashmap, Hortonworks, and Oracle. Connect with Kelly on <a href="https://www.linkedin.com/in/kellykohlleffel/">LinkedIn</a> for insights on data, AI, and partnerships.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbf2fb52335a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Workflow-Centric MCP: Building a Clinical Alert Solution with Snowflake Cortex and Fivetran Census]]></title>
            <link>https://medium.com/@kelly.kohlleffel/workflow-centric-mcp-building-a-clinical-alert-system-with-snowflake-cortex-and-fivetran-census-6e80ef259d6f?source=rss-47129bfda899------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e80ef259d6f</guid>
            <category><![CDATA[fivetran]]></category>
            <category><![CDATA[data-activation]]></category>
            <category><![CDATA[model-context-protocol]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[snowflake-cortex]]></category>
            <dc:creator><![CDATA[Kelly Kohlleffel]]></dc:creator>
            <pubDate>Tue, 23 Dec 2025 16:04:36 GMT</pubDate>
            <atom:updated>2025-12-23T21:28:23.719Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Designing MCP for efficiency and accuracy with Snowflake Cortex, Fivetran Census, and a focused context layer</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*AD1QsiFAkJZRRQspjFtgvw.png" /></figure><p>I built a Clinical Alert Early Warning MCP server that connects Claude Desktop to Snowflake Cortex Agents and Fivetran Census, using a Claude Skill I created specifically for workflow-based MCP server development. I’ll write more about Claude Skills soon. The solution turns natural language into clinical alerts with no SQL required from the end user and no dashboards to interpret. You simply ask a question, and the right people get notified in Slack, Teams, or your communications system of choice.</p><p>This started as an exercise to improve user stories that explain how MCP fits into business workflows and to test my belief that the context layer is the most important aspect to get right for MCP and agents in general.</p><p>The context layer is the data, information, and tools you expose to the LLM through your MCP server. It determines what Claude sees, what it can do, and how much work it has to perform to answer a question. A narrower context layer focused on a specific use case will outperform a wider context layer that tries to cover multiple use cases and potential questions. If you get the context layer right, cost goes down, performance improves, and accuracy increases. If you get it wrong, you’re burning tokens on wasted round-trips while Claude tries to interpret intermediate results that it shouldn’t have to see.</p><p>Compared to earlier MCP servers I built with API-centric designs, token usage dropped 87% and response time improved by 60%. And because Claude wasn’t calculating or interpreting data (I left that up to my Snowflake Cortex Agent), calculation errors are drastically reduced, if not completely eliminated.</p><p>Here’s how I built it and what I learned along the way.</p><h3>The Foundation: Data Movement and Transformation</h3><p>Before I could build anything interesting, the data pipeline had to be in place. This is table stakes for any data workload, including AI, data apps, data warehousing, and data lakes.</p><p>Healthcare organizations pull data from dozens of systems, including electronic health records like Epic and Cerner Oracle Health, claims data from Optum, Humana, and Aetna, social determinants from the US Census Bureau and American Community Survey, pharmacy systems like Epic Willow and MEDITECH, and patient monitoring from Philips IntelliVue and GE Healthcare CARESCAPE.</p><p>For my demo environment, I built a PostgreSQL database that approximates these datasets with patient records containing risk scores, vital signs, medication adherence, diagnoses, and cost data. The structure mirrors what you would see in a real clinical decision support implementation.</p><p>Fivetran moves all of this data into Snowflake, and whether the source is a database, a SaaS application, or a custom REST API using Fivetran’s Connector SDK, the pattern is the same: automated, reliable data movement into any data and AI platform, data lake, or database.</p><p>From there, dbt transforms the raw data into analytical views. The view I used for this project, VW_CDS_HIGH_RISK_PATIENTS, aggregates patient data with calculated risk scores, priority levels, and recommended actions. This view was already built and tested before I started on the CDS Early Warning MCP server.</p><p>This matters because the MCP server assumes trusted, high-quality data, and if the underlying pipeline is broken, nothing else works. Fivetran handles data movement, dbt handles transformation, Fivetran Census handles activation, and the MCP server handles orchestration. Each layer does what it does best.</p><h3><strong>The Problem: Actionable Data That Doesn’t Always Drive Action</strong></h3><p>Here’s a scenario that can play out in healthcare organizations.</p><p>A charge nurse starts their shift at 7 AM. Somewhere in their healthcare systems of record, there’s a view with critical patients flagged for potential sepsis risk, each with a risk score, vital signs status, medication adherence data, and a recommended action. The data exists, it’s accurate, and it’s current.</p><p>But the nurse is working in one system, perhaps checking patient charts, reviewing overnight notes, or waiting for a report that runs at noon. The intelligence layer exists separately from the clinical workflow.</p><p>Research suggests sepsis mortality can drop 15–20% when intervention begins within the first hour, but in scenarios like this, the data showed the risk at 6 AM, while the nurse found out at 10.</p><p>That’s not necessarily a data problem, but there is definitely a data activation gap.</p><h3>The Solution: Natural Language to Query to Action</h3><p>What if the nurse could ask: “Who should I be worried about today?”</p><p>And what if that question automatically queried a Snowflake Cortex agent, filtered for critical patients, and sent formatted alerts to the care team’s Slack or Teams channel, or to their preferred messaging platform?</p><p>That’s exactly what the CDS Early Warning MCP server accomplishes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*8Ig1qX-d1gRmjVQc7YQbbg.png" /><figcaption>Asking ‘Who should I be worried about today?’ returns prioritized patient alerts</figcaption></figure><p>The architecture has four components:</p><ol><li><strong>Snowflake Cortex Agent</strong> orchestrates natural language queries and decides when to use the semantic model versus when to invoke custom UDFs</li><li><strong>Custom UDFs in Snowflake</strong> contain business logic for alert routing and daily summaries</li><li><strong>CDS Early Warning MCP Server</strong> connects Claude Desktop to Snowflake Cortex and triggers Fivetran Census syncs</li><li><strong>Fivetran Census</strong> delivers alerts to Slack with proper formatting</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_bRyroxrwjIXj0gu5cdi7Q.png" /><figcaption>CDS Early Warning MCP Server — Reference Architecture Diagram</figcaption></figure><h3>Snowflake Cortex: The AI Layer</h3><p>Snowflake Cortex is where the intelligence lives. Two components work together: Cortex Analyst and Cortex Agent.</p><p><strong>Cortex Analyst</strong> provides the semantic layer. I created a semantic view that works from a dbt-created viewVW_CDS_HIGH_RISK_PATIENTS that describes the data in business terms. The model maps natural language concepts to database columns:</p><ul><li>“Critical patients” → PRIORITY_LEVEL = &#39;Critical&#39;</li><li>“Kidney disease” → DIAGNOSIS LIKE &#39;%Kidney%&#39;</li><li>“Not taking medications” → MEDICATION_ADHERENCE IN (&#39;Non-Adherent&#39;, &#39;Partially Adherent&#39;)</li></ul><p>This semantic view is a governed, business-friendly abstraction over the raw data. The data team defines “what critical means” once, and everyone benefits. When someone asks, “Find critical patients with kidney disease who aren’t taking their medications,” Cortex Analyst generates the right SQL. No prompt engineering is required from the user, which is a big win for me because I don’t believe users should be expected to become prompt engineers.</p><p><strong>Cortex Agent</strong> orchestrates the tools and, rather than just translating queries, decides when to use the semantic view for data retrieval and when to invoke a custom UDF for business logic. When a user requests “route an alert for Patient_000572,” the agent recognizes this as an action, not a query, and invokes the appropriate UDF.</p><p>For this project, I created two custom UDFs as Cortex Agent tools: ROUTE_PATIENT_ALERT which prepares complete alert payloads with risk scores, routing recommendations, and pre-formatted Slack messages, and GET_DAILY_ALERT_SUMMARY which aggregates metrics across all high-risk patients for daily briefings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UVgVwnXYeKyxmkcqlczlpA.png" /><figcaption>Asking Snowflake Intelligence ‘Find patients with kidney disease and high readmission rate’</figcaption></figure><p>The key advantage is that AI compute stays inside Snowflake. Inference occurs within the data and AI platform rather than being sent to external APIs, so data doesn’t leave the environment. This matters for healthcare organizations with strict data governance requirements.</p><p>Without Cortex, Claude would need to write SQL directly, which means knowing the schema, getting the table names right, and handling edge cases. Without Cortex, estimated accuracy on complex queries is about 60–70% on the first attempt, but with the Cortex semantic layer, it jumps to around 95%.</p><h3>Workflow-Centric Design: The Key Insight</h3><p>I made some big mistakes early on working with MCP, but I’ve continued to adjust my approach and have applied those changes to the CDS Early Warning MCP server.</p><p>If this was the first MCP server I was building, I likely would have exposed granular API operations: get patient data, calculate risk score, format alert payload, write to staging table, trigger sync. That’s five separate tools that Claude would have had to chain together for a single workflow.</p><p>The problem is that each tool call costs tokens, each round-trip adds latency, and most importantly, every time Claude has to interpret intermediate results, there’s a chance for error.</p><p>The workflow-centric approach flips this. Instead of exposing operations, I expose complete workflows. This is the current approach of my MCP server builder skill, so this CDS Early Warning MCP server started with workflow-centric design from the beginning.</p><p>My CDS Early Warning MCP server has 12 tools organized by workflow:</p><ul><li>Patient Queries (3 tools): Natural language via Cortex, alert payloads, direct SQL</li><li>Alert Delivery (2 tools): Route alerts and summaries to Slack via Fivetran Census</li><li>Alert Management (4 tools): Routing, escalation tracking, acknowledgment, outcomes</li><li>Resources (1 tool): Staff availability by unit</li><li>Census Integration (2 tools): Discover syncs, verify delivery status</li></ul><p>Compare this to the granular approach I avoided:</p><p><strong>API-Centric (The Path I Didn’t Take):</strong></p><ul><li>Tool call 1: get_patient_data() → 1,500 tokens</li><li>Tool call 2: calculate_risk_score() → 1,200 tokens</li><li>Tool call 3: format_alert_payload() → 1,000 tokens</li><li>Tool call 4: write_to_staging() → 800 tokens</li><li>Tool call 5: trigger_census_sync() → 600 tokens</li><li><strong>Total: 5,100 tokens, 5 round-trips</strong></li></ul><p><strong>Workflow-Centric (Current Design):</strong></p><ul><li>Tool call 1: send_alert_via_census(patient_id) → 635 tokens</li><li>Total: 635 tokens, 1 round-trip</li></ul><p>That’s an 87% reduction in tokens per alert. When I routed seven patient alerts during testing, each required 600–700 tokens, compared with the 5,000+ it would have required with an API-centric design. The estimated savings across the session was around 25,000 tokens.</p><p>But as mentioned above, token savings is just the start. Response time improved by 60% because there’s no waiting between sequential tool calls, and accuracy improved because Claude isn’t interpreting intermediate results.</p><h3><strong>Implementation with FastMCP</strong></h3><p>I have standardized on building MCP servers using FastMCP (my preferred approach in my MCP server builder Claude Skill), which provides a streamlined approach to MCP server development. Instead of managing low-level protocol details, you are able to focus on the business logic, specifically defining what workflows matter, how alerts should be routed, and what information users need. For organizations looking to build similar systems, choosing tools that minimize technical overhead allows teams to focus on solving the actual business problem rather than wrestling with implementation details.</p><h3>Where the Logic Lives</h3><p>This is another design decision I learned from earlier MCP servers.</p><p>In earlier versions, I would have implemented the business logic in Python, including risk score calculations, routing rules, and currency formatting. The MCP server was doing the majority of the thinking.</p><p>One problem with that approach is version drift. If the risk score calculation lives in both Snowflake and the MCP server, they will eventually diverge. Someone updates the SQL but forgets the Python. Now you have two different answers to the same question.</p><p>For this project, I implemented the business logic in Snowflake UDFs. This approach worked well for this use case, and I’ve since used it successfully in additional use cases.</p><p>The ROUTE_PATIENT_ALERT UDF takes a patient ID and returns a complete alert payload including risk score, priority level, routing recommendation, escalation timer, and a pre-formatted Slack message. The UDF applies all the business rules, while the MCP server simply passes the result through.</p><p>The GET_DAILY_ALERT_SUMMARY UDF aggregates metrics across all high-risk patients, including critical count, high count, patients with critical vitals, average risk score, and total cost at risk. The Cortex Agent calls this UDF when someone requests a daily summary, recognizes the intent, and selects the appropriate tool.</p><p>During testing, I asked about Patient_000135’s readmission risk, and the response indicated 100% readmission risk, a $93,267 cost of care, and a PAGE_PHYSICIAN_IMMEDIATELY routing. Those numbers came directly from the UDF, and Claude didn’t calculate anything. It simply presented the result that Snowflake computed.</p><h3>Intelligent Query Routing: The Right Path for Each Question</h3><p>The MCP server doesn’t use a single approach for every question. It routes requests based on their nature:</p><ul><li><strong>Natural language exploration</strong> (“What’s the average risk score by diagnosis?”) → Cortex Analyst generates SQL</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*mNAXjw18WN3lX0aB2fdtyw.png" /><figcaption>“What’s the average risk score by diagnosis?”</figcaption></figure><ul><li><strong>Business operations</strong> (“Send alert for Patient_000572” or “Send a daily patient summary”) → Snowflake UDFs</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*HTS5UOo-mqBkBGjkNNQzFw.png" /><figcaption>“Send an alert for Patient_000572”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*iccqCCdvhQMVvHri2SFdLw.png" /><figcaption>“Send a daily patient summary report”</figcaption></figure><ul><li><strong>Alert delivery</strong> → Fivetran Census</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*65ZlrEZui2ck3wUVoUvFEQ.png" /><figcaption>Patient alerts and Daily summaries orchestrated by MCP and sent by Fivetran Census to Slack</figcaption></figure><p>The user doesn’t need to know which path their request takes. The MCP server handles that orchestration automatically.</p><h3>Fivetran Census: The Activation Layer</h3><p>To provide additional context on the screenshots above, Fivetran Census handles the delivery, and the CDS Early Warning MCP server doesn’t call the Slack API directly. Instead, it writes to a staging table in Snowflake (CDS_ALERT_QUEUE or CDS_DAILY_SUMMARY) and triggers a Fivetran Census sync.</p><p>I used Slack for this demo because it’s what I had available, but Slack could be any notification system. Fivetran Census connects to Teams, email platforms, CRM systems, and dozens of other application destinations. The pattern stays the same regardless of where the alerts land.</p><p>Fivetran Census handles message formatting with Slack Block Kit templates, so the alerts look professional with structured fields for patient ID, risk score, vital signs, and recommended actions. <strong>In our implementation, we pre-build the complete Slack message as markdown text in the Snowflake UDF’s </strong><strong>SLACK_MESSAGE field, then use a simple Census template to send it directly—this centralizes formatting logic in SQL rather than splitting it between Census Block Kit templates and the MCP server.</strong> Building that formatting into the MCP server would be brittle and hard to maintain.</p><p>Fivetran Census also provides observability, allowing me to see sync history, troubleshoot failures, and track delivery while the MCP server stays focused on orchestration.</p><p>And this pattern scales. When I want to add email alerts or Teams notifications, I add a Fivetran Census sync with no new code in the MCP server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KxsdGyH9ZWwMDb0sidSxag.png" /><figcaption>Fivetran Census Sync for the CDS Alert Queue</figcaption></figure><h3>Results from Testing</h3><p>I ran a comprehensive test session that included querying hundreds of patient records, sending multiple alerts via Fivetran Census, generating financial analyses, and routing critical patient alerts.</p><p><strong>Token Usage:</strong></p><ul><li>Used: 92,240 tokens for the full session</li><li>Traditional approach estimate: 250,000+ tokens</li><li>Savings: 63% reduction</li></ul><p><strong>Response Time:</strong></p><ul><li>Average tool call: 4–6 seconds</li><li>Complex workflow (alert routing): 4–6 seconds total</li><li>Traditional approach estimate: 15–20 seconds per workflow</li><li>Improvement: 60% faster</li></ul><p><strong>Accuracy:</strong></p><ul><li>Calculation errors: 0 (business logic handled by Snowflake UDFs, orchestrated by the Cortex Agent)</li><li>Query accuracy: ~95% (Cortex Analyst semantic layer)</li><li>Traditional approach estimate: 60–70% first-attempt accuracy</li></ul><p>The counterintuitive insight for me is that less flexibility in the MCP server design created more capability for Claude. When Claude doesn’t have to orchestrate low-level operations, it can focus on understanding user intent. When Snowflake handles the business logic and AI inference, accuracy goes up.</p><h3>The Pattern Can Be Refactored</h3><p>This architecture isn’t healthcare-specific. The same pattern works for:</p><ul><li><strong>Higher Education:</strong> Student retention alerts when at-risk students show warning signs</li><li><strong>Manufacturing:</strong> Equipment failure predictions routed to maintenance teams</li><li><strong>Financial Services:</strong> Fraud detection alerts with contextual customer data</li><li><strong>Agriculture:</strong> Livestock health warnings based on weather and sensor data</li></ul><p>The implementation steps are consistent:</p><ol><li>Get your data pipeline in place with Fivetran moving data into Snowflake</li><li>Transform raw data into analytical views with dbt</li><li>Build a semantic model over your key views using Cortex Analyst (note: dbt can also create semantic views in Snowflake directly using the <a href="https://hub.getdbt.com/Snowflake-Labs/dbt_semantic_view/latest/">dbt_semantic_view package</a>, which I didn’t use for this project but plan to explore in the future)</li><li>Create UDFs for domain-specific business logic</li><li>Configure a Cortex Agent with the semantic model and UDFs as tools</li><li>Deploy an MCP server with workflow-centric tools</li><li>Set up Fivetran Census syncs for your activation channels</li></ol><h3>Key Takeaways</h3><p>If you’re building MCP servers, here’s what I recommend:</p><p><strong>Start with workflows, not APIs.</strong> Ask what you or your users need to accomplish, not what operations you can expose. Fewer, smarter tools beat many granular ones.</p><p><strong>Focus your context layer.</strong> When you reduce what you’re asking the model to do, token costs drop, performance improves, and most importantly, accuracy follows. You might not want to ask Claude, or build logic into your MCP server, to calculate what Snowflake can calculate in the platform.</p><p><strong>Let Snowflake Cortex do the AI work.</strong> The Cortex Agent orchestrates queries and tool calls. Cortex Analyst provides governed semantic models. AI inference stays inside the data and AI platform where your data already lives.</p><p><strong>The data foundation is table stakes.</strong> None of this works without trusted, high-quality data flowing reliably into Snowflake. Fivetran handles data movement and dbt handles transformation, so build on top of that foundation.</p><p><strong>Activation is the last mile.</strong> Data and intelligence in Snowflake can deliver significant value beyond the platform itself as well. Fivetran Census gets it into the applications where people work, make immediate decisions, and take action.</p><p><strong>Keep iterating.</strong> My first MCP servers were pretty bloated, but I refined and adjusted until the design matched the use case, and that process of continuous improvement is part of the work (and part of the fun).</p><p>The modern data stack is reaching the point where we can build conversational interfaces to data that actually drive action across SaaS services. MCP is the orchestration layer, Snowflake Cortex is the AI and Intelligence layer, and Fivetran Census is the activation layer; the context layer ties it all together. If you get that right, the efficiency and accuracy follow.</p><p>I’m doing my best as I continue to iterate and learn to build MCP servers that are efficient and accurate. If you’re building something similar, I’d like to hear about it. The pattern is straightforward, and once you see it, the use cases are wide open.</p><p>Kelly Kohlleffel leads Fivetran’s Global Partner Sales Engineering organization, working with technology and consulting partners to deliver modern data solutions. He also hosts the <a href="https://www.fivetran.com/podcast">Fivetran Data Podcast</a>, where industry leaders share their data journeys, visions, and challenges. Prior to Fivetran, Kelly held leadership and sales roles at NTT Data, Hashmap, Hortonworks, and Oracle. Connect with Kelly on <a href="https://www.linkedin.com/in/kellykohlleffel/">LinkedIn</a> for insights on data, AI, and partnerships.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e80ef259d6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>