Skip to main content
Glama
geolens-mcp

geolens-mcp

Official

add_layer

Add a dataset to a map as a new vector layer with optional color styling and popup fields. Use it to visualize search results, returning the layer_id, applied style, and map URL.

Instructions

Add a dataset to a map as a new layer, optionally styled. Each new layer is drawn beneath the map's existing layers and can't be reordered, so add the layer you want on top first. Returns the new layer_id, the style written (with category values or class breaks and their colours) and the map's url. style is one of:

  • {"type": "single", "color": "#3388ff"}

  • {"type": "categories", "column", "colors"}: a colour per distinct value of a text, boolean or integer column (at most 100 values).

  • {"type": "classes", "column", "method", "count", "colors"}: a colour per range of a numeric column. method is equal_interval (default), quantile (always five classes, no count), jenks or std_dev; count is 3-9 (default 5). Or give "breaks": [10, 50, 100] instead of method and count. colors is optional: a ramp name (Set2 for categories and YlOrRd for classes by default; also Blues, Viridis, RdBu, Paired and the other ColorBrewer names) or a list of hex colours, one per value or class. popup_fields are column names shown, in order, when a feature is clicked. Needs a map_author API key, which can change only the maps it created; a 401 or 403 means the server runs without one.

Args: map_id: A map this key created (from create_map). dataset_id: Dataset id (e.g. from search_datasets). style: Optional style, described above; omitted, the layer keeps the default style. popup_fields: Optional columns to show in the popup.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "map_id": "<map_id>",
      "dataset_id": "<dataset_id>"
    },
    "name": "add_layer"
  }
}

Input Schema

NameRequiredDescriptionDefault
styleNo
map_idYes
dataset_idYes
popup_fieldsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.33.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full behavioral burden and does so well: it discloses the ordering and non-reorderability behavior, default style behavior, API-key auth requirements, and the meaning of 401/403 responses. It also documents the return values, including layer_id, the written style, and the map URL.

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 definition is front-loaded with the core action and the important ordering caveat, then uses a structured list for the complex style parameter. Despite its length, every section earns its place because it documents parameters and behavior that the schema and annotations do not cover.

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?

There is no output schema, but the description explicitly states what is returned: layer_id, the style written, and the map URL. Authentication, defaults, style limits, and ordering constraints are also covered, leaving no significant gap for an agent to invoke this mutation tool correctly.

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?

Schema description coverage is 0%, and the style parameter is an opaque anyOf object in the schema, so the description must compensate. It does: map_id and dataset_id sources are explained, popup_fields ordering is described, and style variants, defaults, limits, class methods, break alternatives, and color options are all documented in detail.

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 opening sentence gives a specific verb and resource: adding a dataset to a map as a new layer, optionally styled. It also distinguishes the operation by noting that each new layer is drawn beneath existing layers and returns a new layer_id, making it clearly different from map creation or restyling tools.

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 description gives a clear ordering rule: because new layers are drawn beneath existing layers and cannot be reordered, the layer intended for the top should be added first. It does not explicitly name an alternative for restyling an existing layer, but the main usage context and constraint are clear.

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