Skip to main content
Glama

distance_bearing

Computes geodesic distance and bearings between two WGS84 coordinates for accurate distance and direction answers, avoiding memory-based estimates.

Instructions

Geodesic distance in km and bearings in degrees from point 1 to point 2 (WGS84).

Use this for every distance or bearing question. Never estimate a distance from memory. Get the coordinates from geocode first.

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_bearing"
  }
}

Input Schema

NameRequiredDescriptionDefault
lat1Yes
lat2Yes
lon1Yes
lon2Yes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the method (geodesic), units, and WGS84 datum, which is real behavioral value. However, it omits the bearing convention (initial vs final, clockwise-from-north) and the precision/earth-model assumptions, which materially change the returned numbers. Adequate but leaves the most ambiguous output semantics unexplained.

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?

Three short sentences with no filler; the capability statement is front-loaded and the constraints follow in priority order. Every sentence carries actionable information.

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

Completeness3/5

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

There is no output schema and no annotations, so the description must explain return values; it does name the two returned quantities and their units, which is the essential part. It still leaves the output shape (field names, single value vs pair of bearings) and the bearing convention unspecified, which is a gap for a tool whose entire value is precise numeric output.

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 all four parameters arrive as bare titles (Lat1, Lon1, Lat2, Lon2). The description adds ordering semantics by saying the values are "from point 1 to point 2" and implies decimal degrees via the WGS84 reference, but never states the expected coordinate format or units for the inputs. It partially compensates for the coverage gap rather than fully closing it.

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 computation (geodesic distance) plus a second derived quantity (bearings), names the units (km, degrees) and the datum (WGS84), and identifies the two input points. This is clearly distinct from geocode, features_within, point_in_polygon and nearest_features without needing to open any schema.

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?

"Use this for every distance or bearing question. Never estimate a distance from memory. Get the coordinates from geocode first." gives an explicit trigger and a prerequisite step ordering, which is strong guidance. It stops short of stating when a sibling such as nearest_features is the better choice, so it is clear context without full exclusion rules.

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