Skip to main content
Glama
Mipiti
by Mipiti

Restore Entity

restore_entity

Restore a soft-deleted entity—asset, attacker, component, trust boundary, or assumption—in a threat model to reverse a prior removal and create a new version.

Instructions

Un-soft-delete a single entity of any core type, reversing a prior remove_entity. Mutating: creates a new model version. Only affects an entity that is currently soft-deleted.

Dispatches on entity_type. Per-type effect:

  • asset — revives the asset's tombstoned (asset × attacker) COs with their original IDs, un-orphaning any linked controls.

  • attacker — reinstates the attacker under its original ID, revives the COs tombstoned when it was removed, and un-orphans any controls that were anchored to it.

  • component — reinstates the component under its original ID, restoring its trust-boundary contribution to asset reachability.

  • trust_boundary — reinstates the boundary: the reachability it filtered re-narrows and its sealed/isolation claim is restored, so CO reachability verdicts past it can flip back toward unreachable.

  • assumption — returns the assumption to active status; controls whose assumption_groups referenced it keep their group structure intact. Its CO links are not restored (set them again with edit_assumption), and re-attestation is required before it counts anywhere it is linked or grouped.

Returns the entity-change result: {"model": <ThreatModel>, "controls_carried", "controls_orphaned", "orphaned_control_ids", ...}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_idYesID of the threat model.
entity_idYesID of the entity to restore.
entity_typeYesWhich entity to restore — one of ``asset``, ``attacker``, ``component``, ``trust_boundary``, ``assumption``.
server_versionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.68.2

TDQS

A4.6/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 does so thoroughly: it declares the mutation, the creation of a new model version, the soft-delete precondition, and per-entity-type side effects such as reviving tombstoned COs, un-orphaning controls, and requiring re-attestation for assumptions. It also notes what is not restored (assumption CO links) and how to fix it.

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 long but front-loaded and well-structured, using a bulleted per-type breakdown that earns its place for a multi-type restore. The single sentence describing the return value is largely redundant given the output schema, a minor waste.

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 complex mutating tool with no annotations and an existing output schema, the description covers the mutation semantics, preconditions, per-type effects, and limitations thoroughly. It omits only non-critical details like permission requirements or error behavior, leaving an agent fully equipped to call it 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 coverage is 75%, so the schema already documents model_id, entity_id, and entity_type labels. The description goes beyond the schema by detailing the behavioral consequence of each entity_type value, adding meaningful semantic depth for the dispatch parameter, though it adds nothing for the remaining parameters.

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 ('Un-soft-delete'), resource ('a single entity of any core type'), and explicitly names the sibling operation it reverses (remove_entity). An agent can distinguish it from remove_entity and other mutation siblings 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 Guidelines4/5

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

Provides the key precondition — only affects an entity currently soft-deleted — and frames the tool as the inverse of remove_entity. It does not spell out explicit when-not-to-use cases or alternative routes beyond that inverse, so it is clear but not exhaustive.

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