Skip to main content
Glama
carloshpdoc

memorydetective

Verify a fix actually closed the targeted retain cycle

verifyFix

Compare pre-fix and post-fix memory snapshots to verify retain cycle fixes. Get per-pattern PASS/FAIL verdicts or check a specific pattern disappeared.

Instructions

[mg.memory] Cycle-semantic diff. Classifies both before and after .memgraph snapshots and emits a per-pattern PASS/PARTIAL/FAIL verdict plus bytes freed and instances released. Use as a CI gate: if expectedPatternId is provided, expectedPatternVerdict tells you in one field whether the fix landed.

Pipeline: this is the natural followup to classifyCycle after you've shipped a fix. Capture a fresh .memgraph, point this at the before/after pair.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
beforeYesAbsolute path to the baseline `.memgraph` (pre-fix).
afterYesAbsolute path to the post-fix `.memgraph`.
expectedPatternIdNoIf provided, the verdict is gated on whether this specific patternId disappeared from `after`. Defaults to checking every classified pattern.
verbosityNocompact
Behavior4/5

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

No annotations are provided, so the description bears full responsibility. It discloses the core behavior: classifies both snapshots, emits per-pattern PASS/PARTIAL/FAIL verdict, bytes freed, instances released. It does not detail side effects (likely read-only), but the main actions are transparently described.

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?

Two concise paragraphs: the first covers the tool's action and outputs, the second provides pipeline context. Every sentence adds value, and key information is front-loaded without unnecessary detail.

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 or annotations, the description adequately covers inputs (before/after paths, optional patternId, verbosity), outputs (verdicts, bytes, instances), and usage context (CI gate, pipeline). It misses error handling or output format details, but overall is quite complete for the complexity.

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 75%, and the description adds value beyond the schema. It explains expectedPatternId's role (gating on pattern disappearance from after) and verbosity as controlling output detail. The description enriches understanding of how parameters influence output.

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 ('Verify') and clearly identifies the resource (retain cycle fix). It explains the action (cycle-semantic diff on before/after snapshots) and distinguishes from siblings like classifyCycle by stating it's the natural followup.

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 states 'Use as a CI gate' and describes the pipeline: followup to classifyCycle after shipping a fix. It tells when to use it (after fix, with before/after pair). It could be improved by noting when not to use it, but the context is clear enough.

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