Skip to main content
Glama
geolens-mcp

geolens-mcp

Official

update_layer_style

Restyle a map layer or set clicked-feature popup columns using single colors, category or class color ramps, or selected fields.

Instructions

Restyle a layer or change its popup fields. Give style, popup_fields or both. 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. layer_id: Layer id (from add_layer or get_map). style: New style, described above. popup_fields: New popup columns; [] shows none.

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>",
      "layer_id": "<layer_id>"
    },
    "name": "update_layer_style"
  }
}

Input Schema

NameRequiredDescriptionDefault
styleNo
map_idYes
layer_idYes
popup_fieldsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.33.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does it well: it discloses the mutation scope (restyle/popup change), permission constraints, and concrete error semantics ("a 401 or 403 means the server runs without one"). It also surfaces hard limits an agent would otherwise trip over: at most 100 distinct category values and a class count of 3-9.

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 core action is front-loaded in the first sentence and the argument reference is compact. It loses a point for structural sloppiness — an unclosed backtick and an inconsistent category bullet that lists `"column", "colors"` without the key/value form used elsewhere — which makes the payload spec slightly harder to parse than necessary.

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?

For a 4-parameter mutation with no annotations and no output schema, everything an agent needs to construct a valid call is present: payload shapes, defaults, limits, id provenance and auth failure interpretation. Return-value behavior is not described, but that is acceptable given the tool's narrow contract.

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%, so compensation is required and provided: `style` gets full payload shapes with defaults (equal_interval, count 5, Set2/YlOrRd ramps, alternative `breaks`), `popup_fields` semantics including the empty-list case, and both ids get provenance hints. The description effectively supplies the schema documentation the input schema lacks.

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?

"Restyle a layer or change its popup fields" names a specific verb pair and resource, and immediately clarifies that either or both inputs may be supplied. No sibling (add_layer, set_basemap, get_map) overlaps this operation, so an agent can route here unambiguously.

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 opening line states the two valid call shapes (style only, popup_fields only, or both), and the auth paragraph states the prerequisite (`map_author` API key) plus what it can touch (only maps that key created). What is missing is an explicit when-not/exclusion statement, but the alternatives here are self-evident from the sibling set.

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