Skip to main content
Glama

Moltline Optimize

Route Plan

route_plan
Read-onlyIdempotent

Order up to 12 stops into the shortest single-vehicle route on your distance matrix. FREE.

Typical input {"stops": [{"id": "depot"}, {"id": "A"}, {"id": "B"}], "matrix": [[0, 5, 9], [5, 0, 4], [9, 4, 0]]} returns {"routes": [{"vehicle": 0, "stops": [...], "distance": 18.0}], "total_distance": 18.0, "solver_status": "OPTIMAL"}. The matrix is in your units (km, minutes, cost) and must be square with the depot at index 0 unless depot says otherwise; optional demand per stop with vehicle_capacity turns it into a capacity check. Use for one driver's day or a courier's loop. Not for several vehicles or time windows: use route_plan_fleet. Not a map service: bring your own distances or call distance_matrix_haversine for straight-line values. Errors: on invalid, missing, or malformed input this tool never raises a protocol error; it returns {"error": ""} (for example {"error": "stops must be a list of stop objects, depot first"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

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>",
      "matrix": "<matrix>"
    },
    "name": "route_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
depotNoindex of the depot in stops (default 0).
stopsYeslist of stop objects, depot first: id, optional demand.
matrixYessquare distance (or time) matrix, row i column j = cost from stop i to stop j.
time_limit_sNosolver time budget in seconds (default 3, max 15).
vehicle_capacityNooptional capacity in the units of demand (0 = unlimited).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover readOnly/idempotent/non-destructive, and the description still adds substantive behavior: it never raises a protocol error on bad input, it returns a structured {"error": ...} message, and retries after correction are always safe. It also explains how optional demand plus vehicle_capacity changes the semantics into a capacity check, which annotations cannot convey.

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 core capability is front-loaded in sentence one, followed by a worked example, conventions, routing guidance, and error behavior in a logical order. The literal input/output example is somewhat redundant given a full input schema and an output schema, but it earns its space by fixing the mental model of the matrix layout.

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

Completeness5/5

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

For a 5-parameter optimization tool with a rich schema and an output schema, the description covers the remaining burden: units, depot convention, the demand/capacity interaction, the 12-stop limit, error shape, and retry safety. Nothing needed to call it correctly is missing.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, and the description does add meaning beyond it: the matrix is in caller-chosen units (km, minutes, cost), must be square with the depot at index 0 'unless depot says otherwise', and demand per stop only matters in combination with vehicle_capacity. Minor room remains on time_limit_s, which the schema already fully documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb ('Order'), resource ('stops'), and constraint set ('up to 12 stops', 'shortest single-vehicle route on your distance matrix'), which immediately separates it from route_plan_fleet and the other siblings. An agent knows exactly what computation this performs without opening the schema.

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

Usage Guidelines5/5

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

It names the positive case ('one driver's day or a courier's loop'), the exclusions ('Not for several vehicles or time windows: use route_plan_fleet'), and a boundary against non-alternatives ('Not a map service: bring your own distances or call distance_matrix_haversine'). Both when-to-use and when-not-to-use are stated with the specific sibling to pick instead.

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.