Skip to main content
Glama

delete_relationship

Remove a relationship between two entities by supplying its exact type and IDs. Creates an audit observation, excludes the edge from snapshots, and returns a discovery hint if no match is found.

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. 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.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 discloses the soft-delete mechanism (creates a deletion observation), the effect (excluded from snapshots and queries), reversibility/auditability, and the 404 error behavior with a discovery hint. This is unusually complete behavioral disclosure.

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 sentences, each earning its place, with the core action and the hard requirement (exact relationship_type) front-loaded before the recovery path and side effects.

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 mutation tool with no annotations and no output schema, the description covers prerequisites, side effects, reversibility, and error behavior. 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, but the description adds that relationship_type must be the EXACT type of the existing edge and that it accepts the same set create_relationship writes, which clarifies a real failure mode not stated in the schema.

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 (delete) and resource (relationship), and distinguishes itself from siblings by naming list_relationships as the discovery path and the create_relationship type set as its counterpart. An agent can tell exactly what this does versus restore_relationship or delete_entity.

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?

Gives an explicit conditional: if relationship_type is unknown, call list_relationships with source_entity_id and target_entity_id first. That is a concrete when-to-use-else rule with the alternative named and the parameters to pass.

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