Skip to main content
Glama

memory_inspect_graph_tool

Analyze memory relationships by exploring connected nodes and edges to visualize graph structures for AI memory systems.

Instructions

Inspect the graph structure around a memory node.

Performs read-only breadth-first search from the origin memory, collecting all nodes and edges within max_depth hops. Returns structured data for visualization including Mermaid diagram generation.

Args: memory_id: ID of the memory to start inspection from max_depth: Maximum number of hops to traverse (default: 2) direction: Edge traversal direction - "outgoing", "incoming", or "both" (default: "both") edge_types: Optional list of edge types to include (None means all). Valid types: relates_to, supersedes, caused_by, contradicts include_scores: If True, compute relevance scores for paths (default: True) decay_factor: Factor by which relevance decays per hop (default: 0.7) output_format: Output format - "json" or "mermaid" (default: "json")

Returns: Dictionary with: - success: Boolean indicating operation success - origin_id: The starting memory ID - nodes: List of node dicts with id, content_preview, type, confidence, importance - edges: List of edge dicts with id, source_id, target_id, edge_type, weight - paths: List of path dicts with node_ids, edge_types, total_weight, relevance_score - stats: Dict with node_count, edge_count, max_depth_reached, origin_id - mermaid: Mermaid diagram string (only when output_format='mermaid') - error: Error message (if failed)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memory_idYes
max_depthNo
directionNoboth
edge_typesNo
include_scoresNo
decay_factorNo
output_formatNojson

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/blueman82/recall'

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