Skip to main content
Glama

Duo Data Utilities: IBAN, VAT, ISIN Validation API

Geohash encoder and decoder with neighbour cells

geohash_encode_decode
Read-onlyIdempotent

Geohash encoder and decoder: encode a WGS-84 latitude and longitude to a geohash at a chosen precision, or decode a geohash back to its bounding box, centre point and error bounds in metres. Encoding also returns the eight neighbouring cells, which is what a caller needs to do proximity search over a geohash-indexed store without a spatial database. Price: $0.05 per successful call, paid over x402 (USDC on Base).

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

Input Schema

NameRequiredDescriptionDefault
opNoencode (default): lat/lon to geohash. decode: geohash to bounding box. Accepted: encode, decode.
latNoWGS-84 latitude, -90 to 90. Required when op=encode. Accepted: a number between -90 and 90.
lonNoWGS-84 longitude, -180 to 180. Required when op=encode. Accepted: a number between -180 and 180.
geohashNoGeohash to decode, 1-12 characters. Required when op=decode. Accepted: base32 geohash alphabet, excluding a, i, l and o.
precisionNoGeohash length 1-12, default 9 (about 4.8 m). Accepted: integer 1-12.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / lat / type
      Previous value: -"string"New value: +[
      +  "number",
      +  "string"
      +]
    • changedInput schema / properties / lon / type
      Previous value: -"string"New value: +[
      +  "number",
      +  "string"
      +]
    • addedInput schema / properties / precision / anyOf
      Added value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": -9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / precision / type
      Removed value: -"string"
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safe-read profile (readOnly, idempotent, closed-world), so the description earns credit for adding non-structured context: the $0.05 per successful call charge paid over x402 (USDC on Base), and the fact that encode also returns the eight neighbouring cells. It stops short of describing error/failure behavior or response shape beyond the named outputs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the two operations and the extra neighbour-cell return, then the commercial term. Efficient, with only mild redundancy between the title and the opening phrase 'Geohash encoder and decoder'.

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

Completeness5/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 still tells the agent what comes back (bounding box, centre, error bounds in metres, eight neighbours) and discloses the payment/auth requirement. Combined with full schema coverage of the five parameters, nothing material is missing for correct invocation.

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 100%, with per-parameter descriptions covering ranges, defaults and the encode/decode conditional requirements, so the schema does the heavy lifting. The description only echoes precision choice and does not add format or edge-case detail (e.g. what large/small precision implies beyond the schema's 'default 9'). 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 specific verbs and the exact resource: encode WGS-84 lat/lon to a geohash, or decode a geohash to bounding box, centre and error bounds. It is distinguishable from the nearest sibling (plus_code_encode_decode) by naming geohash explicitly and calling out the neighbour-cell output.

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?

Gives a concrete use condition: 'what a caller needs to do proximity search over a geohash-indexed store without a spatial database.' That tells the agent when this tool is the right pick, though it never explicitly names an alternative (e.g. geo_distance or plus_code_encode_decode) or when not to use it.

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.