Skip to main content
Glama
grandMA2 MCP
by drohi-r

recluster_tools

Run the full ML pipeline to re-cluster all MCP tools: extract features, embed docstrings, apply K-Means, and rebuild the taxonomy with silhouette-based cluster selection.

Instructions

Trigger re-clustering of all MCP tools (SAFE_READ).

Runs the full ML pipeline: extract features from tool definitions,
embed docstrings, cluster via K-Means, and regenerate the taxonomy.

Args:
    provider: Embedding provider — "zero" (fast stub) or "github"
              (real embeddings, requires GITHUB_MODELS_TOKEN).
    k: Override number of clusters.  None = auto-select via silhouette.
    alpha: Structural feature weight (0–1). Embedding weight = 1 − alpha.

Returns:
    str: JSON summary with categories, silhouette score, and tool assignments.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "recluster_tools"
  }
}

Input Schema

NameRequiredDescriptionDefault
kNo
alphaNo
providerNozero

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does real work here — declaring SAFE_READ, disclosing the four pipeline stages, and flagging that the 'github' provider requires GITHUB_MODELS_TOKEN — but it never says whether existing cluster labels/assignments are overwritten, how long the run takes, or whether it is idempotent, which matters for a whole-corpus operation.

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?

Front-loaded with purpose, then structured Args/Returns sections; each line adds information. The docstring formatting and the enumerated pipeline are slightly verbose for what they convey, but nothing is wasted padding.

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?

For a tool with three optional parameters, an output schema, and moderate pipeline complexity, the definition is nearly complete: invocation path, provider tradeoffs, and return content are all covered. The remaining gap is the side-effect story — what happens to the previously existing taxonomy and cluster assignments.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description fully compensates: provider documents both allowed values plus the token prerequisite, k explains that None triggers silhouette-based auto-selection, and alpha is given a 0–1 range with the explicit relationship 'Embedding weight = 1 − alpha'. This is meaning the schema alone does not convey.

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 first line names a specific verb ('Trigger re-clustering') and a precise resource ('all MCP tools'), then enumerates the concrete pipeline stages (feature extraction, docstring embedding, K-Means, taxonomy regeneration). An agent knows exactly what happens when it is invoked, with no ambiguity about scope.

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 rather than stated: regenerating the taxonomy after tool changes is the obvious trigger, and the provider argument hints at a fast-vs-real tradeoff. There is no explicit 'use this when' / 'do not use when' and no named alternative for lighter-weight clustering or lookups.

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

Deploy Server

Other Tools