Skip to main content
Glama

updateLayerStyle

Idempotent

Update vector, imagery, primitive, or 3D Tiles layer styling with style-specific options like color, opacity, and labels. Apply thematic or visual styles directly to a specified layer.

Instructions

Update vector, imagery, primitive, or 3D Tiles styling for a layer. Returns { success: boolean, data?: unknown, message?: string, error?: string }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layerIdYesLayer ID
sessionIdNoTarget browser session ID for multi-browser routing (optional)
tileStyleNo3D Tiles style (Cesium3DTileStyle expressions: color, show, pointSize, meta)
labelStyleNoLabel style (font, fillColor, outlineColor, outlineWidth, scale, etc.)
layerStyleNoEntity layer style (color, opacity, strokeWidth, pointSize; GeoJSON thematic styles choropleth/category/randomColor/gradient are mutually exclusive)
imageryStyleNoImagery visual style (alpha, brightness, contrast, hue, saturation, gamma); use setLayerVisibility for show/hide
primitiveStyleNoGeoJSON Primitive material style (color, opacity, outlineColor, outlineWidth, pointSize, lineWidth); use setLayerVisibility for show/hide

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
errorNo
messageNo
successYes
Behavior3/5

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

The description accurately reflects a mutation operation (readOnlyHint: false) but adds no extra behavioral context beyond what annotations already provide. The return type structure is mentioned, but since an output schema exists, this is redundant. No mention of authentication, rate limits, or side effects, though the annotations (idempotentHint: true, destructiveHint: false) already cover some safety aspects.

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 one concise sentence that gets straight to the point, followed by a compact return type definition. Every word earns its place without fluff or repetition. The structure effectively front-loads the purpose before any ancillary details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 params, nested objects, multiple style types), the description is underspecified. It does not mention that exactly one of the style parameters (tileStyle, labelStyle, layerStyle, imageryStyle, primitiveStyle) should be provided at a time, nor does it clarify that these are mutually exclusive overrides. The return type is covered by the output schema, so that part is fine, but the core usage constraint is missing, which could lead an agent to mistakenly pass multiple style objects.

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?

The description does not discuss parameters directly, but the input schema covers 100% of parameters with rich descriptions for each style object (e.g., '3D Tiles style (Cesium3DTileStyle expressions: color, show, pointSize, meta)'). Since schema coverage is high and the descriptions are detailed, the main description has little obligation to add more. However, it misses an opportunity to highlight constraints like mutual exclusivity across style 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 'Update vector, imagery, primitive, or 3D Tiles styling for a layer,' which is a specific verb+resource with explicit scope. It distinguishes this tool from siblings like setLayerVisibility (which handles show/hide) and addGeoJsonLayer (which adds layers). The mention of supported style types (vector, imagery, primitive, 3D Tiles) precisely defines the tool's domain.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives or when not to use it. While the parameter descriptions for imageryStyle and primitiveStyle mention 'use setLayerVisibility for show/hide,' this is buried in the schema and not part of the main description. The description fails to state prerequisites, such as the layer must already exist or that only one style key should be provided at a time.

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/gaopengbin/cesium-mcp'

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