Skip to main content
Glama

BRAINIAC Route & Delivery Optimisation

Balanced territory clustering

route-optimization_territory-cluster
Read-onlyIdempotent

Split stops into k balanced, compact territories with capacitated k-means and imbalance limits. Price $0.03 USDC. POST /api/v1/route-optimization/territory-cluster. An unpaid call returns the x402 payment terms and does not run.

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": {
      "stops": "<stops>",
      "k": "<k>"
    },
    "name": "route-optimization_territory-cluster"
  }
}

Input Schema

NameRequiredDescriptionDefault
kYesk, integer, from 1 to 500. Required.
seedNoseed, integer, from -9007199254740991 to 9007199254740991. Optional.
stopsYesstops, array. Required.
balanceByNobalanceBy, string, one of count, weight. Optional.
maxImbalanceNomaxImbalance, number, from 0 to 1. Optional.
matrixFromPointsNomatrixFromPoints, string, one of euclidean, haversine. Optional.

Output Schema

NameRequiredDescriptionDefault
sourcesNosources. Array.
imbalanceNoimbalance. Number.
withinSseNowithinSse. Number.
limitationsNolimitations. Array.
territoriesNoterritories. Array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent and non-destructive behavior, so the description only needs to add context — and it does: a $0.03 USDC price, the x402 payment flow, and the fact that an unpaid invocation returns terms instead of running. It stops short of noting determinism from 'seed' or rate/limit behavior, but the payment semantics are the valuable part.

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?

Four short, front-loaded sentences with the core operation first, then price, endpoint, and payment-failure behavior. Nothing is padded, though the endpoint string and price sit mid-paragraph rather than being signaled as operational facts.

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?

An output schema exists and the schema documents all six parameters, so the description needn't explain return values. It covers the two things structured fields cannot: algorithmic approach and the paid-call gate. Only the absence of sibling routing keeps it from being fully complete.

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 description coverage is 100%, so every parameter already carries its own description and baseline is 3. The phrase 'capacitated k-means' and 'imbalance limits' lightly gestures at weight, balanceBy and maxImbalance, but no format or constraint detail is added beyond the schema.

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 and resource: 'split stops into k balanced, compact territories' via capacitated k-means with imbalance limits. That is clear enough to distinguish it from the TSP/VRP siblings, though it never names an alternative for the agent to compare against.

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?

There is no explicit when-to-use or when-not-to-use guidance relative to route-optimization_vrp-capacitated or route-optimization_multi-day-plan. Usage is only implied by the clustering vocabulary plus the note that an unpaid call returns payment terms and does not run, which tells the agent how a call will be answered but not when this tool is the right pick.

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