<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Felix Huttmann</title>
    <description>The latest articles on DEV Community by Felix Huttmann (@felixhuttmann).</description>
    <link>https://dev.to/felixhuttmann</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F699650%2Fc350188a-ecad-416a-9384-9b579e7bd059.png</url>
      <title>DEV Community: Felix Huttmann</title>
      <link>https://dev.to/felixhuttmann</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/felixhuttmann"/>
    <language>en</language>
    <item>
      <title>How Kubernetes-Inspired API Design Helps LLMs</title>
      <dc:creator>Felix Huttmann</dc:creator>
      <pubDate>Tue, 23 Sep 2025 19:12:09 +0000</pubDate>
      <link>https://dev.to/felixhuttmann/how-kubernetes-inspired-api-design-helps-llms-1pgl</link>
      <guid>https://dev.to/felixhuttmann/how-kubernetes-inspired-api-design-helps-llms-1pgl</guid>
      <description>&lt;p&gt;A recent blog post from &lt;a href="https://vercel.com/blog/the-second-wave-of-mcp-building-for-llms-not-developers" rel="noopener noreferrer"&gt;Vercel on MCP API design&lt;/a&gt; triggered me.  &lt;/p&gt;

&lt;p&gt;According to the blog post, it is not a great idea to just wrap your normal API with an MCP server. Instead, the developer should build new MCP operations that focus on &lt;em&gt;workflows&lt;/em&gt; that combine what would otherwise take multiple sequential API calls.&lt;/p&gt;




&lt;h2&gt;
  
  
  Vercel's Workflow Proposal
&lt;/h2&gt;

&lt;p&gt;They give the following example for an implementation of a workflow-style MCP operation called &lt;code&gt;deploy_project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;deploy_project&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Deploy a project with environment variables and custom domain&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;repo_url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;environment_variables&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;record&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt;
    &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;main&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;repo_url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;environment_variables&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Handle the complete workflow internally&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;project&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;createProject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;repo_url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;addEnvironmentVariables&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;environment_variables&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;deployment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;deployProject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;addCustomDomain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Project deployed successfully at &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;. Build completed in &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;deployment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;s.`&lt;/span&gt;
      &lt;span class="p"&gt;}]&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This bundles what would otherwise be four individual operations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;create_project(name, repo)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;add_environment_variables(project_id, variables)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;create_deployment(project_id, branch)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;add_domain(project_id, domain)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is not obviously a bad idea.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Workflows Help
&lt;/h2&gt;

&lt;p&gt;The performance improvement when bundling multiple API calls into workflows comes from multiple sources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fewer LLM re-invocations:&lt;/strong&gt; Every time an LLM agent uses a tool and then receives the tool result, it results in another LLM invocation. Even though prompt prefix caching reduces the cost (as the conversation history is the same), cached tokens still cost money. For Claude 4 Sonnet, where cached tokens cost 10% of uncached ones, a complex workflow taking more than &lt;em&gt;O(10)&lt;/em&gt; sequential tool invocations can result in costs being dominated by cached tokens.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lower chance of errors:&lt;/strong&gt; The LLM does not have to take the result from one tool call and use it as a parameter to a subsequent tool call. Servers often generate random IDs upon entity creation, and these need to be used in follow-up calls. LLM agents can hallucinate IDs or lose track of their task mid-workflow. Bundling the workflow reduces this surface area for error.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Downside
&lt;/h2&gt;

&lt;p&gt;But there are problems with workflows, too:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Loss of flexibility&lt;/strong&gt;: If only workflows are exposed as MCP tools, certain operations (&lt;code&gt;create_project&lt;/code&gt;, &lt;code&gt;add_environment&lt;/code&gt;, etc.) are no longer possible to run in isolation. For example, the agent might want to add more environment variables or domains to a pre-existing project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Token overhead&lt;/strong&gt;: If the new "workflow-based" MCP tools are in addition to the low-level MCP tools, it increases the amount of tokens that the MCP tool definitions consume.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extra design effort&lt;/strong&gt;: Deciding what makes a &lt;em&gt;“good workflow”&lt;/em&gt; is nontrivial. And if a workflow is good, then why expose it only via MCP, and not to other API users? Humans might also want that simpler API.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Kubernetes Shows the Way
&lt;/h2&gt;

&lt;p&gt;For an example of what I would regard as a great "workflow," take a look at the Kubernetes &lt;a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="noopener noreferrer"&gt;deployment entity&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Consider you are tasked with deploying a new version of your application without downtime using only the low-level API calls to create and delete pods. You would have to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create new pods&lt;/li&gt;
&lt;li&gt;Wait for them to start up and ensure they're healthy&lt;/li&gt;
&lt;li&gt;Stop the old pods&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The k8s deployment entity can take care of all of this for you! You create the deployment entity, and the k8s-internal controllers will perform the complex multi-step tasks needed to achieve the final goal of rolling out a new version without downtime.&lt;/p&gt;

&lt;p&gt;At the same time, Kubernetes does not take away low-level control. You can still delete or create pods in an ad-hoc manner if needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Names, Not Random IDs
&lt;/h2&gt;

&lt;p&gt;The Kubernetes API provides inspiration for another thing: &lt;em&gt;avoid requiring the client to deal with server-generated random identifiers.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In Kubernetes, related entities instead refer to each other using their client-generated name or labels. The result is that it is typically possible to create multi-entity configs in the k8s control plane in one go and let Kubernetes figure out how to wire up the entities.&lt;/p&gt;




&lt;h2&gt;
  
  
  Bringing It Together
&lt;/h2&gt;

&lt;p&gt;Applying these ideas to Vercel's &lt;code&gt;deploy_project&lt;/code&gt; example from above would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vercel.com/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;project&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;$project_name&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;repo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;$project_repo&lt;/span&gt;
  &lt;span class="na"&gt;environment_variables&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;$env_variables&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vercel.com/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;deployment&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;$deployment_name&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;$branch&lt;/span&gt;
  &lt;span class="na"&gt;project&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;$project_name&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vercel.com/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;domain&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;$domain_name&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;domain&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;$domain&lt;/span&gt;
  &lt;span class="na"&gt;project&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;$project_name&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All of this could be applied in a single step, analogous to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To know whether it worked, the LLM would need another tool to wait for the k8s objects to attain readiness or failure, similar to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl &lt;span class="nb"&gt;wait&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Kubernetes shows us a design pattern that is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Declarative&lt;/strong&gt;: Clients state intent, not steps
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composable&lt;/strong&gt;: Both low- and high-level operations remain possible
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clean&lt;/strong&gt;: Internal IDs do not bother the client
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficient&lt;/strong&gt;: Agents need to treat only the final result
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Designing APIs in this style wouldn’t just make LLM agents more capable — it would also make APIs more usable for humans and easier to treat with infrastructure-as-code tooling.&lt;/p&gt;

&lt;p&gt;Instead of choosing between &lt;em&gt;“wrapping APIs”&lt;/em&gt; and &lt;em&gt;“building workflows,”&lt;/em&gt; we could be asking: What would the Kubernetes version of this API look like?&lt;/p&gt;




&lt;p&gt;This blog post was partly inspired by experience working on an internal AI assistant at my employer &lt;a href="https://www.linkedin.com/company/tng-technology-consulting/" rel="noopener noreferrer"&gt;TNG Technology Consulting&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>kubernetes</category>
      <category>api</category>
      <category>architecture</category>
    </item>
    <item>
      <title>If the teams in your organization are independent, the organization has failed its purpose</title>
      <dc:creator>Felix Huttmann</dc:creator>
      <pubDate>Thu, 13 Jul 2023 21:34:18 +0000</pubDate>
      <link>https://dev.to/felixhuttmann/if-the-teams-in-your-organization-are-independent-the-organization-has-failed-its-purpose-3894</link>
      <guid>https://dev.to/felixhuttmann/if-the-teams-in-your-organization-are-independent-the-organization-has-failed-its-purpose-3894</guid>
      <description>&lt;p&gt;The value of any single organization is that a common leadership allows people to create value more efficiently than would be possible if there were multiple smaller organizations collaborating toward the same goal.&lt;/p&gt;

&lt;p&gt;If teams within an organization are operating independently, then those teams could function equally well as separate entities. This implies that the larger organization, comprised of multiple independent teams, would offer no advantages over numerous small companies. In such a scenario, the organization is nothing greater than the sum of its parts.&lt;/p&gt;

&lt;p&gt;At the same time, a large organization comprised of independent team still faces all the downsides of a large organization, namely:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Regulation: Bigger companies inherently face more regulatory challenges due to their size and reach.&lt;/li&gt;
&lt;li&gt;Misalignment of shareholders and employees. In larger orgs the employee's individually small stock share dilutes the impact of their actions on the overall value of the firm, making them less likely to act in their role as shareholder and more as employees.&lt;/li&gt;
&lt;li&gt;Lower granularity for evolutionary pressure and natural selection: Businesses that deliver value should grow, those that do not should die. But larger orgs lump poorly- and well-performing units together, and prevent them from dying or growing independently.&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
  </channel>
</rss>
