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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool as 'read-only', specifies the traversal algorithm (breadth-first search), and outlines the return structure including success indicators and error handling. However, it does not mention performance characteristics, rate limits, or authentication requirements, leaving some behavioral aspects uncovered.

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 a clear purpose statement, parameter explanations, and return value details. It is appropriately sized for a complex tool with many parameters, though the parameter list is lengthy. Every sentence adds value, but the formatting could be more front-loaded to emphasize core functionality before detailing all parameters.

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 the tool's complexity (7 parameters, no annotations, but has output schema), the description is highly complete. It covers the purpose, parameters, return structure, and includes an output schema that details the response format. The combination of description and output schema provides all necessary context for an agent to understand and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate. It provides detailed semantics for all 7 parameters, including default values, valid options (e.g., direction values, edge types), and functional explanations (e.g., decay_factor for relevance scoring). This adds significant meaning beyond the bare schema, making parameter purposes and usage clear.

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 performs a 'read-only breadth-first search from the origin memory' to 'inspect the graph structure around a memory node', distinguishing it from siblings like memory_list_tool (listing) or memory_recall_tool (retrieving content). It specifies verb ('inspect'), resource ('graph structure'), and scope ('around a memory node'), making the purpose unambiguous and distinct from related tools.

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 description implies usage for visualization and graph analysis, but does not explicitly state when to use this tool versus alternatives like memory_context_tool or memory_analyze_health. It mentions returning data 'for visualization including Mermaid diagram generation', which provides some context, but lacks explicit guidance on prerequisites, exclusions, or comparative scenarios with sibling tools.

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

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