Skip to main content
Glama

add_relationship

Creates typed links between two memories to organize and traverse related information, such as marking one memory as superseding, contradicting, or elaborating on another.

Instructions

Create a relationship between two memories. Relationships help organize and traverse related information.

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": {
      "memory_id": "<memory_id>",
      "related_memory_id": "<related_memory_id>"
    },
    "name": "add_relationship"
  }
}

Input Schema

NameRequiredDescriptionDefault
store_idNoStore/fork ID (default 'main')
memory_idYesSource memory ID
related_memory_idYesTarget memory ID
relationship_typeNoType of relationship: related_to (general), supersedes (replaces), contradicts (conflicts), elaborates (expands on), references (mentions)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations at all, the description carries the full behavioral burden and does not meet it. It does not say whether duplicates are rejected, whether this is idempotent, whether self-links or cross-store links are allowed, what error surfaces for an unknown memory ID, or what the call returns — all material for a mutation tool with zero annotation coverage.

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?

Two short sentences with the action front-loaded and no wasted preamble. The second sentence is mild generic filler but is short enough not to crowd out the core statement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A four-parameter mutation tool with no annotations and no output schema needs the description to explain side effects, idempotency, and failure modes, and it explains none of them. What exists covers only what the tool does, not how it behaves when called.

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%, including per-enum-value explanations for relationship_type, so the schema already does the semantic work. The description adds nothing beyond it (it never mentions store_id, directionality of source/target, or type choice), so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Create a relationship between two memories" gives a specific verb and resource, and the mention of organizing/traversing related information hints at how this differs from read-side siblings like get_relationships or get_related_memories. It stops short of naming any sibling explicitly, so an agent must infer the boundary from names alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no when-to-use guidance: nothing says when to link memories versus embedding related content in one memory, no prerequisites (do both memories need to exist?), and no guidance on choosing among the five relationship types or on checking for existing links first. The generic second sentence about organizing information is motivation, not routing guidance.

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