Skip to main content
Glama

cluster_memories

Cluster related memories by similarity to organize information, or find duplicate pairs to reduce redundancy. Provides scores and suggested actions.

Instructions

Cluster similar memories or find duplicates.

Args: strategy: Clustering strategy (default "similarity"). threshold: Similarity threshold (0.0-1.0, uses config default if None). max_cluster_size: Max cluster size (1-100, uses config default if None). find_duplicates: Find duplicate pairs instead of clustering. duplicate_threshold: Duplicate threshold (0.0-1.0, uses config default if None).

Returns: Dict with clusters or duplicates list, scores, suggested_action.

Raises: ValueError: Invalid threshold or max_cluster_size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
strategyNosimilarity
thresholdNo
find_duplicatesNo
max_cluster_sizeNo
duplicate_thresholdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A3.6/5.0
Behavior3/5

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

The description provides useful behavioral detail beyond the schema: it returns clusters or duplicates with scores and a `suggested_action`, and it raises `ValueError` for invalid thresholds or cluster sizes. However, with no annotations provided, the description should also make clear whether this operation mutates or persists memories; it currently does not disclose side effects or read-only behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and efficiently front-loaded with the core purpose, followed by compact Args, Returns, and Raises sections. There is no filler or redundant restating of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers arguments, return shape, and errors, and an output schema exists. But it still leaves important context unspecified: whether the operation is read-only, what relationship it has to `consolidate_memories`, and what valid `strategy` values are. For an unannotated tool with five configurable parameters, these omissions prevent full self-sufficiency.

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?

The Args section compensates strongly for the 0% schema description coverage by documenting defaults, numeric ranges, `None` behavior, and the `find_duplicates` mode toggle for most parameters. The main gap is `strategy`, which is only described as 'Clustering strategy (default "similarity")' with no allowed strategy values, so an agent cannot confidently select a non-default strategy.

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 first line clearly identifies the action and resource: 'Cluster similar memories or find duplicates.' This is specific and understandable, and the duplicate-finding mode gives extra identity. However, it does not explicitly differentiate itself from the sibling `consolidate_memories`, leaving some distinction to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied: call this tool when memories need clustering or duplicate detection, with `find_duplicates` switching the mode and config defaults controlling thresholds. But there is no explicit guidance about when to prefer this tool over related alternatives like `consolidate_memories`, `search_memory`, or `analyze_for_recall`.

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