Skip to main content
Glama

restore_relationship

Reinstate a deleted relationship by creating a priority 1001 restoration observation that overrides the deletion, making it visible in snapshots and queries again.

Instructions

Restore a deleted relationship. Creates a restoration observation (priority 1001) that overrides the deletion. Relationship becomes visible in snapshots and queries again. Immutable restoration for audit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoOptional reason for restoration (audit)
user_idNoOptional. Inferred from authentication if omitted.
source_entity_idYesSource entity ID
target_entity_idYesTarget entity ID
relationship_typeYesExact relationship type of the existing edge. Accepts the same set create_relationship writes: structural types (PART_OF, REFERS_TO, EMBEDS) and domain types (works_at, related_to, owns).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.22.2
    • changedInput schema / properties / relationship_type / description
      Previous value: -"Relationship type (e.g. PART_OF, REFERS_TO, EMBEDS)"New value: +"Exact relationship type of the existing edge. Accepts the same set create_relationship writes: structural types (PART_OF, REFERS_TO, EMBEDS) and domain types (works_at, related_to, owns)."
    • changedInput schema / properties / relationship_type / enum
      Previous value: -[
      -  "PART_OF",
      -  "CORRECTS",
      -  "REFERS_TO",
      -  "SETTLES",
      -  "DUPLICATE_OF",
      -  "DEPENDS_ON",
      -  "SUPERSEDES",
      -  "EMBEDS"
      -]New value: +[
      +  "PART_OF",
      +  "CORRECTS",
      +  "REFERS_TO",
      +  "SETTLES",
      +  "DUPLICATE_OF",
      +  "DEPENDS_ON",
      +  "SUPERSEDES",
      +  "EMBEDS",
      +  "works_at",
      +  "owns",
      +  "manages",
      +  "part_of",
      +  "related_to",
      +  "depends_on",
      +  "references",
      +  "transacted_with",
      +  "member_of",
      +  "reports_to",
      +  "located_at",
      +  "created_by",
      +  "funded_by",
      +  "acquired_by",
      +  "subsidiary_of",
      +  "partner_of",
      +  "competitor_of",
      +  "supplies_to",
      +  "contracted_with",
      +  "invested_in"
      +]
  2. Addedv0.15.0
  3. Removedv0.14.0
  4. Addedv0.12.1
  5. Removedv0.11.0
  6. First observedv0.1.0

TDQS

A4/5.0
Behavior4/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 well: it explains the mechanism (a restoration observation with priority 1001 that overrides the deletion), the effect (visibility in snapshots/queries resumes), and a key trait (immutable, audit-oriented, i.e., non-destructive/append-only rather than a hard undo). It omits permission requirements and error behavior when the edge was never deleted or is already restored.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with the action, then mechanism, effect and behavioral trait in order of importance. No filler or repetition of schema content, and each sentence carries information.

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?

For a 5-parameter mutation with no output schema and no annotations, the description covers the mechanism and observable outcome well, which is what an agent needs to call it correctly. It falls short on preconditions (must the edge already be deleted? must the caller own it?) and on confirming that the three required coordinates identify the deleted edge uniquely.

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?

Schema description coverage is 100%, so every parameter including the enum-constrained relationship_type is already documented in the schema itself. The description adds no additional parameter meaning (no mention of reason, user_id inference, or how to identify the exact edge), so the baseline 3 applies.

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 ('Restore') and resource ('a deleted relationship') and distinguishes itself from siblings like delete_relationship and restore_entity. The agent can immediately tell what operation this performs 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 Guidelines3/5

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

Usage is implied by the name and description (use it to undo a deletion), but there is no explicit statement of when to prefer this over alternatives such as create_relationship or restore_entity, nor any prerequisite conditions. The 'becomes visible in snapshots and queries again' clause hints at context but does not route the agent.

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