Skip to main content
Glama
Knowledge Graph Memory Server

Knowledge Graph Memory Server

Delete Relations

delete_relations
DestructiveIdempotent

Remove specific links between two entities in the knowledge graph while keeping the entities themselves. Match each relation exactly by from, to, and relationType; deletion cannot be undone.

Instructions

Delete specific relations (from, to, relationType) from the knowledge graph and keep the entities they connect. Each relation must match an existing one exactly on all three fields; if unsure, call open_nodes (or search_nodes) first to read the stored relationType. Use it to remove a link between two entities; to remove an entity itself, use delete_entities. Cannot be undone.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "relations": "<relations>"
    },
    "name": "delete_relations"
  }
}

Input Schema

NameRequiredDescriptionDefault
relationsYesAn array of relations to delete

Output Schema

NameRequiredDescriptionDefault
messageYes
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed2 schema fields changed
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "message": {
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success",
      +    "message"
      +  ],
      +  "type": "object"
      +}
  3. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the description earns credit for the additions beyond them: irreversibility ("Cannot be undone") and the exact-match requirement across all three fields, which is the real behavioral risk here. It stops short of saying what happens when only some relations in the array match (partial deletion vs. all-or-nothing), which is the one behavior an agent would still want.

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 doing distinct work: what it deletes, the match constraint, the fallback lookup, the sibling boundary, and the irreversibility warning. The destructive warning is placed last as a closer and nothing is redundant.

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 an output schema present, return values need no explanation, and the description covers scope, matching rules, prerequisites, and sibling alternatives. The remaining gap is batch-failure semantics for a partially valid relations array, which matters for a destructive tool but is a narrow omission.

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 baseline is 3; the description earns above baseline by naming the three required subfields and adding the non-obvious constraint that each must match an existing relation exactly on all three fields. That matching rule is semantic content the schema descriptions do not carry.

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 and resource ("Delete specific relations ... from the knowledge graph") plus the identifying triple (from, to, relationType) and the retained side effect ("keep the entities they connect"). It explicitly contrasts with delete_entities, so an agent can distinguish the two without opening either schema.

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 when-to-use rule ("Use it to remove a link between two entities"), an explicit alternative for the adjacent case ("to remove an entity itself, use delete_entities"), and a prerequisite workflow ("if unsure, call open_nodes (or search_nodes) first to read the stored relationType"). Nothing about tool selection is left to inference.

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