MCPDocumentation
On this page

Two-phase writes

No Autonex tool changes or deletes existing data in a single call. Changes work like the panel's "Confirm" button:

  1. Preview. A tool whose name ends in _preview checks the data and your permissions, works out what would change and returns:

    • summary: the change in one sentence;
    • effects: the detail (people, classes, dates affected…);
    • confirm_token: a code that applies exactly that change;
    • expires_at: how long the code is valid.

    Nothing changes in this step.

  2. Confirmation. If the person agrees, call confirm_action with the confirm_token. The change is then applied and the result returned.

The two exceptions: adding information

create_incident (create an incident) and add_incident_note (add a note) only add information and apply in a single call, as the organization's AI agent does during a conversation. They change nothing that exists, except that an incident waiting for the customer goes back to "pending" when the agent adds what the customer says. They count as writes in the quota. Set your client to ask for approval on them too.

confirm_token rules

  • Single use. A second attempt returns CONFIRM_USED.
  • 15 minutes. After that it returns CONFIRM_EXPIRED: ask for the preview again, since the data may have changed.
  • Bound to the key. It only works for the key (or session) that requested the preview. Any other gets CONFIRM_INVALID.
  • Permissions checked again. On confirmation, the key's and the person's permissions are checked again.

What gets recorded

The change leaves in Autonex the same activity as if a person had done it in the panel. The author is the key's owner or, for service keys, "API: key name". The call is also written to the MCP audit log.

Good practice for assistants

  • Always show summary and the key points of effects to the person, and wait for an explicit "yes" before calling confirm_action.
  • Don't chain preview and confirmation automatically, except in processes approved for it (for example, an n8n workflow with a human approval step in between).
  • A confirmation counts as a write in your quota (also when it fails, for example with an expired token); the preview counts as a read.