Skip to main content
Glama
Mipiti
by Mipiti

Undo Composition Event

undo_composition_event

Undo a previous lift or split composition event by applying inverse state across all affected threat models. Detects divergent changes first and refuses with a structured 409 when the entity has evolved.

Instructions

Apply the inverse of a previous composition event. Mutating — persists inverse state across multiple models.

Re-runs the divergence detector immediately before applying and refuses with 409 + the structured refusal block when state has materially evolved since the forward event (assertions submitted on the affected entity, downstream COs added that reference it, the entity edited, etc.). On success, persists the inverse state operations across every affected model and emits a structured lift_undone / split_undone activity event citing original_event_id so the audit pack can chain undo to its forward.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_idYesEither the surrogate id of the forward ``lift_applied`` / ``split_applied`` activity event, or the structured ``lift_id`` / ``split_id`` carried in the event payload.
model_idYesThe model whose composition view originated the event. Must match the cited event's ``threat_model_id`` — the server rejects cross-model citations with 404.
event_typeYesWhich forward composition event to undo. One of: - ``"lift"``: undo a ``lift_applied`` event. On success, persists the inverse across the LCA + every affected source descendant and emits a ``lift_undone`` event. The returned ``models`` block carries ``lca_model`` and ``source_descendant_models``. - ``"split"``: undo a ``split_applied`` event. On success, restores the ancestor's entity, tombstones the duplicated copies on every target descendant, persists across all affected models, and emits a ``split_undone`` event. The returned ``models`` block carries ``ancestor_model`` and ``descendant_models``.
server_versionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.68.2

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and meets it: it declares mutation, multi-model persistence, the divergence detector re-run, the 409 structured refusal, and the emitted lift_undone/split_undone audit event. This is much richer than generic 'undo' language.

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?

The purpose and mutation flag are front-loaded, and the dense third sentence earns its place by explaining refusal and audit behavior. It is not a 5 because of slight redundancy between 'persists inverse state across multiple models' and the later 'persists the inverse state operations across every affected model.'

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

Completeness4/5

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

With an output schema present, the description does not need to explain return shape; it covers side effects, failure mode, and audit trail well. The only notable gaps are the undocumented server_version parameter and the absence of explicit guidance toward preview_undo_composition.

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

Parameters3/5

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

The schema already documents event_id, model_id, and event_type with strong detail, covering 75% of parameters. The description reinforces those semantics but adds no new parameter-level meaning, while server_version remains unexplained in both the schema and the description.

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?

The description uses a specific verb ('Apply the inverse') and names the resource ('previous composition event'), then sharpens scope by naming lift/split and their undone events. It clearly identifies itself as the inverse operation to the composition tools.

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

Usage Guidelines3/5

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

Usage context is implied: call this after a forward lift or split event, and expect refusal if state has materially evolved. It does not explicitly compare with preview_undo_composition or state when not to call, so routing among siblings is left to inference.

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

Deploy Server

Other Tools