Skip to main content
Glama

Associate Memories

associate_memories
Idempotent

Create typed relationships between memories to build a knowledge graph, improving recall by surfacing related context.

Instructions

Create a typed relationship between two memories. This builds a knowledge graph that improves recall by surfacing related context.

When to use:

  • After storing a new memory: link it to related existing memories

  • When a bug fix relates to an original feature implementation

  • When a new decision updates or invalidates a previous one

  • To connect patterns with their concrete examples

Authorable relationship types:

  • RELATES_TO: General relationship (default)

  • LEADS_TO: Causal relationship (A caused B)

  • OCCURRED_BEFORE: Temporal ordering

  • PREFERS_OVER: Chosen alternative

  • EXEMPLIFIES: Concrete example of a pattern

  • CONTRADICTS: Conflicts with another memory

  • REINFORCES: Strengthens another memory's validity

  • INVALIDATED_BY: Superseded by another memory

  • EVOLVED_INTO: Updated version of a concept

  • DERIVED_FROM: Implementation of a decision/pattern

  • PART_OF: Component of a larger effort

Read-only/internal relations:

  • System/internal relations such as SIMILAR_TO, PRECEDED_BY, EXPLAINS, SHARES_THEME, PARALLEL_CONTEXT, and DISCOVERED may appear in recall results, but they are not valid inputs for associate_memories.

Examples:

  • associate_memories({ memory1_id: "bug-fix-123", memory2_id: "feature-456", type: "RELATES_TO", strength: 0.9 })

  • associate_memories({ memory1_id: "new-decision", memory2_id: "old-decision", type: "EVOLVED_INTO", strength: 0.8 })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memory1_idYesID of the source memory (from store_memory response or recall results)
memory2_idYesID of the target memory to link to
typeYesRelationship type between the two memories
strengthYesRelationship strength: 0.9+ direct causation, 0.7-0.9 strong relation, 0.5-0.7 moderate

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYesWhether the association was created
messageYesConfirmation message
Behavior4/5

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

Annotations already provide idempotentHint=true (idempotent) and destructiveHint=false (not destructive). The description adds behavioral context beyond annotations: it lists authorable relationship types, warns about read-only internal relations that are not valid inputs, and provides examples. It does not contradict any annotation. However, it could explicitly mention idempotency or non-destructiveness, but the annotations cover that.

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?

The description is well-structured with sections for purpose, when to use, relationship types, and examples. It front-loads the main purpose and usage guidelines. While it is relatively long, every segment adds value and the structure aids readability. It could be slightly more concise, but it is not verbose.

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?

Given that the schema covers 100% of parameters with descriptions, and there is an output schema (as indicated by context signals), the description is complete. It covers when to use, relationship types with examples, and strength guidance. No essential information is missing for an agent to correctly invoke this tool.

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_description_coverage is 100%, so baseline is 3. The description adds significant value beyond the schema: it explains the enum values by categorizing them as authorable vs read-only, provides guidance on the 'strength' parameter (e.g., '0.9+ direct causation, 0.7-0.9 strong relation'), and includes examples that show how parameters are used. This goes well beyond the schema descriptions.

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 the tool's purpose: 'Create a typed relationship between two memories. This builds a knowledge graph that improves recall by surfacing related context.' It uses a specific verb ('create') and resource ('typed relationship between two memories'), and distinguishes itself from sibling tools like store_memory (stores a single memory) and recall_memory (retrieves memories).

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?

The description provides an explicit 'When to use:' section with concrete scenarios (e.g., 'After storing a new memory: link it to related existing memories', 'When a bug fix relates to an original feature implementation'). It also distinguishes between authorable and read-only relationship types, telling the agent which are valid inputs. This is excellent guidance for selecting this tool over alternatives.

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/verygoodplugins/mcp-automem'

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