Skip to main content
Glama

get_h3_indices

Read-onlyIdempotent

Generate Uber H3 cell indices for polygons, named locations, or bounding boxes at a chosen resolution, respecting exact boundaries and interior holes.

Instructions

Get Uber H3 cell indices for a polygon (including interior holes), location boundary, or bounding box at a target resolution. When a WKT/GeoJSON polygon or named location boundary is provided, fills the exact polygon geometry (subtracting interior holes) rather than just its bounding rectangle.

Input Schema

NameRequiredDescriptionDefault
bboxNoThe geometry to parse. Can be a raw bounding box string ('lat1,lng1,lat2,lng2'), WKT polygon (with optional holes), GeoJSON polygon/multipolygon, tile 'z/x/y', or ogrinfo extent. Either 'location' or 'bbox' MUST be provided.
compactNoWhether to return a compacted list of cells (mixing resolutions) to minimize response size. Defaults to false.
locationNoA text location to search for (e.g. 'San Francisco'). Either 'location' or 'bbox' MUST be provided.
resolutionYesThe H3 resolution level, from 0 to 15. (e.g. 7)
summary_onlyNoIf true, returns only cell count, sample cells, and map share URL without dumping thousands of cell IDs into context. Ideal for high resolutions. Defaults to false.
return_geometryNoIf true, return GeoJSON FeatureCollection with hex boundary polygons in addition to cell IDs. Defaults to false.
use_polygon_boundaryNoIf true (default), fills the exact WKT/GeoJSON/OSM polygon boundary (including interior holes) instead of its rectangular bounding box when available.

Output Schema

NameRequiredDescriptionDefault
cellsNo
compactYes
geojsonNo
completeYes
warningsYes
share_urlYes
cell_countYes
provenanceYes
resolutionYes
sample_cellsNo
summary_onlyYes
original_bboxYes
used_polygon_boundaryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.5.0
    • changedInput schema / properties / bbox / description
      Previous value: -"The geometry to parse. Can be a raw bounding box string ('lat1,lng1,lat2,lng2'), WKT, GeoJSON, or ogrinfo extent. Either 'location' or 'bbox' MUST be provided."New value: +"The geometry to parse. Can be a raw bounding box string ('lat1,lng1,lat2,lng2'), WKT polygon (with optional holes), GeoJSON polygon/multipolygon, tile 'z/x/y', or ogrinfo extent. Either 'location' or 'bbox' MUST be provided."
    • changedInput schema / properties / location / description
      Previous value: -"A text location to search for (e.g. 'San Francisco'). Requires MAPBOX_ACCESS_TOKEN env var. Either 'location' or 'bbox' MUST be provided."New value: +"A text location to search for (e.g. 'San Francisco'). Either 'location' or 'bbox' MUST be provided."
    • addedInput schema / properties / summary_only
      Added value: +{
      +  "description": "If true, returns only cell count, sample cells, and map share URL without dumping thousands of cell IDs into context. Ideal for high resolutions. Defaults to false.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / use_polygon_boundary
      Added value: +{
      +  "description": "If true (default), fills the exact WKT/GeoJSON/OSM polygon boundary (including interior holes) instead of its rectangular bounding box when available.",
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "cell_count": {
      +      "type": "number"
      +    },
      +    "cells": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "compact": {
      +      "type": "boolean"
      +    },
      +    "complete": {
      +      "type": "boolean"
      +    },
      +    "geojson": {
      +      "type": "object"
      +    },
      +    "original_bbox": {
      +      "properties": {
      +        "lat1": {
      +          "type": "number"
      +        },
      +        "lat2": {
      +          "type": "number"
      +        },
      +        "lng1": {
      +          "type": "number"
      +        },
      +        "lng2": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "lat1",
      +        "lng1",
      +        "lat2",
      +        "lng2"
      +      ],
      +      "type": "object"
      +    },
      +    "provenance": {
      +      "properties": {
      +        "attribution": {
      +          "type": "string"
      +        },
      +        "cache_age_ms": {
      +          "type": "number"
      +        },
      +        "cached": {
      +          "type": "boolean"
      +        },
      +        "data_timestamp": {
      +          "type": "string"
      +        },
      +        "provider": {
      +          "type": "string"
      +        },
      +        "usage_policy": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "provider",
      +        "data_timestamp",
      +        "cached",
      +        "cache_age_ms"
      +      ],
      +      "type": "object"
      +    },
      +    "resolution": {
      +      "type": "number"
      +    },
      +    "sample_cells": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "share_url": {
      +      "type": "string"
      +    },
      +    "summary_only": {
      +      "type": "boolean"
      +    },
      +    "used_polygon_boundary": {
      +      "type": "boolean"
      +    },
      +    "warnings": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "resolution",
      +    "compact",
      +    "summary_only",
      +    "used_polygon_boundary",
      +    "cell_count",
      +    "original_bbox",
      +    "share_url",
      +    "provenance",
      +    "complete",
      +    "warnings"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.2.4

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, and open-world behavior. Beyond that, the description usefully discloses that polygon and named-location inputs fill exact geometry including interior holes rather than only the bounding rectangle, which is relevant behavioral context.

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 two front-loaded sentences with no filler. The core operation comes first, followed by the important geometry detail.

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?

The tool has seven parameters but full schema coverage, an output schema, and rich annotations. The description covers the core operation and the key polygon-hole behavior; only sibling differentiation is notably absent.

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 the schema already explains bbox, location, resolution, compact, summary_only, return_geometry, and use_polygon_boundary. The description reinforces the polygon-versus-bbox behavior but adds little parameter meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: get Uber H3 cell indices for a polygon, location boundary, or bounding box at a target resolution. It clearly identifies the operation but does not differentiate this tool from siblings such as aggregate_overpass_h3 or get_bounds.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by naming accepted geometry inputs and the target resolution, so an agent can infer when the tool applies. However, it gives no explicit when-to-use versus alternatives guidance or exclusions for sibling tools.

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