<?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: Sharoze Iftikhar</title>
    <description>The latest articles on DEV Community by Sharoze Iftikhar (@chsharoze).</description>
    <link>https://dev.to/chsharoze</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4271400%2Fac9ff159-0741-4cb4-ab9a-10f40e6fa475.jpg</url>
      <title>DEV Community: Sharoze Iftikhar</title>
      <link>https://dev.to/chsharoze</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chsharoze"/>
    <language>en</language>
    <item>
      <title>approved: true is not approval: server-side approval for AI agent writes</title>
      <dc:creator>Sharoze Iftikhar</dc:creator>
      <pubDate>Sat, 28 Nov 2026 21:54:12 +0000</pubDate>
      <link>https://dev.to/chsharoze/approved-true-is-not-approval-server-side-approval-for-ai-agent-writes-8mi</link>
      <guid>https://dev.to/chsharoze/approved-true-is-not-approval-server-side-approval-for-ai-agent-writes-8mi</guid>
      <description>&lt;p&gt;If your MCP server has a write tool, you have probably seen a schema like this, or a tool description that asks the model to confirm first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"update_record"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"inputSchema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"properties"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"record_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"string"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"fields"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"object"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"approved"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"boolean"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Set to true once the user has confirmed"&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;The tool description tells the model to show the change and ask first. The &lt;code&gt;approved&lt;/code&gt; flag is how the model reports that it did.&lt;/p&gt;

&lt;p&gt;The problem: the server cannot tell an approved call from an unapproved one. The same party that proposes the change also reports the approval. A headless agent, a plain mistake or a prompt injection can set &lt;code&gt;approved: true&lt;/code&gt;. An approval given for one change can be replayed for a later, different change. And afterwards, nobody can show who approved what.&lt;/p&gt;

&lt;p&gt;I kept running into this while connecting agents to CRMs, so I wrote down what a server would have to do to make approval real. The result is &lt;strong&gt;Enforced Approval&lt;/strong&gt;, an open draft specification. Draft 0.2 is out now.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea: the server enforces it, not the client
&lt;/h2&gt;

&lt;p&gt;The check moves to the server, so it holds even when the client never asks anyone.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Hash the exact change.&lt;/strong&gt; The server builds a change object from the request, the server, the account and the principal (the identity from the agent's credential), and hashes it. Fields that only &lt;em&gt;claim&lt;/em&gt; approval happened are left out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refuse without approval.&lt;/strong&gt; A guarded write with no approval for that hash does not run. The server returns a refusal that says what is needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Approve on the server's own page.&lt;/strong&gt; The refusal links to an approval page on the server. A person signs in, sees the change and approves or denies it. The agent then sends the same request again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single use.&lt;/strong&gt; An approval authorizes at most one execution, and it expires. It cannot authorize a later, different change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bounded grants.&lt;/strong&gt; For repetitive work, a person can approve a bounded set of future changes. The server fixes the scope from the change shown (principal, account, operation, fields); the person only sets a record limit and an expiry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit.&lt;/strong&gt; The server writes a hash-chained record of each refusal, each use of an approval and each outcome, naming the approver.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because the client carries nothing in this "server-issued" profile, it needs no support from the client, including clients you don't control. There is also an experimental signed-receipts profile, where an organization-registered issuer signs a receipt the client carries. No client I've tested can carry a receipt yet, so that part is there for comment.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's in the release
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;the core specification and the two approval profiles&lt;/li&gt;
&lt;li&gt;numbered conformance tests, each naming the requirement it checks&lt;/li&gt;
&lt;li&gt;test vectors for the change hash&lt;/li&gt;
&lt;li&gt;a sandbox server you can run locally (Node 24+):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; sandbox &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm install
node test/run.mjs
node test/e2e-server-issued.mjs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One warning, from the README itself: the sandbox is a test harness, not a product. Its sign-in accepts a typed test name, its data is synthetic and its key is public test material. Don't put it in front of a real system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it honestly stands
&lt;/h2&gt;

&lt;p&gt;Draft 0.2 is frozen and open for review. So far there has been no live run of the Draft 0.2 sandbox in a real client, no independent server implementation, and no human security review. That is exactly the kind of feedback I'm looking for.&lt;/p&gt;

&lt;p&gt;If you build MCP servers or agent tooling that writes to real systems, I'd value your eyes on it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spec and sandbox: &lt;a href="https://github.com/chsharoze/enforced-approval" rel="noopener noreferrer"&gt;https://github.com/chsharoze/enforced-approval&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Overview and citation: &lt;a href="https://sharozeiftikhar.com/enforced-approval/" rel="noopener noreferrer"&gt;https://sharozeiftikhar.com/enforced-approval/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;DOI (all versions): &lt;a href="https://doi.org/10.5281/zenodo.24379987" rel="noopener noreferrer"&gt;https://doi.org/10.5281/zenodo.24379987&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Issues are the best place for feedback. Please name the document and the requirement or test number you mean.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI assistance and reviewed and edited by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>security</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
