Geohash encoder and decoder with neighbour cells
geohash_encode_decodeGeohash 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
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | encode (default): lat/lon to geohash. decode: geohash to bounding box. Accepted: encode, decode. | |
| lat | No | WGS-84 latitude, -90 to 90. Required when op=encode. Accepted: a number between -90 and 90. | |
| lon | No | WGS-84 longitude, -180 to 180. Required when op=encode. Accepted: a number between -180 and 180. | |
| geohash | No | Geohash to decode, 1-12 characters. Required when op=decode. Accepted: base32 geohash alphabet, excluding a, i, l and o. | |
| precision | No | Geohash length 1-12, default 9 (about 4.8 m). Accepted: integer 1-12. |