Skip to main content
Glama

quipu_retract_episode

Destructive

Retract all active facts contributed by an episode via logical, bitemporal closure while preserving history, other episodes' facts, and node identity; idempotent and safe to repeat.

Instructions

Episode-scoped logical retraction: retract all currently-active facts an episode's ingest contributed (activity node, entities, edges, reified statements), via the bitemporal valid_to close path. Logical, not physical — time-travel history is preserved. Entities and other episodes' facts are untouched. Idempotent. Node IDENTITY is protected: by default (on_orphan=preserve) rdfs:label/rdf:type survive for any node that other episodes still reference, so retraction never leaves an unlabelled, untyped ghost. The response always reports identity_orphans.

Input Schema

NameRequiredDescriptionDefault
nameNoAlias for episode.
actorNoWho is performing the retraction
episodeYesEpisode name/identifier to retract (aliases: episode_id, name)
on_orphanNoWhat to do when retraction would strip rdfs:label/rdf:type from a node other episodes still reference. preserve (default): keep its identity alive. refuse: reject the whole retraction. allow: legacy strict scope — creates ghosts, reported in identity_orphans.
timestampNoISO-8601 timestamp for the retraction
episode_idNoAlias for episode.
orphan_policyNoAlias for on_orphan.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.17.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the description adds genuine beyond-schema context: retraction is logical via the bitemporal valid_to close path, time-travel history survives, other episodes' facts are untouched, and the operation is idempotent. It also explains the identity-orphan hazard and that identity_orphans is always reported, giving the agent the full consequence picture before it fires a destructive call.

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 verb and scope, then progressively discloses semantics, safety, and the orphan policy — a sound ordering for a destructive tool. Dense with jargon (bitemporal, reified, identity_orphans) but every sentence carries distinct information; only 'Entities and other episodes' facts are untouched' slightly overlaps the scope list.

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 no output schema, the description still tells the agent what comes back (the identity_orphans report) and covers the destructive semantics thoroughly. Minor gaps remain: behavior when the episode does not exist, and what the actor/timestamp parameters do to the audit trail are left to the schema.

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 100%, so the baseline is 3, but the description goes further by tying on_orphan=preserve to its outcome (rdfs:label/rdf:type survive for nodes other episodes still reference) and by calling out that the response surfaces identity_orphans. The four alias parameters (name, episode_id, orphan_policy) are not mentioned in the description, though the schema documents them fully.

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 opens with a specific verb and resource plus an explicit scope qualifier: 'Episode-scoped logical retraction: retract all currently-active facts an episode's ingest contributed'. It enumerates exactly what falls in scope (activity node, entities, edges, reified statements), which cleanly separates it from the untargeted quipu_retract and from quipu_retract_source in the sibling list.

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 rather than stated — the agent can infer this is the right tool when it knows the episode whose ingest produced the facts. However, it never explicitly names an alternative (e.g., use quipu_retract_source for source-scoped removal, or quipu_unravel for graph-level removal) or states when NOT to use it. Adequate but leaves routing 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