Skip to main content
Glama

Location Toolkit (DIGIPIN, Plus Codes, PIN codes)

Convert coordinates to DIGIPIN (India) and Plus Code (worldwide), or a code back to coordinates

location_code

Send lat+lng to get the Plus Code (Open Location Code, works everywhere, ~14 m square) and, inside India, the official India Post DIGIPIN (~4 m square). Or send any DIGIPIN or Plus Code as "code" to get its coordinates and cell bounds. Pure maths, exact to the official specs. Price 0.001 USDC per call; first 3 calls per day free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "location_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
latNoLatitude (-90..90). Use with lng.
lngNoLongitude (-180..180). Use with lat.
codeNoInstead of lat/lng: a DIGIPIN like 4P3-JK8-52C9 or a full Plus Code like 7J4VXH8P+2C
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.4/5.0
Behavior4/5

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

With no annotations, the description carries the load well: it discloses cost (0.001 USDC per call, first 3 calls per day free), that x402 payment is only needed after the free sample, cell precision (~14 m Plus Code, ~4 m DIGIPIN), and that the computation is deterministic ('Pure maths, exact to the official specs'), implying no side effects. What is missing is failure behavior — invalid code formats, out-of-range coordinates, or ambiguous mixed input.

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 sentences, front-loaded with the primary encode behavior, then the decode branch, then the cost/constraint note. Every sentence contributes distinct information with no restatement of the tool name.

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 must hint at returns, and it does — coordinates plus 'cell bounds' for decoding, and the two code formats for encoding. Given a four-parameter, no-annotation tool it is close to complete, falling short only on edge-case and error behavior.

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, but the description adds genuine mode semantics the schema only hints at: lat/lng is the encode path, code is the decode path, and it supplies concrete DIGIPIN and Plus Code format examples. It adds little about the payment parameter beyond what the schema already says.

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?

The description names the specific transformation in both directions (lat+lng to Plus Code/DIGIPIN, and code back to coordinates) and scopes each format geographically (DIGIPIN only inside India, Plus Code worldwide). This is concrete enough to separate it from address/postal siblings without opening the 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?

It gives clear usage modes: 'Send lat+lng to get...' for encoding and 'Or send any DIGIPIN or Plus Code as "code"' for decoding. What it does not state is what happens when both modes are supplied, or when neither is supplied given a zero-required-parameter schema — a real gap for a dual-mode tool, though the primary routing guidance is present.

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