Revised:
1. Authorization model
The server is an OAuth 2.1 resource: authorization code flow with mandatory PKCE (S256), dynamic client registration for assistants, access and refresh tokens, and a revocation endpoint. The discovery documents are published at the standard well-known addresses of the same host.
2. Scopes and roles
Four read scopes exist: catalog.read, inventory.read, orders.read and account.read, and two write scopes: catalog.write and inventory.write. Write scopes are granted only to owners and administrators. A tool is visible to an assistant only if the granted scope and your role allow it, so a warehouse user never sees data an owner would.
3. Tenant isolation
Every call runs as the signed-in user inside exactly one company. The same permission, validation and isolation code as the web application is used; there is no separate data path for assistants.
4. Changes only with preview and confirmation
Write tools first return a preview of old and new values and save only when called again with confirm=true and the current product version, so a stale or accidental call cannot overwrite newer data. One call changes one product, nothing can be deleted, and WareRushAI can switch all assistant changes off platform-wide at any time.
5. Audit and revocation
Every tool call is logged with the tool name, outcome and duration. You can revoke an assistant at any time, and revoked tokens stop working.
6. Data minimisation
Tools return short summaries and only the fields an assistant needs; details are fetched on request. Where data is processed by the assistant provider, that provider terms and privacy policy apply.
