Skip to main content
Glama

dedup_scan

Scan memory domains to surface likely duplicate or contradictory pairs, returning candidates with similarity scores for review.

Instructions

Surface likely-duplicate/contradictory memory pairs.

Lexical overlap over near-identical text -- each pair carries its method. Two takes on one subject in different words do not surface here. Same-domain/session checkpoint pairs are excluded (timelines, not dups) and checkpoint pairs rank below durable-type pairs. Not an automatic merge -- returns candidate pairs + similarity score for the agent to review and decide (link_memories / edit_memory / forget as appropriate).

domain scans a path and everything nested under it, which is usually what you want: near-duplicates collect between a module and its own routines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo
limitNo
domainNo
thresholdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral load and does so well: it discloses the matching method, that each pair is tagged with its `method`, that same-domain/session checkpoint pairs are excluded, and that checkpoint pairs rank below durable pairs. It explicitly clarifies this is not an automatic merge, which is the key safety-relevant behavior. It stops short of describing scoring/threshold effects or result volume.

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 content is front-loaded: what it surfaces, then what it excludes, then what it is not. Sentences are dense but each carries distinct information. There is mild redundancy in the closing paragraph, but no filler.

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?

An output schema exists, so return values need not be explained, and the description covers the non-obvious essentials: exclusions, ranking, non-mutating behavior, and next steps. The remaining gap is the un-documented tunable parameters (threshold/limit/type), which an agent needs in order to call it well.

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

Parameters2/5

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

Schema description coverage is 0% for four parameters, so the description must carry parameter meaning and only partly does. It explains `domain` well (scans a path and everything nested under it, with a rationale for why that is usually desired), but `type`, `limit`, and `threshold` (the key similarity cutoff at 0.6) are left entirely undefined.

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 states a specific verb+resource (surface likely-duplicate/contradictory memory pairs) and immediately narrows the mechanism (lexical overlap over near-identical text). It differentiates itself from what an agent might reach for instead by declaring that paraphrased takes on one subject do not surface here, which separates it from semantic search/recall siblings.

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?

It gives a clear when-it-fires / when-it-does-not condition (lexical overlap only; different-words pairs excluded) and routes the agent to the right follow-ups (link_memories / edit_memory / forget). It does not explicitly compare against sibling scan tools like optimize_scan or get_relations, so the alternative-selection guidance is implied rather than complete.

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