Skip to main content
Glama

memory_quality

Destructive

Rate, inspect, and analyze memory quality; run maintenance to clean conflicts and stale entries, review last-run stats, and rebuild entity links.

Instructions

Memory quality management - rate, inspect, and analyze.

ACTIONS:

  • rate: Manually rate a memory's quality (thumbs up/down)

  • get: Get quality metrics for a specific memory

  • analyze: Analyze quality distribution across all memories

  • maintain: Run maintenance cycle (cleanup + conflicts + stale + quality)

  • maintain_status: Get stats from last maintenance run

  • rebuild_entities: Rebuild has_entity and shares_entity for ALL live memories using current extraction settings. Preview by default (dry_run=true); back up first and pause other writers before dry_run=false. Requires a graph backend.

Examples: {"action": "rate", "content_hash": "abc123", "rating": 1, "feedback": "Very useful"} {"action": "get", "content_hash": "abc123"} {"action": "analyze"} {"action": "analyze", "min_quality": 0.5, "max_quality": 1.0} {"action": "maintain"} {"action": "maintain", "dry_run": false} {"action": "maintain_status"} {"action": "rebuild_entities"} {"action": "rebuild_entities", "dry_run": false}

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "memory_quality"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYesQuality action to perform
ratingNoFor 'rate': '-1' (thumbs down), '0' (neutral), '1' (thumbs up)
dry_runNoFor 'maintain'/'rebuild_entities': preview mode — no modifications (default: true)
feedbackNoFor 'rate': Optional feedback text
max_qualityNoFor 'analyze': maximum quality threshold
min_qualityNoFor 'analyze': minimum quality threshold
content_hashNoMemory hash (required for rate/get)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, the description discloses which actions mutate data, that maintain runs cleanup/conflicts/stale/quality passes, that rebuild_entities rewrites has_entity/shares_entity for ALL live memories, and that dry_run defaults to true for preview. It also states the graph-backend prerequisite and recommends backup and writer pause, which is exactly the behavioral context the annotation alone cannot convey.

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 ACTIONS bullet list is front-loaded and scannable, with the risky rebuild_entities caveat placed inline where it matters. The nine JSON examples are useful but partially restate the action list and could be trimmed without losing meaning.

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?

For a seven-parameter, six-action tool with no output schema, the description covers every action, its parameters, and the destructive-path safeguards. The one gap is that return values for get/analyze/maintain_status are not characterized, so an agent cannot anticipate the shape of results.

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 coverage is 100%, so the baseline would be 3, but the description adds value by mapping parameters to actions (content_hash required for rate/get, min_quality/max_quality scoping analyze, dry_run for maintain/rebuild_entities) and by showing concrete parameter combinations in the examples. It stops short of explaining semantics such as what a quality threshold of 0.5 actually filters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource ('Memory quality management') and enumerates six concrete actions (rate, get, analyze, maintain, maintain_status, rebuild_entities), so an agent knows exactly what the tool does. It does not explicitly distinguish itself from siblings like memory_health, memory_stats, memory_cleanup, or memory_conflicts, even though 'maintain' overlaps those areas, which keeps it from a 5.

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 action list plus per-action examples give clear conditions for use, and the rebuild_entities entry explicitly states the safe workflow (preview by default, back up first, pause other writers, requires a graph backend). There is no explicit when-not-to-use guidance or routing to sibling tools such as memory_health for read-only health inspection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.