memo_consolidate
Detect near-duplicate memory clusters and receive merge proposals. Read-only analysis identifies overlapping memories and suggests consolidation with adjustable similarity and cluster limits.
Instructions
Detect near-duplicate clusters and propose merges.
Read-only — returns proposals without modifying the corpus.
Uses the AdvancedConsolidator under the hood (same as
memo_consolidate_list_archived). With client sampling enabled,
merge synthesis runs on the calling model up to
MEMO_SAMPLING_MAX_CALLS (see synthesizer field). max_clusters
bounds how many clusters come back; a single cluster's member list
is bounded separately by member_limit -- same-topic memories
cluster by design, so one cluster can hold most of the corpus.
Both defaults are derived from MEMO_MCP_RESPONSE_BUDGET_TOKENS rather
than picked for round numbers: a returned member carries a 600-char
body_preview, so the response costs roughly
max_clusters * member_limit * 850 chars and the previous 20 x 20
spent ~47k tokens against a 10k cap -- 20 clusters cannot be returned
with any useful member detail at all. 10 x 2 measures 3,978 tokens on
the conformance corpus and ~9,039 projected for a corpus whose bodies
actually reach the 600-char preview cap. Two sample members are what
it takes to SEE a duplicate; total still reports the cluster's real
size, and memo_get fetches any member by id. Raise either argument
to see more and accept a larger response (the budget middleware
refuses one that overruns rather than silently truncating it).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Optional filter by memory type. | |
| threshold | No | Cosine similarity threshold (default 0.85). | |
| max_clusters | No | Clusters to process and return. Each one costs a member list plus a merge proposal, so this is the dominant term in the response size. | |
| member_limit | No | Sample members returned per cluster. A cluster's true size always comes back in `total`; `truncated` says whether any members were dropped. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||