Practical thinking about AI tools and everyday work.

An AI tool call needs validated arguments before it changes a record

A developer reviewing a generic structured-data panel beside a test-record screen, no readable code or personal information.
AI-generated photographic illustration; not documentary photography.

An assistant produces a tidy tool call: a record identifier, a field name and a new value. The JSON parses, the schema accepts it, and the requested change sounds plausible. None of those checks establishes that the signed-in person is allowed to change that particular record.

The OWASP guidance on excessive agency describes risks created when language-model applications receive excessive functionality, permissions or autonomy. A tool boundary is an application security boundary, even when the request arrives as polished conversational text.

Keep authorisation in trusted application code

Consider a fictional assistant that updates a customer’s delivery instructions. A well-formed record ID could still belong to another customer. The server must establish the user’s identity and permitted scope, retrieve the record within that scope, and check which fields may change. The model’s assertion that the user has permission is not a substitute.

Schema validation remains useful: reject unexpected fields, inappropriate types and out-of-range values. Then apply business rules and authorisation separately. For instance, an address-note tool should not gain the ability to change account ownership simply because both operations update a database row.

Make the consequence visible before it happens

For a consequential action, show the target and proposed change in language the user can verify. A confirmation that merely says “continue” provides less protection than a preview naming the correct record and affected fields. The application should bind the approved preview to the eventual action rather than silently executing a different proposal.

Test the boundary with synthetic records: an allowed update, another user’s identifier, an unexpected field, a repeated request and a record changed by someone else after the preview. Keep the tests away from live customer data until the application’s own validation process permits deployment.

Log the decision and outcome without unnecessarily recording secrets or private content. When a call fails, report the actual failure rather than letting the assistant claim success. The goal is a narrow, inspectable operation whose permissions remain enforced even when the model misunderstands the conversation.