Skip to main content
Glama

ai_cluster

Read-only

Cluster and de-duplicate texts — Group 3-100 short texts by meaning (support tickets, reviews, survey answers, search queries, headlines). items= separated by | or newlines. Embeds with bge-base-en-v1.5, then average-linkage clustering: threshold= (default 0.75; lower = broader groups) or k= for an exact number of groups. Returns clusters sorted by size with exemplar (most central item), cohesion, keywords and members ranked by similarity, outliers, near-duplicate pairs (dup_threshold= default 0.95) and uniqueIndexes for de-duplication. labels=1 adds a short AI-written name per cluster. Price: $0.006 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "items": "<items>"
    },
    "name": "ai_cluster"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesrefund not received|where is my refund|charged twice, need refund|app crashes on login|cannot log in after update|love the new dark mode

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true/openWorldHint=true/destructiveHint=false, and the description still layers on genuinely new behavior: the embedding model (bge-base-en-v1.5), the average-linkage algorithm, sort order, the exact fields returned (exemplar, cohesion, keywords, ranked members, outliers, near-duplicate pairs, uniqueIndexes), and the $0.006 USDC x402 charge. Cost and payment rail are the kind of detail an agent cannot get from annotations and would otherwise trip on.

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?

Information is front-loaded: operation, input format, method, then tuning knobs, then return shape, then price. It is a dense single paragraph, and the return-field enumeration plus pricing make it longer than strictly needed, but nearly every clause carries operational value.

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

Completeness5/5

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

There is no output schema, so the description carries the return contract itself and does so fully — clusters sorted by size, exemplar, cohesion, keywords, ranked members, outliers, duplicate pairs, uniqueIndexes. Combined with the cost note and model/algorithm disclosure, an agent has everything needed to call this and interpret the result.

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% but the single `items` property is documented only by a bare example string; the description supplies the essential delimiter format ('separated by | or newlines') and the 3–100 size bound, which the schema does not. It also defines threshold/k/dup_threshold/labels semantics — though those parameters are absent from the supplied schema, which makes the description richer than the contract it accompanies.

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 opens with a specific verb phrase — 'Cluster and de-duplicate texts' — and immediately bounds the input ('Group 3-100 short texts by meaning') with concrete example domains. That is enough for an agent to separate it from sibling embedding or classification tools without opening a schema.

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 names the use-case contexts (support tickets, reviews, survey answers, search queries, headlines) and gives an explicit decision rule for the two grouping modes: threshold= for broader groups versus k= for an exact number of groups. What it lacks is any statement of when NOT to use it, or which sibling (e.g. ai_classify, ai_embed) to pick instead when clustering is the wrong operation.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources