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.

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

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources