Skip to main content
Glama

Moltline Optimize

Distance Matrix Haversine

distance_matrix_haversine
Read-onlyIdempotent

Straight-line (great-circle) distance matrix from coordinates. FREE.

Typical input {"points": [{"id": "depot", "lat": 51.5, "lon": -0.12}, {"id": "A", "lat": 51.52, "lon": -0.1}]} returns {"matrix": [[0, 2.6], [2.6, 0]], "unit": "km", "kind": "straight-line (haversine), not road distance"}. Use when you have no road matrix and a straight-line approximation is acceptable, or to sanity-check one. Not road routing: real driving distances are longer and the difference is not uniform. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "points must be a list of at least two objects"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitNokm (default) or mi.km
pointsYeslist of {id, lat, lon} (up to 200).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

The description goes well beyond the readOnlyHint/idempotentHint annotations by detailing the exact error behavior: 'it returns {"error": "<what is wrong and how to fix it>"}' and never raises a protocol error. It also explicitly states that every call is read-only, idempotent, and safe to retry, which adds actionable behavioral context not present in the annotations alone.

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?

Every sentence earns its place. The description uses a clear opening statement, a concrete example, usage guidance, exclusion from road routing, and error behavior. It is dense but well-organized and does not waste words.

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 tool with an output schema, the description still covers all necessary invocation details: input shape, example, units, limit, error responses, and retry safety. An agent has everything needed to select and call this tool correctly without additional inference.

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

Parameters5/5

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

Schema coverage is 100%, so all parameters are documented structurally. The description adds meaning by providing a complete typical input/output example, clarifying the points format ({id, lat, lon}), the unit options, the 200-point limit, and the shape of the returned matrix. This is far beyond the schema's minimal descriptions.

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 description opens with a precise statement: 'Straight-line (great-circle) distance matrix from coordinates,' which clearly identifies the computation and resource. It further distinguishes itself from road routing by stating 'Not road routing: real driving distances are longer.' This makes it unmistakable relative to sibling tools like route_plan.

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?

Explicit guidance is provided: 'Use when you have no road matrix and a straight-line approximation is acceptable, or to sanity-check one.' It also states what the tool is not for: 'Not road routing.' This gives an agent clear selection criteria among the sibling tools.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each solver targets a distinct optimization domain (cutting, packing, routing, knapsack, rostering), and scale variants like pack_bins/pack_bins_large and route_plan/route_plan_fleet are explicitly differentiated by size/scope. Helper and meta tools (distance_matrix_haversine, validate_problem, explain_solution) are clearly separate from solve tools.

Naming Consistency4/5

Names are uniformly lowercase snake_case and organized into recognizable families such as cutting_stock_1d/2d, pack_bins/pack_bins_large, and route_plan/route_plan_fleet. The pattern is not strictly verb_object throughout—knapsack_select and distance_matrix_haversine are noun-first or descriptive—so there is minor inconsistency.

Tool Count5/5

With 11 tools, the server is well-scoped for an optimization toolkit: one core solver per problem type, a large-scale packer variant, a distance-matrix helper, and validation/explanation tools. Each tool has a clear role, and the count supports broad coverage without becoming bloated.

Completeness4/5

The server covers a complete solve-validate-explain workflow across major OR problem types—cutting, packing, routing, knapsack, and rostering. Minor gaps exist, such as pack_bins_large not being listed as recognized by explain_solution, and some features are explicitly documented exclusions rather than missing functionality.

Resources