Skip to main content
Glama

Order points into a shortest tour

route_optimizer
Read-onlyIdempotent

Order 2–256 points from index 0 using planar or spherical kilometre distances. Exact only after completed Held–Karp search (at most 13 points); otherwise bounded heuristics. Returns every leg and stop reason. No roads or traffic.

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": {
      "metric": "<metric>",
      "points": "<points>"
    },
    "name": "route_optimizer"
  }
}

Input Schema

NameRequiredDescriptionDefault
metricYes
pointsYes
time_budget_msNo
return_to_startNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "contract_version": {
      -      "const": "0.1.0",
      -      "type": "string"
      -    },
      -    "elapsed_ms": {
      -      "minimum": 0,
      -      "type": "number"
      -    },
      -    "exact": {
      -      "type": "boolean"
      -    },
      -    "greedy_reference_km": {
      -      "anyOf": [
      -        {
      -          "minimum": 0,
      -          "type": "number"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "improvement_vs_greedy_pct": {
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "limitations": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "method": {
      -      "enum": [
      -        "held_karp_exact",
      -        "nearest_neighbor_2opt",
      -        "nearest_neighbor"
      -      ],
      -      "type": "string"
      -    },
      -    "metric": {
      -      "enum": [
      -        "euclidean_km",
      -        "great_circle_km"
      -      ],
      -      "type": "string"
      -    },
      -    "order": {
      -      "items": {
      -        "maximum": 255,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "maxItems": 256,
      -      "minItems": 2,
      -      "type": "array"
      -    },
      -    "points": {
      -      "maximum": 256,
      -      "minimum": 2,
      -      "type": "integer"
      -    },
      -    "provenance": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "client": {
      -          "additionalProperties": {},
      -          "properties": {
      -            "name": {
      -              "type": "string"
      -            },
      -            "version": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "name",
      -            "version"
      -          ],
      -          "type": "object"
      -        },
      -        "identity_source": {
      -          "type": "string"
      -        },
      -        "model": {
      -          "type": "null"
      -        },
      -        "server": {
      -          "const": "scorecompute",
      -          "type": "string"
      -        },
      -        "tool": {
      -          "const": "route_optimizer",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "tool",
      -        "server",
      -        "client",
      -        "identity_source",
      -        "model"
      -      ],
      -      "type": "object"
      -    },
      -    "return_to_start": {
      -      "type": "boolean"
      -    },
      -    "stop_reason": {
      -      "enum": [
      -        "exact_search_completed",
      -        "heuristic_converged",
      -        "time_budget_exhausted",
      -        "work_limit_exhausted"
      -      ],
      -      "type": "string"
      -    },
      -    "total_distance_km": {
      -      "minimum": 0,
      -      "type": "number"
      -    },
      -    "tour_legs": {
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "distance_km": {
      -            "minimum": 0,
      -            "type": "number"
      -          },
      -          "from_index": {
      -            "maximum": 255,
      -            "minimum": 0,
      -            "type": "integer"
      -          },
      -          "to_index": {
      -            "maximum": 255,
      -            "minimum": 0,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "from_index",
      -          "to_index",
      -          "distance_km"
      -        ],
      -        "type": "object"
      -      },
      -      "maxItems": 256,
      -      "minItems": 1,
      -      "type": "array"
      -    },
      -    "unit": {
      -      "const": "km",
      -      "type": "string"
      -    },
      -    "upper_bound_km": {
      -      "minimum": 0,
      -      "type": "number"
      -    },
      -    "work_limit": {
      -      "exclusiveMinimum": 0,
      -      "maximum": 9007199254740991,
      -      "type": "integer"
      -    },
      -    "work_units": {
      -      "maximum": 9007199254740991,
      -      "minimum": 0,
      -      "type": "integer"
      -    }
      -  },
      -  "required": [
      -    "contract_version",
      -    "metric",
      -    "unit",
      -    "points",
      -    "return_to_start",
      -    "order",
      -    "tour_legs",
      -    "total_distance_km",
      -    "upper_bound_km",
      -    "exact",
      -    "method",
      -    "stop_reason",
      -    "greedy_reference_km",
      -    "improvement_vs_greedy_pct",
      -    "work_units",
      -    "work_limit",
      -    "elapsed_ms",
      -    "limitations",
      -    "provenance"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Added

TDQS

A4/5.0
Behavior5/5

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

Beyond the read-only and idempotent annotations, the description adds important behavioral limits: exactness is guaranteed only after a completed Held–Karp search for at most 13 points, otherwise heuristics are used. It also discloses that every leg and stop reason is returned and that roads and traffic are not considered, which is meaningful context for interpreting results.

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?

The description is compact and front-loaded: it states the primary operation first, then constraints, exactness limits, return behavior, and domain exclusions. Every sentence adds useful information without repetition.

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 four-parameter optimizer with no output schema and rich annotations, the description is largely complete: it covers the core purpose, point limits, metric options, exactness boundary, and return behavior. It is slightly incomplete because time_budget_ms and return_to_start are not discussed, and no sibling alternatives are mentioned.

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 0%, so the description must carry parameter meaning. It explains the points constraint (2–256, indexed from 0) and the metric choice (planar or spherical kilometre distances), but it does not explain time_budget_ms or return_to_start, leaving two parameters without semantic guidance beyond their names and schema defaults.

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 states a specific verb and resource: ordering a bounded set of points into a shortest tour using planar or spherical kilometre distances. It is clear about the operation and its geometric scope, but it does not explicitly distinguish itself from sibling tools such as tour_profile.

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 by the description: this is for ordering points into a shortest tour with Euclidean or great-circle distances, not road routing. However, it gives no explicit when-to-use or when-not-to-use guidance and does not name alternatives for related tasks.

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