Skip to main content
Glama

Lookup Kit

distance

Read-only

Distance calculator between coordinates, haversine distance (km, miles). Great-circle distance between two points given as latitude and longitude (decimal degrees): kilometres, miles, nautical miles, plus the starting compass bearing and the midpoint. Price: $0.001 per call (x402, USDC on Base).

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": {
      "lat1": "<lat1>",
      "lon1": "<lon1>",
      "lat2": "<lat2>",
      "lon2": "<lon2>"
    },
    "name": "distance"
  }
}

Input Schema

NameRequiredDescriptionDefault
lat1Yes
lat2Yes
lon1Yes
lon2Yes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=false), and the description adds context an agent genuinely needs beyond that: the per-call price and the payment mechanism ($0.001, x402/USDC on Base). It also discloses the full return set, which is valuable since there is no output schema. It does not discuss rounding precision, error behavior for identical points, or payment failure handling.

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?

Effectively two compact sentences with no filler: the core function and input form come first, then the outputs, then the cost. Pricing is appended at the end where it is easy to find without disrupting the purpose statement.

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 simple four-number pure computation with no output schema, the description covers inputs (units, format), the algorithm, every returned value, and the commercial terms. Nothing an agent needs in order to invoke it correctly is missing.

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 carries the burden; it does specify that coordinates are latitude/longitude in decimal degrees and pairs them semantically with the tool. However it does not clarify which point is the origin vs destination (relevant because bearing is directional), and the required/optional status and valid ranges must be read from 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 ('distance calculator between coordinates') and immediately names the algorithm (haversine / great-circle) and the exact input form (latitude and longitude in decimal degrees). It also enumerates the returns: km, miles, nautical miles, starting bearing, midpoint, so an agent knows precisely what it gets.

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 single-purpose nature of the tool — you call it when you have two coordinate pairs and want a great-circle distance. There is no explicit when-to-use/when-not framing and no alternatives named, though the sibling list contains no obvious competing distance tool, so the practical gap is small.

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