Skip to main content
Glama
Mipiti
by Mipiti

undo_composition_event

Reverse a previous lift or split composition event on threat models, persisting inverse state and emitting audit events. Refuses with 409 if the model state has changed since the forward event.

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

Behavior4/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does an excellent job: it explicitly states the tool is 'Mutating — persists inverse state across multiple models', describes the re-run of the divergence detector, the 409 refusal with structured refusal block, the success behavior (persists inverse state, emits structured activity events), and the audit chaining via original_event_id. This is rich behavioral context beyond what any schema could provide. The only minor gap is not describing the exact structure of the refusal block or the output schema, but the output schema exists and the description covers the key behaviors.

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 description is well-structured and front-loaded: the first sentence states the core purpose, the second sentence covers the refusal behavior, and the third covers success behavior. It's dense but not bloated — every sentence adds value. It uses structured terms (409, lift_undone, split_undone, original_event_id) that are precise. It could be slightly more concise by trimming some parenthetical examples, but overall it's efficient and well-organized.

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?

Given the tool's complexity (a mutating undo operation with divergence detection, multi-model persistence, and structured events), the description is remarkably complete. It covers the preconditions (divergence check), the failure mode (409 with refusal block), the success behavior (persists inverse, emits events), and the audit trail (original_event_id chaining). The output schema exists, so return values don't need to be described in the description. The parameter semantics are well-covered in the schema and description. This is a complete picture for an agent to invoke the tool correctly.

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 description coverage is 75% (3 of 4 parameters have descriptions). The description adds significant meaning beyond the schema: it explains the event_type parameter in detail (what 'lift' and 'split' do, what the returned models block carries for each), and clarifies that model_id must match the cited event's threat_model_id or the server rejects with 404. The event_id parameter is also explained in the schema, but the description reinforces its dual nature (surrogate id or structured id). The only parameter without a description is server_version, which is likely self-explanatory. The description compensates well for the 25% gap.

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 clearly states the tool's purpose: 'Apply the inverse of a previous composition event' — a specific verb ('apply') and resource ('composition event'). It distinguishes itself from siblings like lift_composition_entity and split_composition_entity by explicitly mentioning 'inverse' and 'undo', and it references the forward events (lift_applied/split_applied) that it reverses. This is a precise, non-tautological statement that differentiates it from the many sibling tools.

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?

The description provides explicit usage context: it explains when to use this tool (to undo a previous composition event) and when it will refuse (when state has 'materially evolved' since the forward event, listing specific conditions like assertions submitted, downstream COs added, entity edited). It also names the alternative tools (lift_composition_entity and split_composition_entity) implicitly by referencing their events, and the sibling list includes preview_undo_composition, which suggests a preview-then-undo workflow. This is strong guidance on when and when-not to use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mipiti/mipiti-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server