Skip to main content
Glama

kmeans_cluster

Partition numeric vectors into k clusters using k-means to group similar data points for analysis or segmentation.

Instructions

Partition points into k clusters using the k-means algorithm.

Input Schema

NameRequiredDescriptionDefault
kNoNumber of clusters (default 3)
pointsYesArray of numeric vectors (all same dimension)
max_iterationsNoMax iterations (default 100)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It does not disclose that k-means is sensitive to initialization, whether results are deterministic, how convergence/tie-breaking works, or what the output shape is. For an algorithmic tool this leaves meaningful behavioral gaps.

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?

A single tight sentence that front-loads the action and resource with zero filler. Nothing extraneous.

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 is adequate for a simple mathematical tool with full param coverage, but with no output schema and no annotations it omits the return format (cluster labels vs. centroids) that an agent would need to chain results correctly.

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

Parameters3/5

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

Schema coverage is 100%, with k, points, and max_iterations each documented including defaults, so the schema already does the heavy lifting. The description adds nothing beyond what the schema provides, making the baseline 3 appropriate.

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?

States a specific verb (partition), resource (points), and method (k-means), so the agent knows exactly what computation occurs. No sibling differentiation is needed since no other clustering tool exists in the sibling list, which keeps it just short of 5.

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

Usage Guidelines2/5

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

The description contains no when-to-use guidance, no prerequisites, and no mention of alternatives or constraints. It states only what the tool does, leaving the agent to infer the triggering context on its own.

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