Check for near-duplicate memories
memory_dedup_checkCheck if storing new memory content would duplicate existing memories. Returns matching memories with cosine similarity above the threshold, highest first. Use before memory_store to prevent redundancy.
Instructions
Cheap pre-flight (~50 tok/match): "would storing this content duplicate something I already have?" Read-only. Use before memory_store when overlap is likely, or before bulk imports. Returns up to limit existing memories with cosine similarity above the threshold (highest first). Computing the candidate embedding may make an outbound call to the configured provider (OpenAI, Ollama, etc.). If embeddings are disabled, returns a clear no-op message rather than silently passing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Candidate memory body to check, exactly as you would pass to `memory_store`. | |
| title | No | Optional candidate title; concatenated with `content` to match how `memory_store` builds its embedding. | |
| project_path | No | Optional absolute project path to scope the search to a single project's memories. | |
| threshold | No | Cosine similarity threshold in [0, 1]. Defaults to `search.embeddings.dedupThreshold` from config (typically ~0.85). | |
| limit | No | Maximum number of matches to return (1-20). Default 5. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Markdown list of near-duplicate matches with similarity scores, or `No near-duplicates found above threshold.` Returns a no-op message when embeddings are disabled in config. |