Skip to main content
Glama

memory_graph

Map and explore connections between stored memories: find connected nodes, shortest paths, and subgraphs; infer, suggest, or explain relationships; and inspect linked entities.

Instructions

Memory association graph operations - explore connections between memories.

ACTIONS:

  • connected: Find memories connected via associations (BFS traversal)

  • path: Find shortest path between two memories

  • subgraph: Get graph structure around a memory for visualization

  • extract_entities: Manually extract and store entities for a memory (write). Params: hash (string)

  • infer: Find transitive relationships (A→B→C implies A→C). Params: rel_type (string), max_hops (int, default 2)

  • suggest: Suggest potential relationships for a memory based on shared neighbors. Params: hash (string)

  • abduct: Find plausible common-cause explanations for a memory's relationships. Params: hash (string)

  • list_entities: List known entities. Params: limit (int, default 50)

  • entity_profile: Show memories linked to one entity. Params: entity_name (string)

Examples: {"action": "connected", "hash": "abc123", "max_hops": 2} {"action": "path", "hash1": "abc123", "hash2": "def456", "max_depth": 5} {"action": "subgraph", "hash": "abc123", "radius": 2} {"action": "infer", "rel_type": "causes", "max_hops": 2} {"action": "suggest", "hash": "abc123"}

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": {
      "action": "<action>"
    },
    "name": "memory_graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
hashNoMemory hash (for connected/subgraph)
as_ofNoFor 'connected': point-in-time traversal (issue #1724). Only edges valid at this moment are followed (temporal edges carry valid_from/valid_until; untimed edges are always followed). Same formats as memory_search as_of.
hash1NoStart memory hash (for path)
hash2NoEnd memory hash (for path)
limitNoFor 'list_entities': max entities to return
actionYesGraph operation to perform
radiusNoFor 'subgraph': nodes to include
max_hopsNoFor 'connected': max traversal depth
rel_typeNoFor 'infer': relationship type to traverse
max_depthNoFor 'path': max path length
entity_nameNoFor 'entity_profile': entity to profile

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A3.8/5.0
Behavior4/5

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

With only readOnlyHint=false supplied, the description carries real weight and does so well: it flags extract_entities as the lone '(write)' action, names the traversal algorithms (BFS, shortest path), and notes temporal semantics (issue #1724 point-in-time edges). It stops short of describing result shapes, error behavior for unknown hashes, or cost limits on deep traversals.

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?

Front-loaded with a one-line purpose, then a scannable ACTIONS block and a compact examples block — good structure for a multi-action dispatcher. Slight redundancy with the schema's per-parameter action annotations, but nothing is filler.

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

Completeness3/5

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

For a 9-action, 11-parameter dispatcher with no output schema and only one annotation, the definition covers what each action does but not what any action returns (nodes, edges, entity records, confidence scores). An agent knows how to call it but not what to expect back, which is a meaningful gap at this complexity.

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% and each parameter already carries a 'For <action>' note, so the description's per-action parameter listing largely restates structured data. The one genuine addition is the examples, which show valid cross-action parameter combinations (e.g. path with hash1/hash2/max_depth), but no format or edge-case semantics are added beyond 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 resource (memory association graph) and enumerates all nine operations with a verb-plus-object gloss for each (BFS traversal, shortest path, subgraph for visualization, entity extraction, transitive inference, etc.). An agent can tell immediately that this is graph/relationship traversal rather than the flat retrieval done by memory_search or memory_explore.

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

Usage Guidelines3/5

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

The action list implies when each operation applies (path vs connected vs subgraph vs suggest), and the include of examples effectively demonstrates the call shape. However, there is no explicit statement of when to prefer this tool over siblings such as memory_search, memory_explore, or memory_health, and no preconditions or when-not guidance.

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