Skip to main content
Glama

link_memories

Create typed relationships between memories to build a knowledge graph connecting related concepts.

Instructions

Create a typed relationship between two memories.

Use this to build a knowledge graph connecting related concepts. Relationships are directional: from_memory -[relation_type]-> to_memory.

Examples:

  • "Python 3.12 features" -[supersedes]-> "Python 3.11 features"

  • "Auth implementation" -[depends_on]-> "Database schema"

  • "API endpoint details" -[elaborates]-> "API overview"

  • "Project notes" -[mentions]-> "PostgreSQL" (entity extraction)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_memory_idYesTarget memory ID
relation_typeYesRelationship type: 'relates_to' (general), 'depends_on' (prerequisite), 'supersedes' (replaces), 'refines' (more specific), 'contradicts' (conflict), 'elaborates' (more detail), 'mentions' (references entity)
from_memory_idYesSource memory ID

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so description carries full burden. It explains directionality and lists possible relation types with examples. Does not mention side effects or permissions, but operation is simple and non-destructive.

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?

Description is concise with a clear header, bulleted examples, and structured explanation. No unnecessary words.

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?

Given no annotations and presence of output schema, description adequately covers purpose, usage, and parameters. Could mention what the return value indicates, but not critical for tool invocation.

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%, but description adds value by providing examples and explaining the meaning of relation_type (enum-like values) and directionality (from_memory to to_memory).

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?

The description clearly states 'Create a typed relationship between two memories' and provides examples showing directional relationships. It distinguishes itself from sibling tools like unlink_memories.

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

Usage Guidelines4/5

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

The description states 'Use this to build a knowledge graph connecting related concepts' and explains direction and relation types. It does not explicitly state when not to use, but context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/michael-denyer/memory-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server