Skip to main content
Glama

Reverse CRM Write

reverse_audit_event
Destructive

Undo one recorded CRM write, restoring every field to the value it held before. Runs as a background task, so the row's status moves when it finishes. It is refused unless the event is the NEWEST un-reversed one OF ITS RUN (events are grouped by caller_request_id, not by which tool wrote them) -- reversing an older write first would restore values a newer one still holds. Find the id with list_audit_events, whose reversible flag applies this same rule, so an entry marked reversible is one this tool will accept. A field someone changed since the write is a conflict, found before anything is written; on_conflict decides.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "audit_event_id": "<audit_event_id>",
      "connection_id": "<connection_id>"
    },
    "name": "reverse_audit_event"
  }
}

Input Schema

NameRequiredDescriptionDefault
on_conflictNoWhat to do with fields someone changed since the write. Leave it out to use the connection's undo rules (abort: write nothing). skip restores the rest; overwrite restores those fields too, over the later change -- use only when asked to.
connection_idYesThe CRM connection. Call list_crm_connections first.
audit_event_idYesThe audit event to reverse. Call list_audit_events first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / on_conflict
      Added value: +{
      +  "description": "What to do with fields someone changed since the write. Leave it out to use the connection's undo rules (abort: write nothing). skip restores the rest; overwrite restores those fields too, over the later change -- use only when asked to.",
      +  "enum": [
      +    "abort",
      +    "skip",
      +    "overwrite"
      +  ],
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructive/openWorld/not-readOnly, but the description adds substantive behavior: asynchronous background execution with a status transition, the run-scoped refusal rule keyed on caller_request_id, and pre-write conflict detection. It stops short of saying what the status values are or whether a reversal itself can be undone, which keeps it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and every sentence carries information, but the long em-dash and parenthetical construction around the run-grouping rule takes effort to parse. Slightly dense phrasing rather than wasted content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, asynchronous mutation with three fully described parameters and no output schema, the description covers what is restored, how execution proceeds, the precondition for acceptance, and how conflicts are handled. Nothing an agent needs in order to call it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so 3 is the baseline, but the description adds real meaning: it explains how to obtain a valid audit_event_id (via list_audit_events' `reversible` flag) and defines what counts as a conflict for on_conflict. connection_id receives no added context beyond the schema's own hint.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Undo one recorded CRM write, restoring every field to the value it held before') and scopes it to a single event, which separates it from siblings like preview_plan_reversal and the create_*_run tools. An agent can identify the operation without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit prerequisites (find the id with list_audit_events, whose `reversible` flag encodes the same rule) and an explicit exclusion (refused unless the event is the newest un-reversed one of its run). It also constrains on_conflict=overwrite with 'use only when asked to', so both when-to-use and when-not-to-use are covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.