Skip to main content
Glama

Location Toolkit (DIGIPIN, Plus Codes, PIN codes)

Distance and direction between two places given as coordinates, DIGIPIN, Plus Code or Indian PIN code

distance_between

Great-circle distance (km and miles) and compass bearing between two points. Each point can be {lat,lng}, "13.08,80.27", a DIGIPIN, a Plus Code or a 6-digit Indian PIN code. Price 0.001 USDC per call; first 3 calls per day free.

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

Input Schema

NameRequiredDescriptionDefault
toYesEnd point, same formats
fromYesStart point: "lat,lng", DIGIPIN, Plus Code or Indian PIN (or an object {lat,lng})
paymentNoOptional x402 payment (base64 X-PAYMENT header value). Not needed while the free daily sample lasts.

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?

With no annotations, the description carries the full burden and does disclose the commercially important behavior: 0.001 USDC per call with the first 3 calls per day free, and that the payment parameter is unnecessary during the free sample. It also names the returned quantities (km, miles, bearing). It does not say what happens when a PIN is ambiguous or a point cannot be geocoded.

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?

Two sentences: the operation and return values come first, input formats second, pricing last. No filler, and the most decision-relevant clause 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?

With no output schema, the description correctly summarizes what is returned (distance in km and miles, compass bearing) and covers the cost model. Only failure modes for unresolvable codes or weak matches are left unaddressed, which is a minor gap for a two-required-parameter read-only computation.

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%, so from/to are already documented in the schema. The description's format list ({lat,lng}, "13.08,80.27", DIGIPIN, Plus Code, 6-digit Indian PIN) largely restates that, though it usefully confirms both endpoints accept the same set. Baseline 3 applies.

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+resource: great-circle distance and compass bearing between two points, plus the supported input formats. It is clearly distinct from the sibling lookup tools (location_code, india_pincode_lookup, reverse_lookup), which resolve codes rather than compute geometry.

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?

The description implies when to use it by defining the operation and the accepted coordinate encodings, but it never states alternatives or exclusions — e.g. it does not say whether to resolve a PIN via india_pincode_lookup first or whether this tool handles that internally. Usage is inferable but not guided.

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