Skip to main content
Glama

geometry.haversine

Read-onlyIdempotent

Calculate the great-circle distance in kilometers between two Earth coordinates using the Haversine formula, with decimal degree latitude/longitude inputs and an adjustable Earth radius.

Instructions

하버사인 공식으로 두 지점의 지구 표면 대원 거리(km)를 계산한다. 위도(-9090)와 경도(-180180)는 도 단위 Decimal 문자열이고 지구 반지름 기본값은 6371km 다. mpmath 50자리 계산 후 유효숫자 30자리로 반환한다. 구면 근사이므로 실제 도로 거리나 타원체 거리와 다르며 라디안을 넣으면 안 된다.

Input Schema

NameRequiredDescriptionDefault
lat1Yes
lat2Yes
lon1Yes
lon2Yes
earth_radius_kmNo6371

Output Schema

NameRequiredDescriptionDefault
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)
distance_kmYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/closed-world, and the description adds genuinely new behavior: 50-digit mpmath internal computation with 30-significant-digit output, and the spherical-approximation accuracy caveat. Missing only error behavior for out-of-range coordinates.

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?

Four compact sentences: purpose first, then input format and defaults, then precision, then accuracy caveat. Nothing is redundant and the most decision-critical information is front-loaded.

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?

An output schema exists, so return-value documentation is not required, yet the description still usefully states the returned precision. Combined with the input-format and accuracy notes, an agent has everything needed to invoke it correctly; only error/edge-case handling is unstated.

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 0% and all five parameters are bare strings, so the description carries the full burden — and it does: latitude range (-90 to 90), longitude range (-180 to 180), decimal-degree string format, and the earth radius default of 6371 km. It does not clarify lat1/lat2 or lon1/lon2 pairing, but the naming is self-evident.

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 (compute great-circle distance between two points via the haversine formula) plus the output unit (km). This is unambiguous against the other geometry siblings, which are all area/volume/matrix/vector operations with no competing distance tool.

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?

Provides domain exclusions: it is a spherical approximation, so it is not suitable when road distance or ellipsoidal distance is required, and radians must not be supplied. It does not, however, name any alternative tool or state preconditions for choosing this over other computations.

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

Deploy Server

Other Tools