Skip to main content
Glama
carloshpdoc

memorydetective

Render a retain cycle as Mermaid or DOT graph

renderCycleGraph

Read a .memgraph file and generate a Mermaid or Graphviz diagram of a retain cycle, highlighting app-level classes and styling cycle terminators.

Instructions

[mg.render] Read a .memgraph, pick a ROOT CYCLE by index, and emit the chain as a Mermaid graph definition (default — embeddable in markdown / GitHub) or a Graphviz DOT file. App-level classes are highlighted; CYCLE BACK terminators are styled distinctly. Use cycleIndex to render cycles other than the first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to a `.memgraph` file.
cycleIndexNoZero-based index of the ROOT CYCLE to render (default 0 = the first cycle, usually the largest).
formatNoOutput format: `mermaid` (GitHub-renderable, embeddable in markdown) or `dot` (Graphviz format).mermaid
maxDepthNoTruncate the rendered graph beyond this chain depth (default 8).
truncateClassNameNoTruncate long generic SwiftUI class names to this many characters (default 60). The full name still appears in node IDs.
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that app-level classes are highlighted and cycle-back terminators are styled distinctly, but does not cover error behavior or side effects such as file reading failures.

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 concise with three sentences. The first sentence captures the main action, the second adds styling details, and the third provides a usage tip. No unnecessary words, and it is front-loaded.

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 output format options and styling, and combined with the schema, covers the tool's functionality. However, it lacks details on return values or error handling, but for a rendering tool, it is adequate.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema documents all parameters. The description adds context beyond the schema by mentioning styling details and usage hint for cycleIndex, providing moderate additional value.

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 renders a retain cycle as a Mermaid or DOT graph from a .memgraph file, specifying the verb 'render' and resource 'retain cycle'. It differentiates from sibling tools like findCycles by focusing on graphical output.

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 explicit usage guidance by mentioning the use of cycleIndex to render cycles other than the first. It does not explicitly state when not to use or compare to alternatives, but the context is clear for rendering tasks.

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