Skip to main content
Glama

The great-circle distance between two points in km

distance
Read-only

The great-circle distance between two points in km and miles, the initial bearing and the midpoint. Each point is a lat,lon pair or a place name (geocoded with OpenStreetMap data, ODbL). Straight-line distance only, not a route. Takes about 13 s; allow a 30 s timeout. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.

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": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "distance"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYeslat,lon or a place name
fromYeslat,lon or a place name

Output Schema

NameRequiredDescriptionDefault
toNo
fromNo
sourceNo
midpointNo
checkedAtNo
distanceKmNo
distanceMilesNo
initialBearingDegNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond readOnlyHint/openWorldHint: it discloses that place names are geocoded via OpenStreetMap (ODbL), that latency is roughly 13 s with a 30 s timeout budget, and that payment is $0.002 per successful call via x402 USDC across multiple networks with failures not charged. Credits, cost, and timeout behavior are exactly the operational facts an agent needs before calling an open-world paid endpoint.

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?

Front-loads what is computed and what is returned, then layers input format, the route caveat, latency, and pricing in a logical order with no filler sentences. It is a single dense paragraph whose payment clause ('10 more networks') is slightly wordy but each element earns its place.

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 two-parameter tool with a full output schema, the description covers everything that matters: computation semantics, input formats, geocoding source, latency and timeout, and cost/payment mechanics. Return values need not be re-explained because the output schema exists, and the remaining gaps are trivial.

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 coverage is 100% and both parameters already carry the 'lat,lon or a place name' description, so the schema does the heavy lifting. The description adds only the geocoding source and license for place-name resolution, which is modest added meaning over the schema.

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?

States a specific verb-and-resource combination up front ('great-circle distance between two points') and enumerates what is returned: km, miles, initial bearing, midpoint. Its 'Straight-line distance only, not a route' clause cleanly separates it from any routing tool, so an agent can pick it without inspecting siblings.

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

Usage Guidelines4/5

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

'Straight-line distance only, not a route' is an explicit exclusion that prevents misuse for routing questions, and the accepted input formats are spelled out. It lacks a named alternative for when a route is actually needed and gives no guidance on which of two interchangeable point-input styles to prefer, so it stops short of full when/when-not guidance.

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