Subtitle: How changing MCP servers, modified tool schemas, and silent permission expansion can turn a previously safe AI workflow into a production security incident.
I have started looking at AI agent reliability from a slightly different angle. We spend a lot of time discussing whether an agent makes the right decision, whether it uses the correct data, and whether it can recover when an API call fails. But there is another question that deserves the same attention:
What happens when the tool an agent trusts is no longer the tool it originally trusted?
Imagine building an AI assistant for an operations team. You give it access to an MCP server with three tools. One reads order details, another checks inventory, and the third retrieves shipment status. You review the available tools, approve their use, configure permissions, and test the workflow. Everything behaves as expected.
A few weeks later, the MCP server is updated. The tool named get_order_details still exists. The connection still works. Authentication succeeds. The agent sees a familiar tool name and continues using it.
But the implementation behind that name has changed. Perhaps the tool now returns additional customer information. Perhaps its input schema accepts a new parameter that enables a more powerful operation. Perhaps the tool description has changed in a way that encourages the model to use it differently.
Nothing in the agent's original approval necessarily tells it that the security assumptions have changed. This is the problem I want to explore. We often treat tool approval as a one-time decision. In a system where tools, schemas, permissions, and server implementations evolve independently, that assumption is dangerous.
The tool you approved may not be the tool you are calling
An AI agent does not interact with a tool in the same way a developer interacts with a fixed function in a traditional application.
A developer might import a function from a known package, review its implementation, lock its dependency version, and deploy it as part of a controlled release. An AI agent, particularly one using MCP, can discover tools dynamically, inspect their descriptions, and decide which one to call based on the context of a task.
That flexibility is useful. It is also a new trust boundary. Consider an MCP server exposing this tool:
{
"name": "get_order_details",
"description": "Retrieve order information using an order ID.",
"inputSchema": {
"type": "object",
"properties": {
"order_id": {
"type": "string"
}
},
"required": ["order_id"]
}
}
The agent is allowed to retrieve an order using its identifier. The application might enforce a read-only permission, and the tool might return only the information required by the workflow. Now imagine that the server is updated and exposes this:
{
"name": "get_order_details",
"description": "Retrieve order information, customer contact details, and internal account notes.",
"inputSchema": {
"type": "object",
"properties": {
"order_id": {
"type": "string"
},
"include_customer_profile": {
"type": "boolean",
"default": true
},
"include_internal_notes": {
"type": "boolean",
"default": true
}
},
"required": ["order_id"]
}
}
The tool still has the same name. It may even be operated by the same organisation. But its behaviour and the data it can expose have changed.
This is not necessarily a malicious update. It could be a legitimate feature release. The problem is that a previously approved capability has silently become broader.
The agent may now have access to information that was never part of the original security review. This is why I would separate the three questions:
- Is this the tool we intended to connect to?
- Is this the exact version of the tool contract we approved?
- Does this particular invocation have permission to perform this particular action?
Those questions are related, but they are not interchangeable. A familiar name answers none of them reliably.
MCP makes tool discovery dynamic, so trust must be dynamic too
One of the useful characteristics of the Model Context Protocol is that clients can discover tools exposed by servers rather than requiring every integration to be hardcoded into the application.
A server can expose a list of tools and their input schemas. Clients can use that information to understand what operations are available. MCP also provides a mechanism for servers to notify clients when their tool list changes.
This is valuable for extensibility. A server can add a capability without requiring an entirely new client implementation.
However, dynamic discovery introduces a security question that traditional static integrations often handle differently: what should happen when the available capabilities change after approval?
Suppose an agent connects to an MCP server at startup. It discovers ten tools, loads their descriptions into its context, and begins processing requests.
Later, the server changes one of those tools. If the client never checks for changes, it might continue operating using an outdated understanding of the server. If it automatically accepts every new tool definition, it might accept a capability expansion without review.
Neither behaviour is a good security policy. The important distinction is between discovering a tool and trusting a tool. Discovery tells the client what the server currently offers. Trust determines whether the application is willing to allow the agent to use that capability.
A tool list is not an authorisation policy.
Tool names are not identities
One of the first changes I would make in an agent architecture is to stop treating a tool name as its identity. A tool named update_customer_record is just a label. Another server can expose a tool with exactly the same name and completely different behaviour.
Even the same server can change the implementation behind that name. For security purposes, I would identify a tool using a combination of attributes:
- The identity of the MCP server.
- The authenticated server endpoint or deployment identity.
- The tool name.
- The approved input schema.
- The approved output contract, where relevant.
- The version of the tool implementation or signed release.
- The capabilities and permissions granted to the tool.
This creates a much stronger identity model. For example, the application might maintain a trusted tool manifest:
{
"server_id": "orders-mcp-production",
"server_identity": "orders-service-prod",
"tool_name": "get_order_details",
"tool_version": "1.4.2",
"schema_fingerprint": "sha256:approved-fingerprint",
"allowed_capabilities": [
"orders.read"
],
"approval_status": "approved"
}
The fingerprint is illustrative, not a real digest. In a real implementation, it would be calculated from a canonical representation of the approved schema.
The point is that the application now has something concrete to compare against.
If the server returns a different schema, the application can detect that the tool contract has changed. It does not have to ask the language model whether the change looks safe.
That decision belongs to the security and policy layer.
Detecting a changed schema before the agent uses it
A schema fingerprint is a useful starting point. The application can serialise a tool schema into a deterministic representation and calculate a cryptographic hash. If the schema changes, the hash changes as well. Here is a simplified Python example:
import hashlib
import json
def schema_fingerprint(schema: dict) -> str:
canonical = json.dumps(
schema,
sort_keys=True,
separators=(",", ":"),
ensure_ascii=False
)
digest = hashlib.sha256(
canonical.encode("utf-8")
).hexdigest()
return f"sha256:{digest}"
The use of sorted keys and consistent serialisation matters. Two JSON objects with identical meaning should not produce different fingerprints simply because their properties appear in a different order.
However, this example is intentionally simple. A production implementation needs a defined canonicalization policy, including how it handles schema references, defaults, descriptions, omitted fields, and version-specific metadata.
It should also distinguish between changes that affect security and changes that do not.
For example, changing a spelling mistake in a description may not require the same response as adding a new parameter that exposes private information.
I would therefore keep two fingerprints where appropriate:
Contract fingerprint: Represents the complete approved tool definition, including descriptions and metadata that influence model behaviour.
Capability fingerprint: Represents the security-relevant aspects of the tool, such as accepted inputs, exposed data, side effects, and required permissions.
This distinction matters because descriptions are not harmless documentation in an AI system. The model may use them to decide when and how to call a tool.
A changed description can influence behaviour even if the input schema remains identical.
At the same time, a schema fingerprint alone cannot prove that the server's implementation is unchanged. A server can preserve its schema while changing what happens behind the API.
That is why schema verification must be combined with server identity, release provenance, runtime authorisation, and implementation controls.
A practical runtime verification layer
I would place a tool verification layer between the MCP client and the agent's tool execution interface. The agent can request a tool call, but the request does not go directly to the MCP server. Instead, the verification layer checks whether the tool is still approved.
The flow looks like this:
User Request
|
v
AI Agent
|
v
Proposed Tool Call
|
v
+---------------------+
| Tool Verification |
| |
| Server Identity |
| Tool Identity |
| Schema Fingerprint |
| Capability Policy |
+---------------------+
|
+-------+-------+
| |
v v
Approved Changed or
Contract Untrusted
| |
v v
Authorisation Block Call
Check Alert / Review
|
v
Input Validation
|
v
MCP Server
|
v
Result Validation
|
v
AI Agent
The important design decision is that the model does not control the verification result.
It can propose a tool invocation, but the application decides whether that invocation is permitted.
Here is a simplified implementation:
class ToolTrustError(Exception):
pass
class ToolVerifier:
def __init__(self, approved_manifest):
self.approved_manifest = approved_manifest
def verify(self, server_id, tool_name, schema):
key = f"{server_id}:{tool_name}"
approved = self.approved_manifest.get(key)
if approved is None:
raise ToolTrustError(
"Tool is not registered as trusted"
)
current_fingerprint = schema_fingerprint(schema)
if current_fingerprint != approved["schema_fingerprint"]:
raise ToolTrustError(
"Tool contract changed after approval"
)
if approved["approval_status"] != "approved":
raise ToolTrustError(
"Tool is not currently approved"
)
return True
The example deliberately fails closed. If the current contract does not match the approved contract, the tool invocation is blocked.
It is important to understand what this code does not do. It does not authenticate the MCP server, prove the server's implementation integrity, validate every input, or enforce authorisation at the resource level. Those controls need to exist separately.
The verifier is one part of the trust boundary, not the entire security architecture.
A changed schema should not automatically mean a malicious tool
There is an important balance here.
I would not want every harmless update to stop an entire production workflow. At the same time, I would not want a tool to gain new permissions just because the server owner added a field.
The answer is a controlled change-management process.
When the application detects a changed tool definition, it should compare the current contract with the approved version and classify the difference.
For example:
| Change | Possible security impact | Suggested response |
|---|---|---|
| Description wording changed | Model behaviour may change | Review and reapprove |
| Optional input added | May expand invocation behaviour | Block pending review |
| Required input changed | Existing calls may behave differently | Block and test |
| Output fields expanded | May expose additional data | Review data permissions |
| New write operation | New side-effect capability | Explicit approval |
| Server identity changed | Trust boundary changed | Reject connection |
| Implementation digest changed | Code provenance changed | Verify release and reapprove |
The exact classification depends on the application.
A change to a tool's description might be low risk in a tightly controlled workflow, but it should not automatically be ignored. A description can contain instructions that influence an agent's behaviour.
A new parameter might also be harmless if it only changes formatting. But if it enables access to internal customer records, it changes the security boundary. The important thing is to make that assessment explicit. I would not allow the language model to decide whether its own tool has become trustworthy. That is a circular security model.
The more dangerous problem: schema unchanged, implementation changed
This is where I think many implementations could develop a false sense of security. Imagine that the original tool has this interface:
def get_order_details(order_id: str):
return database.get_order(order_id)
The tool is read-only and returns the order associated with the supplied identifier. The server is then updated:
def get_order_details(order_id: str):
order = database.get_order(order_id)
audit_service.record_access(order_id)
return {
"order": order,
"customer_profile": database.get_customer(
order.customer_id
),
"internal_notes": database.get_internal_notes(
order.customer_id
)
}
The input schema has not changed at all. The tool still accepts one string called order_id. A schema fingerprint will not detect this implementation change.
The problem is no longer just tool discovery. It is software supply-chain trust. For sensitive MCP servers, I would combine schema verification with additional controls:
1. Server identity verification. The client should authenticate the server and verify that it is connecting to the expected deployment. TLS protects the connection, but the application should also establish the expected service identity.
2. Release provenance. Deployments should have traceable release versions and, where supported, signed artefacts or attestations. The client or deployment platform should be able to establish which approved build is running.
3. Capability enforcement outside the tool. A read-only agent should not become capable of accessing private records simply because a tool implementation starts returning them. The backend must enforce resource-level authorisation.
4. Output filtering. Results should be checked against the data classification and output contract expected by the workflow.
5. Change monitoring. A server release should produce an auditable event that can be compared with the approved deployment state.
The key principle is simple: the schema tells us what a tool claims to accept. It does not prove everything the implementation can do.
The permission problem is bigger than the tool description
I would also avoid giving an agent broad permissions simply because one of its tools needs a particular capability. For example, suppose an agent can retrieve order details and initiate refunds.
A poorly designed system might give the MCP server a general-purpose database credential and a payment API key with broad access. The tool interface might look harmless, but the underlying credentials could allow far more than the agent's approved workflow.
Instead, permissions should be enforced at the action level. For instance:
POLICIES = {
"get_order_details": {
"capabilities": ["orders. read"],
"effect": "read"
},
"reserve_inventory": {
"capabilities": ["inventory.reserve"],
"effect": "write"
},
"issue_refund": {
"capabilities": ["payments.refund"],
"effect": "financial"
}
}
Before executing a call, the application should verify that the authenticated agent has the required capability.
It should also check the resource being accessed, the user's authority, and any business constraints. A tool name is not a permission. A schema is not a permission.
A successful authentication handshake does not permit performing every operation exposed by the server.
This distinction becomes especially important when several agents share the same MCP server. A research agent may need read-only access, while an operations agent may need permission to reserve stock. They should not inherit the same capabilities just because they use the same connection.
Bind approvals to the actual action
There is another problem that appears when a tool invocation requires human approval.
Imagine an agent proposes a refund of ₹25,000. A person reviews the request and approves it. Before execution, the agent changes the amount to ₹75,000. If the system records only that the refund tool was approved, the approval may accidentally be reused for a different action. I would bind the approval to the actual invocation.
That means recording:
- The server identity and tool identity.
- The approved tool contract version.
- The exact resource being affected.
- The action parameters.
- The amount or other sensitive business values.
- The authenticated requester.
- The approval identity.
- An expiry time.
- A unique, single-use approval identifier.
A simplified approval payload might look like this:
{
"approval_id": "approval-8912",
"tool": "issue_refund",
"tool_version": "2.1.0",
"schema_fingerprint": "sha256:approved-fingerprint",
"order_id": "ORD-2048",
"amount": 25000,
"currency": "INR",
"approved_by": "finance-manager",
"expires_at": "2026-11-25T12:00:00Z",
"single_use": true
}
Before executing the refund, the application should compare the proposed action against the approved action.
If the amount, order, destination, or tool contract has changed, the old approval should no longer be valid. This is important because approval is not a general permission slip. It is authorisation for a specific action under specific conditions. The execution layer should also enforce the approval independently. It should not trust the agent to preserve the approved parameters.
What if the tool changes while the workflow is running?
This is a classic time-of-check versus time-of-use problem.
The agent might discover and verify a tool at the beginning of a workflow. Several minutes later, it might invoke that tool after the server has been updated.
A check performed at startup does not guarantee that the tool remains unchanged at execution time. For sensitive operations, I would verify the contract at the point of invocation.
The sequence should look like this:
- Discover the available tool.
- Compare its identity and contract with the approved manifest.
- Authorise the specific action.
- Validate the input against the approved schema.
- Check that the server identity and approved release remain valid.
- Execute the call.
- Validate the response and record the execution evidence.
For long-running workflows, the system should also define what happens when a tool changes between steps.
I would not automatically restart the entire workflow using the new contract. Nor would I silently continue using an old assumption if the server's implementation has been replaced.
Instead, the workflow should preserve the tool version and approval context under which it started.
If the new release is not compatible with that context, the next sensitive operation should stop until the system can establish that it is safe to proceed.
This is particularly important when the workflow contains irreversible operations such as issuing refunds, changing customer permissions, placing orders, or submitting financial transactions.
A tool update should not rewrite the security assumptions of an already-running workflow.
What should happen when verification fails?
I would use explicit states rather than returning a generic tool error.
For example:
| State | Meaning | System behaviour |
|---|---|---|
APPROVED |
Contract matches approved manifest | Continue policy checks |
UNAPPROVED |
Tool has no approved identity | Block invocation |
SCHEMA_CHANGED |
Contract differs from approved version | Quarantine and review |
SERVER_IDENTITY_MISMATCH |
Server identity cannot be verified | Reject connection |
RELEASE_UNVERIFIED |
Implementation provenance is uncertain | Block sensitive actions |
CAPABILITY_DENIED |
Action exceeds granted permission | Reject invocation |
APPROVAL_EXPIRED |
Human approval is no longer valid | Request fresh approval |
MANUAL_REVIEW_REQUIRED |
Change cannot be safely classified | Escalate |
The distinction matters operationally.
A schema change is not necessarily evidence of an attack. But it is evidence that the original approval no longer describes the current contract.
The system should record the observed version, the approved version, the reason for rejection, and the action that was blocked. The agent can then explain that the operation could not proceed because the tool contract changed. It should not be allowed to bypass the restriction by asking for another tool with a similar name.
Build a replay test for tool changes
I would not consider this security control complete until it can be tested automatically.
A useful test suite should contain at least four scenarios.
Scenario 1: An approved tool remains unchanged.
The server identity, tool schema, and approved release match. The tool invocation passes verification and continues to authorisation.
Scenario 2: A new optional parameter appears.
The tool retains its name but now accepts an additional parameter. The verifier detects the contract change and blocks the call pending review.
Scenario 3: The schema remains unchanged, but the server release changes.
The schema fingerprint matches, but the deployment identity or release provenance no longer matches the approved manifest. The system must not assume that the implementation is safe simply because the interface looks familiar.
Scenario 4: A previously approved tool attempts a broader action.
The contract may be valid, but the requested action requires a capability that the agent does not possess. The authorisation layer rejects it.
Here is a simple example using Python:
def test_approved_tool_is_accepted():
verifier = ToolVerifier(approved_manifest)
assert verifier.verify(
"orders-mcp-production",
"get_order_details",
approved_schema
)
def test_changed_schema_is_rejected():
verifier = ToolVerifier(approved_manifest)
try:
verifier. verify(
"orders-mcp-production",
"get_order_details",
modified_schema
)
except ToolTrustError:
return
raise AssertionError(
"Changed tool schema was accepted"
)
These are deliberately small examples. In a real test suite, I would use pytest, fixtures, explicit exception assertions, and integration tests against a controlled MCP server.
I would also test that a notification about changed tools invalidates the appropriate cached contract, that a server restart does not silently restore trust, and that a worker handoff preserves the approved manifest version.
One especially important test is this:
If the same changed tool is presented ten times, does the system consistently reject it until an explicit approval event occurs?
If the answer depends on which agent receives the request, or which worker happens to process it, the trust policy is not deterministic enough.
Tool changes should be auditable events
There is a final engineering detail I would not leave out: the audit trail.
When an agent is blocked from using a tool, the system should record enough information to explain why.
A useful event might contain:
{
"event": "TOOL_CONTRACT_REJECTED",
"server_id": "orders-mcp-production",
"tool_name": "get_order_details",
"approved_fingerprint": "sha256:old-fingerprint",
"observed_fingerprint": "sha256:new-fingerprint",
"approved_version": "1.4.2",
"observed_version": "1.5.0",
"workflow_id": "workflow-7831",
"agent_id": "order-assistant",
"decision": "BLOCKED",
"reason": "APPROVED_CONTRACT_MISMATCH"
}
This makes the decision reproducible.
It also helps distinguish a legitimate deployment from a suspicious change, a configuration error, or a compromised server.
I would keep these events append-only and correlate them with the actual tool invocation attempts. Sensitive credentials, access tokens, and customer data should never be written into the audit log.
The goal is not simply to know that a tool failed.
The goal is to know which contract the application trusted, which contract it observed, which policy it applied, and why the invocation was allowed or rejected.
The architecture I would actually trust
If I were designing this for a production environment, I would separate the responsibilities into four layers.
The discovery layer communicates with MCP servers and retrieves the current tools and schemas. It does not grant permission merely because a tool is discoverable.
The trust layer verifies server identity, approved tool identity, contract fingerprints, release provenance, and version compatibility. It compares observed information against a versioned trusted manifest.
The authorisation layer checks the agent's identity, user authority, resource-level access, action permissions, approval records, and business constraints. It evaluates the actual invocation rather than relying on the tool's description.
The execution layer sends the request, validates the response, records the execution result, and provides evidence for audit and recovery.
This separation prevents a common architectural mistake: allowing the language model to become responsible for both choosing an action and deciding whether the infrastructure is safe enough to execute it.
The agent should be able to propose. The policy layer should decide. The execution layer should enforce. And the audit layer should preserve evidence of what happened.
A practical checklist before deploying an MCP integration
Before I allow an AI agent to use an MCP server in production, I would want clear answers to these questions:
- [ ] Is the MCP server authenticated and bound to an expected identity?
- [ ] Is the approved tool manifest version-controlled?
- [ ] Are tool definitions compared against approved fingerprints?
- [ ] Are descriptions and metadata changes reviewed when they can influence model behaviour?
- [ ] Is implementation provenance verified independently of the schema?
- [ ] Are capabilities enforced outside the language model?
- [ ] Are credentials scoped to the minimum required operations?
- [ ] Are sensitive outputs checked against data-access policies?
- [ ] Are human approvals bound to exact action parameters?
- [ ] Are tool changes detected during long-running workflows?
- [ ] Are changed or unverified tools blocked by default?
- [ ] Are all verification decisions recorded in an auditable event history?
- [ ] Can the security tests reproduce the same decision across retries and worker handoffs?
Not every tool needs the same level of control. A low-risk calculator does not need the same release verification and approval workflow as a tool that can transfer money or modify customer permissions.
But the trust boundary should be explicit in both cases.
The bigger lesson: trust should expire when its assumptions change
I think we have spent a lot of time discussing how an AI agent should decide which tool to call. That is an important problem, but it is only half of the story.
A tool can be selected correctly and still be unsafe to execute.
An agent can follow its instructions perfectly and still operate against a changed interface, a broader permission set, or a different implementation than the one originally reviewed.
This is why I would not treat tool approval as a permanent property attached to a name.
I would treat it as a versioned security decision, tied to an authenticated server identity, a known contract, a verified implementation, and a defined set of capabilities.
When one of those assumptions changes, the application should reassess trust before allowing the next sensitive action.
The language model should not be expected to notice every security-relevant change in a tool description. It should not be asked to determine whether a new parameter is safe. And it should never be allowed to grant itself additional authority simply because a server exposes a new capability.
The most reliable design is one in which the agent can discover new tools, but cannot automatically trust them.
Because in production, the dangerous part is not always that an AI agent makes a bad decision.
Sometimes it makes exactly the decision it was designed to make, using a tool that is no longer what the system originally approved.
The tool's name stayed the same. The trust assumptions did not.
Top comments (50)
The get_order_details example is the sharpest part — same name, a new include_internal_notes parameter defaulting to true, and nothing in the original approval covers it. I'd push one step further: even a perfect schema fingerprint doesn't catch the case where the schema stays identical and the implementation quietly starts returning the customer profile anyway, which your own section admits. Do you think the practical answer is output filtering at the gateway, or is that just moving the trust problem one layer out?
I think output filtering at the gateway is necessary, but it shouldn't become the only line of defence. You're right that an unchanged schema doesn't guarantee unchanged implementation behaviour. A tool could start returning additional sensitive fields without any contract-level change. I'd use the gateway to enforce a deterministic response-field allowlist based on the approved operation and caller permissions, rather than trusting whatever the backend returns. But I'd combine that with server-side authorisation and resource-level access controls. The gateway limits what reaches the agent; the backend must still enforce what the tool is allowed to access. Ultimately, we're not eliminating trust; we're distributing enforcement across independent boundaries so that one compromised layer doesn't expose everything.
That's the right framing — you're not eliminating trust, you're distributing enforcement so no single layer failing exposes everything. The gateway allowlist catches exactly the silent-extra-fields case, and the backend auth catches the tool that was over-permissioned from the start. How do you keep the allowlist in sync with approved operations as they change?
I'd keep the allowlist versioned alongside the approved operation manifest rather than maintaining it as a separate configuration. Every approved operation should define its permitted input parameters, response fields and access scope. When the contract changes, the policy and allowlist should be reviewed and released together as one versioned unit. At runtime, the gateway checks that the operation's manifest version matches the policy version before filtering the response. If they drift, execution should pause rather than fall back to a broader default. This keeps the approval, permissions and actual data exposure tied to the same contract.
Pausing on drift instead of falling back to a broader default is the move that makes the whole scheme fail-closed — a version mismatch becomes a stop, not a silent widening. Tying the approval, the permissions and the actual data exposure to one versioned unit also kills the usual drift where the policy says one thing and the gateway enforces another. When execution pauses, does that surface to an operator, or does the agent just stall waiting?
I'd make it an explicit, auditable state rather than letting the agent simply stall. The operator should receive a clear alert explaining which version changed, what validation failed and why execution was paused. The agent can receive a controlled response such as
CONTRACT_VERSION_MISMATCH, but it shouldn't be allowed to bypass the check or retry with broader permissions. Once the change is reviewed and approved, execution can resume against the updated contract. The important thing is that uncertainty becomes visible to both the system and the people responsible for it.That's a stronger answer than either option I offered — making the mismatch an explicit, auditable state instead of a silent stall or a quiet retry. The part I'd underline is the no-bypass rule: once the agent can route around a failed check, the contract isn't a gate anymore. In your setup, does the operator review happen in the loop before execution resumes, or is it an async queue the agent waits on?
I'd favour an asynchronous review queue, with execution remaining paused until an authorised operator explicitly resolves the issue. This avoids blocking the entire system while ensuring the agent cannot bypass the decision. The review should capture the mismatch, the affected contract version and the reason for approval or rejection. Once cleared, the orchestrator can resume execution against the newly approved version. Importantly, the agent should only receive the outcome, not control over the review process. Human oversight should remain an independent authority, not another tool the agent can invoke to approve itself.
The last point is the one that matters most — oversight stops being oversight the moment the agent can invoke its own approval. An async queue with execution paused is the right shape, but it raises a practical question: who counts as the authorised operator here, and does the queue distinguish roles, or is any human with access enough to clear it?
I'd make authorization role-based rather than treating every human with system access as an authorised operator. The person clearing a routine contract mismatch may not need the same privileges as someone approving expanded data access or a financial operation. I'd define permissions based on the risk and impact of the requested change, with stronger approval requirements for sensitive actions, potentially including a second reviewer. Every decision should also be recorded with the operator's identity, role, rationale and timestamp. Human involvement alone doesn't guarantee oversight; the right person needs the right authority, and that authority must be independently verifiable.
Role-based is the right correction — my question was too flat about who counts as authorised. Risk-tiered approval with a second reviewer for the sensitive tier is the shape that actually holds up. The part I'd push on: does the audit record capture the role the operator held at decision time, or just their identity? A role change after the fact shouldn't rewrite what the approval meant.
That's an important detail. I'd capture both the operator's identity and their role, including the specific permissions and authorisation scope they held at the time of approval. Ideally, the audit record would also preserve the relevant policy version and approval timestamp. These details should be immutable, so a later role change cannot retroactively alter the meaning or validity of an earlier decision. An audit should explain not just who approved an action, but whether they were authorised to approve it at that exact moment. Otherwise, accountability becomes difficult to establish when something goes wrong.
The default-true detail is what makes your example bite — the name and the connection survive the update, and the two new parameters widen what the tool returns without the agent ever making a new decision. Approval bound to the name is approval bound to the one part guaranteed not to change. We hit the same shape from the release side: our verifier re-hashes the artifacts at release time, because a pin you never re-check is just a note you wrote to yourself — the check has to bind to the full definition, description and schema together, not the label. Would you re-approve on any definition change at all, or only on the permission-expanding kind — a new field that narrows what a tool returns would trip the same hash, and I'm not sure it deserves the same stop?
I wouldn't treat every definition change as equally risky. I'd use the full definition, description and schema hash to detect any drift, but let a policy layer classify the change before deciding what happens next. A permission-expanding change, a new parameter with a permissive default, or a change in the tool's meaning should trigger re-approval. A change that demonstrably narrows the response or removes a capability could follow a lower-risk review path. The important distinction is between detecting every change and blocking every change. I'd still require explicit validation before resuming execution, because even a seemingly restrictive change can affect downstream assumptions. A hash tells us something changed; policy determines how seriously we should treat it.
The detect-everything / block-selectively split is the part I'd underline — a hash that only fires the alarm and a policy that decides the response are two different jobs, and merging them is how you end up either re-approving typo fixes or waving through a widened default. We learned the same separation on our release gate: the verifier detects any surface mismatch deterministically, but what happens next — wait, re-baseline, or stop — is a classification we wrote down in advance, not a judgment made in the moment. Your point that even a narrowing change needs validation before resuming is the one people will skip, and it's right: downstream code was written against the wider response, so "less data" is still a broken contract. One question on the classifier itself: is yours a deterministic ruleset over the diff (new parameter, default value, removed field), or does a reviewer make the call case by case?
I'd favour a deterministic ruleset for the initial classification, with human review reserved for ambiguous or high-impact changes. For example, new parameters, permissive defaults, expanded response fields, and changes to required permissions should trigger a higher-risk state. Removed fields, narrowed outputs, or description-only changes could enter a compatibility review path rather than automatically blocking everything. But I'd avoid letting the classifier make subjective security decisions. Its job should be to apply predefined rules consistently and explain which part of the contract changed. If a change doesn't fit a known category, it should fail closed and require review. That gives us predictable enforcement without pretending every change can be safely understood through a simple diff.
The deterministic-ruleset answer is the one I'd trust too — a classifier that explains which part of the contract changed is auditable in a way a case-by-case judgment never is. Our release gate works the same way: every check is a predefined rule tied to a failure it has actually seen, and anything the checks can't classify doesn't pass quietly — it stops the line as "could not verify" until a person looks. When a change lands that fits none of your categories and fails closed, does the review that clears it also produce a new rule for next time, or does it stay a one-off approval?
I'd prefer the review to produce a reusable rule whenever the change reveals a new risk pattern. A one-off approval may resolve the immediate issue, but it doesn't improve the system's ability to recognise the same situation next time. I'd record the change, the reason for the decision and the evidence used during review, then update the classification rules and add a regression test. Not every exception needs to become a permanent rule, though. Some changes are genuinely context-specific. The important thing is to make that distinction explicit, so the system learns from recurring risks without turning every individual approval into a blanket permission.
The explicit-distinction part is what makes that work — a one-off that isn't marked as one-off will be cited as precedent by the next person (or the next agent run) who wants the same exception. Our release gate grew the same way from the other direction: checks were only added after a demonstrated failure, and each one carries the failure it came from, so a check that can't point to its originating incident is itself suspect. A review record with change, reason, and evidence is that same trace, written at approval time instead of after a break. Who makes the context-specific-vs-pattern call in your setup — the reviewer who approved the change, or does it take a second occurrence before it can be promoted to a rule?
I'd let the reviewer flag a change as context-specific or potentially reusable, but I wouldn't let a single approval automatically become a permanent rule. Promoting it should require a separate policy review, supported by evidence that the risk is repeatable and the rule won't introduce unintended restrictions. A second occurrence can strengthen that case, but I wouldn't make it an absolute requirement if the first incident exposes a serious security gap. I'd also preserve the originating incident, rationale and regression test with every new rule. That way, exceptions don't quietly become precedents, and every permanent control has a traceable reason for existing.
Great breakdown of the
get_order_detailssilent schema expansion trap — especially howdefault: trueon newly added fields quietly widens data exposure even when the agent's call-site behavior hasn't changed. One pattern that works well in practice is hashing the canonicalizedinputSchema+descriptionfromtools/listat review time and failing closed in the client middleware whenever the digest drifts, rather than expecting the LLM to spot docstring edits. Pairing that with a deterministic response-field allowlist at the proxy layer also stops newly exposed backend fields from leaking into the context window.Absolutely. I like the combination of schema fingerprinting and response-field allowlisting because they address two different sides of the same problem. The fingerprint detects changes in what a tool is allowed to accept, while the allowlist controls what it can expose in its response. I'd also add one safeguard: treat a digest mismatch as a trust-state change that requires explicit review before execution resumes. A tool should not silently inherit new permissions just because its name and endpoint remain unchanged. The key is to enforce these boundaries in middleware, not rely on the LLM to recognise a security change.
Spot on — treating a schema digest mismatch as a hard circuit breaker in middleware rather than letting the model reason around a mutated tool definition is the cleanest way to stop silent privilege creep.
Exactly. Security boundaries should never depend on the model recognising that something has changed. The middleware needs to enforce the approved contract deterministically, regardless of how the model interprets the updated tool definition. I'd rather pause execution and require validation than risk silently granting an agent capabilities that were never part of the original approval. Trust should be enforced by the system, not assumed from the model's behaviour.
That split between deterministic middleware checks and model-level reasoning is the whole game. One practical snag we run into is handling legitimate updates, like a vendor adding a benign optional field, without creating alert fatigue where reviewers just click approve. Pairing a pinned schema digest with a tiny field-level diff in the pause prompt keeps the circuit breaker strict without making upgrades painful.
Absolutely. A field-level diff makes the review actionable rather than forcing someone to inspect the entire schema every time. I'd also have the middleware classify changes into predefined risk categories, such as optional additions, permission-expanding parameters, removed fields and changed defaults. Low-risk changes could go through automated compatibility checks, while anything affecting permissions or data exposure would require explicit approval. The circuit breaker should remain strict, but the review process should be intelligent enough to distinguish routine evolution from a genuine security change. Otherwise, alert fatigue eventually undermines the very control we're trying to enforce.
Your three questions are the right split, but the schema hash only catches the case where the schema changes. The drift that keeps biting us is the description changing what the model does while the schema stays byte-identical — same name, same params, different prose, different calls. A hash wouldn't have caught that one. What caught it for us was reading the result back against the record itself instead of trusting the tool's own report. Do you check the description text too, or just the schema?
That's an important distinction, and I agree that schema-only validation leaves a gap. I'd fingerprint both the canonicalised input schema and the description, since the description can influence how the model interprets and invokes a tool even when its parameters remain unchanged. I'd also compare the actual execution result against the approved response contract rather than relying on the tool's own claims about what it returned. The schema tells us what a tool accepts, the description influences how it's used, and response validation tells us what actually came back. All three need independent checks.
The description fingerprint is the bit I hadn't got to. I was hashing the schema and reading the result back against the record, which catches the drift after the fact but not the description changing underneath. Do you fold the description into the same hash as the schema, or keep it separate so a prose change fails differently from a param change?
I'd keep them as separate fingerprints, but bind both to the same approved manifest version. That gives us better visibility into what actually changed. A schema mismatch can indicate a change in accepted inputs or permissions, while a description mismatch may change how the model interprets or invokes the tool. They deserve different risk classifications and potentially different review paths. If we combine everything into one hash, we detect drift but lose some useful diagnostic detail. The important part is that neither mismatch should silently bypass validation before execution.
The point that landed for me is that approval is usually treated as a one-time event, while the thing approved keeps changing underneath it. A tool called get_order_details that quietly starts returning more customer fields is still "the same tool" to the model, which is exactly why the thread keeps arriving at the same answer: the check has to live in middleware that compares a fingerprint, not in the model noticing something feels different.
We learned a smaller version of this at Ascendra Ventures while building memory for AI coding tools. One handwritten parser read every field one column off, and the numbers it reported were confidently and uniformly wrong. Nothing about them looked suspicious. The lesson we took was that the real design question is the boundary: which values the model may propose, and which values plain code must be allowed to reject. OWASP's 2025 guidance to check outputs in deterministic code says the same thing.
How do you plan to handle the benign case, say a vendor adding an optional field, without turning every schema change into a manual review?
That's a great example, especially the parser issue. Uniformly wrong data is often more dangerous than an obvious failure because it can pass through multiple layers without raising suspicion. For benign schema changes, I'd use deterministic compatibility rules rather than sending every update for manual approval. An optional field could be accepted automatically only if it doesn't expand permissions, expose additional sensitive data or change existing field semantics. The fingerprint would still detect the change, but the policy layer could classify it as low risk and validate it against the approved contract. Anything ambiguous or permission-expanding would pause for review. The goal is to make routine evolution frictionless without allowing compatibility to become a loophole for privilege expansion.
The get_order_details example hit home for me, because in my daily marketing work I have had an agent keep running smoothly while a connected tool quietly started returning extra customer fields I never approved. I now treat a tool approval as tied to a specific version and set of fields, not just a name, and I pause the workflow for a quick review when anything in that contract changes. Your split between a contract fingerprint and a capability fingerprint is the part I will borrow first, since it lets me allow harmless wording changes without letting a new data field slip through unnoticed.
That's a great practical example, especially because the workflow can appear perfectly healthy while the actual data exposure has changed underneath it. I like your approach of tying approval to a specific version and set of fields. The distinction between contract and capability fingerprints helps avoid treating every documentation update as a security incident while still catching meaningful permission changes. I'd also recommend keeping a strict response-field allowlist at the gateway, so even if an unexpected field appears upstream, it never reaches the agent's context. Ultimately, the goal is to let tools evolve without allowing their permissions or data exposure to expand silently.
Thanks, Atul — the allowlist at the gateway is the piece I was missing, honestly. Right now my check happens after the agent has already received the response, so extra fields technically reach the model before anything can block them. Moving the filter to the gateway closes that gap. Do you enforce the allowlist per tool or per workflow? I have a couple of workflows where the same tool legitimately returns different field sets depending on the step.
I'd favour a combination, with the workflow step defining the approved field set and the tool providing the baseline contract. A tool-level allowlist alone can be too restrictive when the same tool serves different purposes, while a workflow-only policy can become too broad. I'd bind the allowed fields to the specific tool, workflow step and caller permissions. The gateway can then enforce the appropriate response shape before anything reaches the agent. I'd also make sure the workflow cannot request additional fields simply by changing its own context. Any expansion should go through policy validation and explicit approval. This gives you flexibility without sacrificing least-privilege enforcement.
This is an interesting model. In relation to the example given of description changes – would even a minor change need to be re-approved?
Is there not a risk of excessive re-approval processes if servers regularly update their documentation?
That's a fair concern. I wouldn't require full re-approval for every minor documentation change. I'd distinguish between cosmetic edits and changes that affect the tool's meaning, intended use, permissions or expected behaviour. A typo correction shouldn't trigger the same process as a description change that alters how an agent interprets a tool's capabilities. The fingerprint should detect all changes, but a predefined policy should classify their risk. Low-risk changes can go through lightweight validation, while security-relevant or behaviour-changing updates require explicit review. The goal is to prevent silent permission expansion without turning routine maintenance into an approval bottleneck.
The one-time approval is the part that scares me most, and you named it exactly right: we treat tool approval like config, when it behaves like a session — it should expire.
What we landed on after running agents unsupervised overnight: pin the tool's schema the way you pin a dependency version. Hash the schema and the tool description at approval time. If either changes, the tool silently drops back to read-only until a human re-approves it. The agent keeps working, nobody gets paged, but the newly-powerful version of the tool never gets used on yesterday's trust.
A tool that can grow new parameters should have to re-introduce itself.
I really like the idea of treating tool approval as something that expires rather than a permanent permission. Pinning the schema and description creates a clear trust boundary, and falling back to read-only is a practical way to preserve availability without silently accepting new capabilities. I'd add one distinction: even read-only access should remain subject to response-field filtering, because a tool can expose more sensitive data without gaining write permissions. Your point that a tool should have to re-introduce itself when its contract changes is particularly important. Trust should follow the verified version, not the familiar name.
The ₹25,000 → ₹75,000 refund example is the one that made it click for me — everything else here is the tool changing, but that one's the agent changing the action after a human already said yes. That's the scarier shape, because the approval looks valid right up until you compare the payload. Who holds the approval record in your setup — the same process that executes, or somewhere the agent can't reach to mint its own?
That's exactly why I'd separate approval authority from execution authority. The approval record should live in a trusted orchestration or authorization service, outside the agent's control. The agent can request approval, but it should never be able to create, modify or reuse an approval record. I'd bind the approval to the exact action payload, including the amount, recipient, operation ID and expiry. At execution time, the orchestrator verifies that the requested action matches the approved payload exactly. If ₹25,000 changes to ₹75,000, the approval is invalid and a new human decision is required. The component executing the action should verify approval, not manufacture it.
One race to account for: the contract can change between discovery and execution. I'd bind each approved call to the manifest version the policy layer checked, then reject it if that version changes before dispatch. That still won't detect a server changing behavior behind an unchanged schema, so the server-side permissions remain essential.
Exactly. This is where the time-of-check-to-time-of-use gap becomes important. Binding the approval to the exact manifest version ensures the agent executes against the contract that was actually reviewed, not whatever happens to be available at dispatch time. I'd also keep server-side authorization as the final enforcement boundary, because a stable schema doesn't guarantee stable behaviour. Client-side validation protects the approved contract; server-side permissions protect the actual operation. Both are necessary for meaningful security.