Skip to main content
Glama
carloshpdoc

memorydetective

Find ROOT CYCLE blocks in a .memgraph

findCycles

Extract root cycle blocks from .memgraph files as flattened chains, with optional class name filter for targeted inspection of retain cycles.

Instructions

[mg.memory] Extract just the ROOT CYCLE blocks from a .memgraph as flattened chains (depth + edge + retainKind + className + address). Optionally filter to cycles touching a specific class name (substring match). Use this when you want to inspect chains without the noise of standalone leaks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to a `.memgraph` file.
classNameNoOptional substring filter — only return cycles where this class name appears in the chain (e.g. "DetailViewModel").
maxDepthNoTruncate chains beyond this depth (default 10).
verbosityNoClass-name verbosity. `compact` shortens SwiftUI generic names aggressively; `full` returns demangled names verbatim.compact
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses the tool's read-only nature, output format, and optional filtering. It does not mention error handling or permissions, but for a read tool, the level of detail is adequate and transparent.

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?

The description is two sentences plus a usage hint, front-loaded with the core purpose. Every sentence adds value, with no wasted 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?

The description explains the return format (flattened chains with specific fields) but lacks details on error cases, empty results, or a more precise explanation of verbosity levels. Given no output schema, it is fairly complete but could be slightly more thorough.

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 coverage is 100%, so the baseline is 3. The description adds minimal extra meaning beyond the schema descriptions (e.g., summarizing filtering and verbosity). It does not significantly enhance parameter understanding beyond what the schema already provides.

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 uses a specific verb ('Extract') and resource ('.memgraph'), clearly stating it extracts ROOT CYCLE blocks as flattened chains with defined fields. It distinguishes the tool from siblings by specifying its unique filtering and output, though no explicit sibling differentiation is provided.

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 provides a clear usage context ('Use this when you want to inspect chains without the noise of standalone leaks'), but does not mention when not to use this tool or explicitly reference alternative sibling tools like 'classifyCycle' or 'reachableFromCycle'.

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/carloshpdoc/memorydetective'

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