Skip to main content
Glama

x420_geo_distance

Calculate great-circle distance and initial bearing between two coordinates, returning kilometers, miles, nautical miles, meters, bearing degrees, and compass direction.

Instructions

Distance and bearing: Great-circle distance (km, mi, nmi, m) and initial bearing between two coordinates. Pure computation. Not professional, legal, insurance, engineering, medical, financial or tax advice. PAID: $0.01 USDC per call, settled on Base via x402 from the wallet in X420_MCP_WALLET_PRIVATE_KEY (real money). Returns: JSON: km, mi, nmi, m, bearing_deg, compass - the deliverable plus X420's signed receipt and the settlement transaction. Example input: {"lat1":"32.7357","lon1":"-97.1081","lat2":"32.7767","lon2":"-96.797"}.

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": "x420_geo_distance"
  }
}

Input Schema

NameRequiredDescriptionDefault
lat1Yesorigin latitude
lat2Yesdestination latitude
lon1Yesorigin longitude
lon2Yesdestination longitude

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.2/5.0
Behavior4/5

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

Adds substantial context beyond annotations: a $0.01 USDC charge settled on Base via x402 drawn from X420_MCP_WALLET_PRIVATE_KEY, flagged as real money, plus the return payload including a signed receipt and settlement transaction. This actually explains the readOnlyHint=false (monetary settlement is a side effect) rather than contradicting it. Gaps remain around failure/refund behavior and any rate limits.

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?

Front-loaded with what the tool computes and the units returned, then cost, then return shape, then an example. The legal/advice disclaimer is boilerplate but brief, and no sentence is redundant given the payment model must be disclosed.

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

Completeness4/5

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

With no output schema, the description compensates by listing the returned JSON fields (km, mi, nmi, m, bearing_deg, compass) and noting the receipt and settlement transaction. For a four-parameter pure-computation tool this is nearly complete; only the coordinate reference system and failure semantics are 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 coverage is 100%, so the baseline is 3, and the description goes beyond by supplying a concrete example input showing the coordinates must be decimal-degree strings. It still does not state the assumed coordinate reference system (WGS84) or valid ranges, which would have justified a 5.

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?

Opens with a specific verb+resource pair — great-circle distance plus initial bearing between two coordinates — and enumerates the output units (km, mi, nmi, m). The phrase 'between two coordinates' and 'Pure computation' clearly separate it from sibling tools like x420_geo_geocode or x420_geo_elevation that fetch external data.

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?

'Pure computation' implies when the tool applies (you already hold both coordinate pairs), and the example input reinforces that shape. However, it never states when to prefer this over geocoding a pair of addresses first, gives no error/precondition guidance, and names no alternatives explicitly, so usage context is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.