Skip to main content
Glama
geolens-mcp

geolens-mcp

Official

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GEOLENS_TOKENNoJWT bearer token, used only when GEOLENS_API_KEY is unset
GEOLENS_API_KEYNoAPI key sent as X-Api-Key; omit for public-only access
GEOLENS_INSTANCENoBase URL of your GeoLens instance, e.g. https://geolens.example.com (/api is appended automatically)

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_datasetsA

Search the GeoLens catalog for datasets by free text.

Matches title, description, and keywords (semantic ranking is used automatically when the instance has it enabled). Returns a compact FeatureCollection (numberMatched, numberReturned, features) where each feature is a trimmed dataset record: id, bbox, and properties title, description (cut at 300 characters), record_type, geometry_type, feature_count, crs, keywords and updated. Use the feature id as the dataset_id for the other tools; get_dataset_schema has the full detail. Each feature's properties also include source_origin (upload, postgis, service, stac, created, or null) and source_freshness (fresh, due, overdue, or unknown). Freshness is advisory: due means one declared update interval has elapsed, while overdue means two have elapsed; neither proves that the content is wrong.

Search does not make a detail request per result. When the catalog summary has no health/check/refresh value, source_health, source_health_detail, last_checked_at, and last_refreshed_at are null. Call get_dataset_schema for populated trust metadata. Raw provider URLs and credentials are never included in these source-state fields.

Args: query: Search text. limit: Max results (1-200, default 10). offset: Result offset for paging.

get_dataset_schemaA

Get a dataset's schema and source trust metadata.

Returns columns (name/type/role), geometry type, CRS/SRID, feature count, spatial extent, and the safe source_origin. source_health is healthy, missing, inaccessible, or unknown: inaccessible means GeoLens could not determine whether the source still exists, while unknown means it was never probed or cannot be probed. source_health_detail is a fixed GeoLens reason code, not provider text. last_checked_at records the latest probe attempt; last_refreshed_at records only the latest successful committed refresh. source_freshness is advisory; overdue means two declared update intervals elapsed without a successful refresh. Raw provider URLs, origin pointers, and credentials are excluded. Call this before writing spatial questions so you know both the available columns and whether the source may be stale.

Args: dataset_id: Dataset id (e.g. from search_datasets).

get_featuresA

Get GeoJSON features for a dataset (bounded).

Returns an OGC-API FeatureCollection. Raster datasets have no features and will error. Results are capped by limit; page with offset. Only the arguments listed below are supported; anything else is rejected.

Args: dataset_id: Dataset id. limit: Max features (1-200, default 10). offset: Feature offset for paging. bbox: Optional bounding box filter "minx,miny,maxx,maxy" (WGS84).

list_mapsA

List saved maps (read-only metadata: id, name, visibility, layer count).

Args: search: Optional text filter on map name/description. limit: Max results (1-200, default 50). offset: Result offset for paging.

get_mapA

Get a summary of one saved map: name, description, visibility, view state (center, zoom, bearing, pitch), basemap, terrain configuration and layer list.

Each layer has id, dataset_id, dataset_name, dataset_table_name, dataset_geometry_type, display_name, visible, layer_type and filter. Styling, popups, labels, column info and sample values are not included. dashboard_widget_count is the number of dashboard widgets (0 for none).

Args: map_id: Map id (e.g. from list_maps).

queryA

Run one read-only SQL SELECT against accessible datasets.

Executes through the server's hardened SQL sandbox: a single SELECT over data.* tables, an allowlisted function set (aggregates, math, string, date, JSON), and a strict server-side budget (a 5 s statement timeout, a repetition cap on self-joins, and row_limit rows, at most 1000). Returns {columns, rows, row_count, truncated} with rows as lists in column order. Geometry columns come back as hex EWKB; select ST_AsText(geom) or ST_AsGeoJSON(geom) for readable geometry. ST_AsGeoJSON(geom, 6) rounds coordinates to six decimals, which suits display but can make a small polygon invalid.

PostGIS functions allowed: ST_Area, ST_AsGeoJSON, ST_AsText, ST_Buffer, ST_Centroid, ST_Collect, ST_Contains, ST_Distance, ST_DWithin, ST_GeometryType, ST_GeomFromGeoJSON, ST_GeomFromText, ST_Intersects, ST_IsValid, ST_Length, ST_MakeEnvelope, ST_MakePoint, ST_NPoints, ST_Point, ST_SetSRID, ST_Transform, ST_Union, ST_Within, ST_X, ST_Y. ST_Collect and ST_Union take two geometries (no aggregate form). The && bounding-box operator works, as do ::geography / ::geometry and geography(geom).

Requires credentials with AI-chat permission — anonymous configurations cannot use this tool. Workflow: search_datasets to find a dataset, then get_dataset_schema for its table_name and columns, then reference it as data.<table_name> in the SQL and list the same table_name in restrict_tables. Every table the query touches must be listed there; the scope can only narrow what your credentials already see. Writes, other schemas, and unlisted functions are rejected with a short reason that names the refused function.

Args: sql: A single SELECT statement over data.* tables. restrict_tables: Table names (no data. prefix) the query may touch. Required and non-empty. row_limit: Max rows to return (1-1000, default 100).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 6 tools

Disambiguation4/5

Datasets, maps, and SQL each occupy distinct tool territory, and get_map vs list_maps is clearly separated. The only mild overlap is get_features versus query, both of which retrieve row-level data, but the GeoJSON-paging vs analytical-SQL split is well explained.

Naming Consistency4/5

Five tools follow a predictable verb_noun pattern (search_datasets, get_dataset_schema, get_features, get_map, list_maps), but the bare verb `query` breaks the pattern and is less self-describing.

Tool Count5/5

Six tools is well-scoped for a read-only geospatial catalog/query server; each tool serves a distinct step in the discover-schema-inspect-analyze workflow with no filler.

Completeness4/5

The read-only surface covers search, schema/trust metadata, feature retrieval, SQL analysis, and map metadata, forming a coherent lifecycle. The notable gap is raster datasets, which have no retrieval path since get_features errors on them, and there is no way to create or modify maps (likely intentional for a read-only server).

Maintenance

ActivityActive
ResponsivenessSyncing