Skip to main content
Glama
Mipiti
by Mipiti

Lift Composition Entity

lift_composition_entity

Merge two sibling descendant entities into their lowest common ancestor, resolving field conflicts and updating all three affected models in one step.

Instructions

Promote a shared-anchor entity from two sibling descendants to their lowest common ancestor. Mutates state across THREE models.

The operator has confirmed (via the composition lift-candidate view) that the entity local_id_a on descendant_a_id and the entity local_id_b on descendant_b_id are the same logical thing and should be modeled once on the LCA. The route's model_id is the operator's current context model — typically the LCA, but the server accepts any ancestor of both descendants.

Conflict resolution. The server re-detects field-level and attached-state conflicts against current live state before applying. If new conflicts have surfaced since the operator's last candidate fetch, the call returns 400 with the missing conflict keys; refresh the lift-candidate view and resubmit with resolutions covering every key. Each entry in field_resolutions / attached_state_resolutions is "keep_a" | "keep_b" | "keep_both" (union for list/set fields; falls back to B for scalars).

Over-application gate. The lift extends visibility to every descendant of the LCA, not just the two source descendants. The server runs an over-application gate that refuses lifts touching descendants outside an acknowledged set; pass acknowledged_third_party_subtrees to acknowledge specific subtrees, or skip_overapplication_gate=True to override entirely after explicit operator confirmation.

Each affected model (LCA + both descendants) bumps version and emits a model_refined activity event; a structured lift_applied event with the full lift_event payload lands on the LCA. The audit pack surfaces this under lift_history. Reverse it with undo_composition_event(event_type="lift"), which previews unless dry_run=False; the inverse operation is split_composition_entity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesEntity kind — one of ``"assets"``, ``"attackers"``, ``"components"``.
model_idYesOperator's context model — the model whose composition view surfaced the candidate. Treated as a route anchor only; doesn't have to be the LCA.
local_id_aYesLocal id of the entity on ``descendant_a_id``.
local_id_bYesLocal id of the entity on ``descendant_b_id``.
lca_model_idYesTarget ancestor model id (the LCA, or any ancestor higher up the chain).
server_versionYes
descendant_a_idYesFirst source descendant model id.
descendant_b_idYesSecond source descendant model id.
field_resolutionsNoOptional per-field resolution map (e.g. ``{"description": "keep_both", "tags": "keep_a"}``).
lca_descendant_idsNoOptional snapshot of the LCA's descendant set used by the over-application gate. Omit to let the server compute it via BFS.
skip_overapplication_gateNoWhen True, bypass the gate after explicit operator confirmation. Default False.
attached_state_resolutionsNoOptional per-state-key resolution map (e.g. ``{"state:assertions/AS3": "keep_b"}``).
acknowledged_third_party_subtreesNoOptional list of subtree roots the operator has acknowledged as in-scope for the lift.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.66.0
    • changedInput schema / properties / acknowledged_third_party_subtrees / description
      Previous value: -"Optional list of subtree\nroots the operator has acknowledged as in-scope for the\nlift."New value: +"Optional list of subtree roots\nthe operator has acknowledged as in-scope for the lift."
    • changedInput schema / properties / attached_state_resolutions / description
      Previous value: -"Optional per-state-key resolution\nmap (e.g. ``{\"state:assertions/AS3\": \"keep_b\"}``)."New value: +"Optional per-state-key resolution map\n(e.g. ``{\"state:assertions/AS3\": \"keep_b\"}``)."
    • changedInput schema / properties / lca_descendant_ids / description
      Previous value: -"Optional snapshot of the LCA's descendant\nset used by the over-application gate. Omit to let the\nserver compute it via BFS."New value: +"Optional snapshot of the LCA's descendant set\nused by the over-application gate. Omit to let the server\ncompute it via BFS."
    • changedInput schema / properties / lca_model_id / description
      Previous value: -"Target ancestor model id (the LCA, or any\nancestor higher up the chain)."New value: +"Target ancestor model id (the LCA, or any ancestor\nhigher up the chain)."
  2. First observedv0.57.0

TDQS

A4.9/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 burden and delivers: it mutates state across THREE models, re-detects conflicts against live state and can return 400 with missing conflict keys, runs an over-application gate affecting descendants beyond the two sources, bumps versions, emits model_refined/lift_applied events, and is reversible via undo_composition_event (preview unless dry_run=False). These are precisely the behavioral traits an agent needs before invoking a destructive lift.

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?

It is long (roughly four dense paragraphs), but it is front-loaded with the purpose and each subsequent paragraph covers a distinct concern (conflict resolution, over-application gate, side effects/undo), so nearly every sentence earns its place. Minor tightening of the conflict-resolution prose would help.

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 13-parameter destructive composition tool with no annotations, the description covers preconditions, failure modes, gate overrides, side effects, audit trail, and reversal. An output schema exists, so return values need not be explained, and nothing an agent needs to call this safely appears to be missing.

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

Parameters5/5

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

Schema coverage is 92%, which sets a baseline of 3, but the description adds meaning the schema lacks: the allowed resolution values 'keep_a' | 'keep_b' | 'keep_both' (schema declares zero enums), the semantics of keep_both as a union for list/set fields with a fallback to B for scalars, the distinction between route model_id and the true LCA, and the purpose of acknowledged_third_party_subtrees versus skip_overapplication_gate. That is substantive value beyond structured fields.

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 opening sentence states a specific verb+resource+scope: 'Promote a shared-anchor entity from two sibling descendants to their lowest common ancestor.' It also names the inverse sibling (split_composition_entity) and the reversal path (undo_composition_event), so an agent can distinguish it from related composition tools without opening a 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?

It states the precondition (operator has confirmed via the lift-candidate view that the two entities are the same logical thing), the retry condition when new conflicts surface (refresh the candidate view and resubmit), and the explicit alternatives (skip_overapplication_gate vs acknowledged_third_party_subtrees; split_composition_entity as inverse). This is close to a full when/when-not/alternatives statement.

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