Skip to main content
Glama

kmeans_step

Compute one k-means iteration: distance table, point assignments, updated centres, and quality measures from input points and centres.

Instructions

k-means: distance table, assignments, new centres (and quality measures). Ties go to the first centre.

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": {
      "points": "<points>",
      "centres": "<centres>"
    },
    "name": "kmeans_step"
  }
}

Input Schema

NameRequiredDescriptionDefault
namesNo
metricNoeuclidean
pointsYes
centresYes
max_iterationsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.9/5.0
Behavior3/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 usefully discloses tie-breaking behavior and the outputs produced, but it does not state that this is a single k-means iteration, how metric or max_iterations affect behavior, or whether the operation has any side effects.

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 description is a single compact sentence with no obvious filler. It is slightly list-like and not front-loaded with a verb, and the parenthetical 'and quality measures' is vague, but overall it is efficiently structured.

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

Completeness2/5

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

The presence of an output schema reduces the need to explain return values, but the tool still has five inputs with 0% schema description coverage and no annotations. The description does not explain key inputs such as metric choices, iteration behavior, or how names are used, leaving important context missing.

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

Parameters2/5

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

Schema description coverage is 0% and there are five parameters, so the description should compensate for the undocumented schema. It adds only indirect meaning for 'centres' through the tie rule; it says nothing about 'names,' 'metric,' 'max_iterations,' or the dimensional expectations for 'points' and 'centres.'

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 identifies the domain as 'k-means' and enumerates the artifacts produced: 'distance table, assignments, new centres (and quality measures).' It is specific enough to distinguish this from unrelated algorithm-step siblings, though it lacks an explicit action verb such as 'compute' or 'run one iteration.'

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?

There is no guidance about when to use this tool, when not to use it, or how it relates to alternatives such as other algorithm-step tools. The only behavioral instruction is 'Ties go to the first centre,' which is not usage guidance.

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