Skip to main content
Glama
geolens-io

geolens-mcp

query

Run read-only SQL SELECT queries on geospatial datasets with a sandboxed execution environment.

Instructions

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, common PostGIS like ST_Area/ST_DWithin/ST_Intersects), and a strict server-side budget (a few seconds of runtime, a repetition cap on self-joins, and row_limit rows). Returns {columns, rows, row_count, truncated} with rows as lists in column order.

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.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
row_limitNo
restrict_tablesYes
Behavior5/5

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

No annotations provided, so the description carries the full burden. It discloses the read-only nature, sandbox constraints (allowlisted functions, server-side budget), and explicitly states what is rejected (writes, other schemas, unlisted functions), as well as the return format.

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?

The description is well-organized but somewhat repetitive, especially regarding the table reference format ('data.<table_name>') and the restriction on restrict_tables. It could be tightened without losing clarity.

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?

The description is comprehensive: it covers purpose, constraints, workflow, parameter details, return format, and credential requirements. It provides enough context for an agent to use the tool correctly, leaving no significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description explains each parameter beyond the schema: sql is a single SELECT, restrict_tables must list all accessed tables (with no 'data.' prefix) and is required, and row_limit has a default. It clarifies the scope restriction and adds meaning to the schema's bare types.

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 clearly states the tool's purpose: 'Run one read-only SQL SELECT against accessible datasets.' It specifies the verb, resource, and scope, and distinguishes it from sibling tools by being the primary query tool.

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

Usage Guidelines5/5

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

The description provides explicit usage context: it is for running SQL SELECT queries, and it even outlines a workflow (search_datasets, get_dataset_schema) and mentions required credentials. It implicitly indicates when not to use it (for non-SELECT operations) by emphasizing read-only.

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/geolens-io/geolens'

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