Skip to main content
Glama

Duo Data Utilities: IBAN, ISIN, VAT & Tax ID, Barcode, Timezone, Geo APIs

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).

Input Schema

TableJSON 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. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and closed-world, so the safety profile is covered. The description adds genuinely non-derivable behavior: encoding returns the eight neighbouring cells and decode returns centre point plus error bounds in metres. It also discloses the $0.05 per successful call x402/USDC-on-Base payment, which is real operational context an agent must know before invoking. It does not describe failure modes or what counts as an unsuccessful call.

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?

Two sentences, front-loaded with the core encode/decode purpose before the return-value and pricing details. Every clause carries information, though the pricing sentence is somewhat dense and could be separated for scanability.

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 compensates by naming the return values (bounding box, centre point, error bounds, neighbours). It also covers cost and payment rail. Only input-validation behavior and an explicit mode-default reminder are absent, which is a minor gap for a 5-param, 0-required tool.

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%, so op, lat, lon, geohash and precision are all documented with accepted values and defaults. The description restates the encode/decode split and the precision concept but adds no syntax, format or edge-case detail beyond the schema. Baseline 3 is appropriate when the schema carries the parameter burden.

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 states a specific verb and resource ('encode a WGS-84 latitude and longitude to a geohash', 'decode a geohash back to its bounding box') and enumerates both modes up front. It also names the extra artifact (eight neighbouring cells), so an agent knows exactly what the tool produces. The only sibling in the same domain, plus_code_encode_decode, is distinguishable by the geohash-vs-plus-code resource alone.

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 a concrete usage scenario: the neighbour cells are '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. It stops short of naming an explicit alternative or when-not condition (e.g., versus geo_distance or point_in_polygon).

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.