Skip to main content
Glama

delete_relationship

Delete a relationship. Requires the exact relationship_type between the two entities; if unknown, call list_relationships with source_entity_id and target_entity_id first to discover it.

Instructions

Delete a relationship. Requires the exact relationship_type between the two entities; if unknown, call list_relationships with source_entity_id and target_entity_id first to discover it. Creates a deletion observation so the relationship is excluded from snapshots and queries. Immutable and reversible for audit. Returns 404 with a discovery hint when no live relationship matches the supplied triple.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoOptional reason for deletion (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 — the same vocabulary create_relationship writes. Relationship type. The vocabulary is a runtime registry, not a closed enum: call list_relationship_types to read what this instance accepts, and register_relationship_type to add to it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.25.0
    • changedInput schema / properties / relationship_type / description
      Previous 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)."New value: +"Exact relationship type of the existing edge — the same vocabulary create_relationship writes. Relationship type. The vocabulary is a runtime registry, not a closed enum: call list_relationship_types to read what this instance accepts, and register_relationship_type to add to it."
    • removedInput schema / properties / relationship_type / enum
      Removed 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. 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"
      +]
  3. Addedv0.15.0
  4. Removedv0.14.0
  5. Addedv0.12.1
  6. Removedv0.11.0
  7. First observedv0.1.0

TDQS

A4.7/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 discloses that deletion is a soft delete writing a deletion observation, that the edge is excluded from snapshots and queries, that it is immutable and reversible for audit, and that a non-matching triple returns 404 with a discovery hint. It stops short of stating auth requirements or how to reverse the deletion.

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, each earning its place: action, precondition/routing, side effect semantics, and error behavior. The action and requirement are front-loaded ahead of secondary detail.

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?

There is no output schema, so the description must carry return-value meaning and it does — it explains the deletion observation, snapshot/query exclusion, reversibility, and the 404 hint. Nothing an agent needs to invoke it correctly is missing.

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 100%, so the baseline is 3; the description adds real value by stressing the relationship_type must exactly match create_relationship's vocabulary and by describing the error path for a wrong triple. It says nothing additional about reason or user_id, which the schema already covers.

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+resource ('Delete a relationship') and immediately scopes it with the required identifier triple. It is readily distinguishable from siblings like delete_entity, create_relationship, and restore_relationship.

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 (need the exact relationship_type) and names the concrete alternative (list_relationships with source_entity_id and target_entity_id) as the discovery path when the type is unknown. The condition that selects the alternative is explicit, not inferred.

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