Skip to main content
Glama
Pseudogiant-xr

PseudoLife-MCP

Official

memory_consolidation_candidates

Read-only

Find clusters of near-duplicate memories to consolidate, then synthesize a canonical note and commit it by entry IDs.

Instructions

Find clusters of near-duplicate memories ripe for consolidation — the same thing phrased five ways across five sessions. Anchor with a query or an episode; read the clusters, synthesise one canonical note, then commit it via memory_consolidate.

Each member carries its id; commit with memory_consolidate(entry_ids=[...]) rather than the members' texts — IDs survive rewording and duplicate phrasing, exact text does not.

Returns: {count, clusters: [{cohesion, size, members}]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoConsider only entries carrying one of these tags.
queryNoTopic-driven anchor: cluster memories near this description.
top_kNoHow many candidate entries to cluster over.
episodeNoSession-driven anchor: cluster within this episode id.
sourcesNoConsider only entries with one of these source tags.
max_clustersNoMax clusters returned.
min_cohesionNoMinimum intra-cluster cosine — raise it to flag only near-duplicates.
min_cluster_sizeNoDrop clusters with fewer members than this.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.15.0
    • addedInput schema / properties / episode / description
      Added value: +"Session-driven anchor: cluster within this episode id."
    • addedInput schema / properties / max_clusters / description
      Added value: +"Max clusters returned."
    • addedInput schema / properties / min_cluster_size / description
      Added value: +"Drop clusters with fewer members than this."
    • addedInput schema / properties / min_cohesion / description
      Added value: +"Minimum intra-cluster cosine — raise it to flag only near-duplicates."
    • addedInput schema / properties / query / description
      Added value: +"Topic-driven anchor: cluster memories near this description."
    • addedInput schema / properties / sources / description
      Added value: +"Consider only entries with one of these source tags."
    • addedInput schema / properties / tags / description
      Added value: +"Consider only entries carrying one of these tags."
    • addedInput schema / properties / top_k / description
      Added value: +"How many candidate entries to cluster over."
  2. First observedv0.11.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds genuine context beyond that: the commit path must use member IDs rather than texts, with the rationale that 'IDs survive rewording and duplicate phrasing, exact text does not.' It also surfaces the anchor requirement, which the annotations do not.

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 definition is front-loaded with the core purpose and follows with the workflow, ID guidance, and return shape. Every sentence is substantive. The 'Returns:' line is mildly redundant given an output schema exists, which keeps it from a 5.

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?

With annotations covering read-only safety and an output schema documenting the return shape, the description only needs to convey purpose, workflow, and the commit handoff. It does all three. A richer treatment of how clusters are ranked or how many to expect might push it higher, but nothing essential is missing.

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 is 3. The description adds meaning beyond the schema by requiring the caller to 'anchor with a query or an episode' — the schema shows both as optional and defaulting to null, so this either/or constraint is real added guidance. The rest of the parameter description is redundant with the schema.

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 states a specific verb and resource — 'Find clusters of near-duplicate memories ripe for consolidation' — with a concrete example ('the same thing phrased five ways across five sessions'). It distinguishes this step from the commit step by naming memory_consolidate as the follow-up, though it doesn't contrast directly with general search siblings like memory_search or memory_recall.

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 an explicit workflow: anchor with a query or an episode, read the clusters, synthesise one canonical note, then commit via memory_consolidate. That names the next tool and the condition for using this one. It stops short of saying when NOT to use this tool versus a plain search, so it falls just short of a 5.

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