Skip to main content
Glama

h3_index

Convert any latitude/longitude coordinate into an H3 hexagonal grid cell index at a chosen resolution for spatial aggregation and heat map generation.

Instructions

Convert a coordinate to an H3 hexagonal grid cell index at a given resolution.

Returns: { h3_index (string), resolution, center_lat, center_lon }.

Resolution guide (area per cell):

  • 5: ~250 km² — country/large region level

  • 7: ~5 km² — city neighbourhood level (most common for analytics)

  • 9: ~0.1 km² — city block level

  • 12: ~0.003 km² — building level

USE FOR: Spatial aggregation, density heat maps, geospatial indexing, joining datasets by grid cell. NOTE: For bulk H3 indexing of many coordinates, call individually — do not attempt to derive adjacent cells manually.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latYesLatitude. Range: -90 to 90.
lonYesLongitude. Range: -180 to 180.
resolutionYesH3 resolution 0–15. Use 7 for neighbourhood-level aggregation, 9 for block-level.
Behavior4/5

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

No annotations are provided, so the description fully bears the burden. It discloses the return fields (h3_index, resolution, center_lat, center_lon) and behavior (simple conversion, no adjacent cell derivation). It could mention idempotency or statelessness, but the current detail is adequate for safe agent invocation.

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?

The description is efficiently structured: purpose, return values, resolution table, and usage notes in three concise paragraphs. Every sentence adds value, and key information is front-loaded. No redundancy or filler.

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?

Given no output schema, the description explicitly lists return fields. It covers purpose, all parameters (with resolution guidance), usage scenarios, and a behavioral constraint (no manual cell derivation). This is complete for a straightforward coordinate conversion tool, leaving no ambiguity for the agent.

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% with detailed field descriptions. The description adds significant value beyond the schema by providing a resolution guide with area estimates (e.g., resolution 7 for neighbourhood-level) and practical usage notes for bulk indexing, which helps the agent choose appropriate resolution values.

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 begins with a clear verb-resource statement: 'Convert a coordinate to an H3 hexagonal grid cell index at a given resolution.' This explicitly distinguishes it from sibling geocoding, routing, and mapping tools, which have different purposes.

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?

The 'USE FOR' section lists common applications (spatial aggregation, heat maps, geospatial indexing, joining datasets), and the NOTE advises against manually deriving adjacent cells. While it does not explicitly state when not to use, the guidance is sufficient given no direct sibling tool with similar functionality.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/algolayertechnologies/mapsi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server