Skip to main content
Glama
carloshpdoc

memorydetective

Find ROOT CYCLE blocks in a .memgraph

findCycles

Extract root retain cycle chains from .memgraph files, filtering by class name. Focus on true cycles, ignoring standalone leaks.

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?

The description explains the output format and filtering capability. It implies a non-destructive analysis. Without annotations, the description carries the full burden, and it adequately covers the tool's behavior, though it could mention that it only reads files and does not modify them.

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, front-loaded with the core function, and efficient. Every sentence adds value without redundancy.

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?

Despite no output schema, the description specifies the output format (flattened chains with fields) and mentions optional filtering and depth truncation. It could be more explicit about the return type (e.g., array), but it is fairly complete for a file-reading analysis tool.

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 baseline is 3. The description adds context for the className parameter (substring match) and the verbosity parameter implicitly, but does not significantly extend understanding 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?

The description clearly states it extracts ROOT CYCLE blocks from a .memgraph as flattened chains with specific fields (depth, edge, retainKind, className, address). It also mentions optional filtering by class name, distinguishing it from analyzing all leaks.

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 explicitly says 'Use this when you want to inspect chains without the noise of standalone leaks,' providing a clear use case. However, it does not name specific alternative tools or state when not to use it.

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