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

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv1.139.19
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {},
      +    "error": {
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. Changed6 schema fields changedv1.139.18
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / properties / imageryStyle / properties
      Removed value: -{}
    • removedInput schema / properties / labelStyle / properties
      Removed value: -{}
    • removedInput schema / properties / layerStyle / properties
      Removed value: -{}
    • removedInput schema / properties / primitiveStyle / properties
      Removed value: -{}
    • removedInput schema / properties / tileStyle / properties
      Removed value: -{}
  3. Changed32 schema fields changedv1.139.17
    • changedInput schema / properties / imageryStyle / additionalProperties
      Previous value: -falseNew value: +true
    • removedInput schema / properties / imageryStyle / properties / alpha
      Removed value: -{
      -  "description": "Imagery alpha in range 0-1",
      -  "maximum": 1,
      -  "minimum": 0,
      -  "type": "number"
      -}
    • removedInput schema / properties / imageryStyle / properties / brightness
      Removed value: -{
      -  "description": "Imagery brightness multiplier",
      -  "type": "number"
      -}
    • removedInput schema / properties / imageryStyle / properties / contrast
      Removed value: -{
      -  "description": "Imagery contrast multiplier",
      -  "type": "number"
      -}
    • removedInput schema / properties / imageryStyle / properties / gamma
      Removed value: -{
      -  "description": "Imagery gamma correction",
      -  "type": "number"
      -}
    • removedInput schema / properties / imageryStyle / properties / hue
      Removed value: -{
      -  "description": "Imagery hue shift in radians",
      -  "type": "number"
      -}
    • removedInput schema / properties / imageryStyle / properties / saturation
      Removed value: -{
      -  "description": "Imagery saturation multiplier",
      -  "type": "number"
      -}
    • changedInput schema / properties / labelStyle / additionalProperties
      Previous value: -{}New value: +true
    • addedInput schema / properties / labelStyle / properties
      Added value: +{}
    • addedInput schema / properties / layerId / maxLength
      Added value: +200
    • addedInput schema / properties / layerId / minLength
      Added value: +1
    • changedInput schema / properties / layerStyle / additionalProperties
      Previous value: -falseNew value: +true
    • removedInput schema / properties / layerStyle / properties / category
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "GeoJSON category style",
      -  "properties": {
      -    "colors": {
      -      "description": "Optional CSS color palette",
      -      "items": {
      -        "type": "string"
      -      },
      -      "minItems": 1,
      -      "type": "array"
      -    },
      -    "field": {
      -      "description": "Property field used for category styling",
      -      "minLength": 1,
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "field"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / properties / layerStyle / properties / choropleth
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "GeoJSON choropleth style",
      -  "properties": {
      -    "breaks": {
      -      "description": "Ascending class break values; colors length must be breaks length minus one",
      -      "items": {
      -        "type": "number"
      -      },
      -      "minItems": 2,
      -      "type": "array"
      -    },
      -    "colors": {
      -      "description": "CSS colors for each choropleth interval",
      -      "items": {
      -        "type": "string"
      -      },
      -      "minItems": 1,
      -      "type": "array"
      -    },
      -    "field": {
      -      "description": "Property field used for choropleth classification",
      -      "minLength": 1,
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "field",
      -    "breaks",
      -    "colors"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / properties / layerStyle / properties / color
      Removed value: -{
      -  "description": "CSS color for entity layer features",
      -  "type": "string"
      -}
    • removedInput schema / properties / layerStyle / properties / gradient
      Removed value: -{
      -  "description": "Two CSS colors used as index gradient",
      -  "items": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "string"
      -    }
      -  ],
      -  "maxItems": 2,
      -  "minItems": 2,
      -  "type": "array"
      -}
    • removedInput schema / properties / layerStyle / properties / opacity
      Removed value: -{
      -  "description": "Opacity in range 0-1",
      -  "maximum": 1,
      -  "minimum": 0,
      -  "type": "number"
      -}
    • removedInput schema / properties / layerStyle / properties / pointSize
      Removed value: -{
      -  "description": "Point or billboard size",
      -  "minimum": 0,
      -  "type": "number"
      -}
    • removedInput schema / properties / layerStyle / properties / randomColor
      Removed value: -{
      -  "description": "Apply random colors to original GeoJSON entities",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / layerStyle / properties / strokeWidth
      Removed value: -{
      -  "description": "Polyline or polygon outline width",
      -  "minimum": 0,
      -  "type": "number"
      -}
    • changedInput schema / properties / primitiveStyle / additionalProperties
      Previous value: -falseNew value: +true
    • removedInput schema / properties / primitiveStyle / properties / color
      Removed value: -{
      -  "description": "CSS fill color for GeoJSON Primitive materials",
      -  "type": "string"
      -}
    • removedInput schema / properties / primitiveStyle / properties / lineWidth
      Removed value: -{
      -  "description": "Polyline width in range 0-255",
      -  "maximum": 255,
      -  "minimum": 0,
      -  "type": "number"
      -}
    • removedInput schema / properties / primitiveStyle / properties / opacity
      Removed value: -{
      -  "description": "Fill alpha in range 0-1",
      -  "maximum": 1,
      -  "minimum": 0,
      -  "type": "number"
      -}
    • removedInput schema / properties / primitiveStyle / properties / outlineColor
      Removed value: -{
      -  "description": "CSS outline color for GeoJSON Primitive materials",
      -  "type": "string"
      -}
    • removedInput schema / properties / primitiveStyle / properties / outlineWidth
      Removed value: -{
      -  "description": "Outline width in range 0-255",
      -  "maximum": 255,
      -  "minimum": 0,
      -  "type": "number"
      -}
    • removedInput schema / properties / primitiveStyle / properties / pointSize
      Removed value: -{
      -  "description": "Point size in range 0-255",
      -  "maximum": 255,
      -  "minimum": 0,
      -  "type": "number"
      -}
    • changedInput schema / properties / tileStyle / additionalProperties
      Previous value: -falseNew value: +true
    • removedInput schema / properties / tileStyle / properties / color
      Removed value: -{
      -  "description": "3D Tiles 颜色表达式,如 \"color('red')\" 或条件表达式",
      -  "type": "string"
      -}
    • removedInput schema / properties / tileStyle / properties / meta
      Removed value: -{
      -  "additionalProperties": {
      -    "type": "string"
      -  },
      -  "description": "3D Tiles meta 属性",
      -  "type": "object"
      -}
    • removedInput schema / properties / tileStyle / properties / pointSize
      Removed value: -{
      -  "description": "3D Tiles 点大小表达式",
      -  "type": "string"
      -}
    • removedInput schema / properties / tileStyle / properties / show
      Removed value: -{
      -  "description": "3D Tiles 显示条件表达式,如 \"${Height} > 50\"",
      -  "type": "string"
      -}
  4. Changed5 schema fields changedv1.139.15
    • addedInput schema / properties / imageryStyle
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Imagery visual style (alpha, brightness, contrast, hue, saturation, gamma); use setLayerVisibility for show/hide",
      +  "properties": {
      +    "alpha": {
      +      "description": "Imagery alpha in range 0-1",
      +      "maximum": 1,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "brightness": {
      +      "description": "Imagery brightness multiplier",
      +      "type": "number"
      +    },
      +    "contrast": {
      +      "description": "Imagery contrast multiplier",
      +      "type": "number"
      +    },
      +    "gamma": {
      +      "description": "Imagery gamma correction",
      +      "type": "number"
      +    },
      +    "hue": {
      +      "description": "Imagery hue shift in radians",
      +      "type": "number"
      +    },
      +    "saturation": {
      +      "description": "Imagery saturation multiplier",
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
    • changedInput schema / properties / layerStyle / additionalProperties
      Previous value: -{}New value: +false
    • changedInput schema / properties / layerStyle / description
      Previous value: -"Layer style (color, opacity, strokeWidth, pointSize)"New value: +"Entity layer style (color, opacity, strokeWidth, pointSize; GeoJSON thematic styles choropleth/category/randomColor/gradient are mutually exclusive)"
    • addedInput schema / properties / layerStyle / properties
      Added value: +{
      +  "category": {
      +    "additionalProperties": false,
      +    "description": "GeoJSON category style",
      +    "properties": {
      +      "colors": {
      +        "description": "Optional CSS color palette",
      +        "items": {
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "field": {
      +        "description": "Property field used for category styling",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "field"
      +    ],
      +    "type": "object"
      +  },
      +  "choropleth": {
      +    "additionalProperties": false,
      +    "description": "GeoJSON choropleth style",
      +    "properties": {
      +      "breaks": {
      +        "description": "Ascending class break values; colors length must be breaks length minus one",
      +        "items": {
      +          "type": "number"
      +        },
      +        "minItems": 2,
      +        "type": "array"
      +      },
      +      "colors": {
      +        "description": "CSS colors for each choropleth interval",
      +        "items": {
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "field": {
      +        "description": "Property field used for choropleth classification",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "field",
      +      "breaks",
      +      "colors"
      +    ],
      +    "type": "object"
      +  },
      +  "color": {
      +    "description": "CSS color for entity layer features",
      +    "type": "string"
      +  },
      +  "gradient": {
      +    "description": "Two CSS colors used as index gradient",
      +    "items": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "string"
      +      }
      +    ],
      +    "maxItems": 2,
      +    "minItems": 2,
      +    "type": "array"
      +  },
      +  "opacity": {
      +    "description": "Opacity in range 0-1",
      +    "maximum": 1,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  "pointSize": {
      +    "description": "Point or billboard size",
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  "randomColor": {
      +    "description": "Apply random colors to original GeoJSON entities",
      +    "type": "boolean"
      +  },
      +  "strokeWidth": {
      +    "description": "Polyline or polygon outline width",
      +    "minimum": 0,
      +    "type": "number"
      +  }
      +}
    • addedInput schema / properties / primitiveStyle
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "GeoJSON Primitive material style (color, opacity, outlineColor, outlineWidth, pointSize, lineWidth); use setLayerVisibility for show/hide",
      +  "properties": {
      +    "color": {
      +      "description": "CSS fill color for GeoJSON Primitive materials",
      +      "type": "string"
      +    },
      +    "lineWidth": {
      +      "description": "Polyline width in range 0-255",
      +      "maximum": 255,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "opacity": {
      +      "description": "Fill alpha in range 0-1",
      +      "maximum": 1,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "outlineColor": {
      +      "description": "CSS outline color for GeoJSON Primitive materials",
      +      "type": "string"
      +    },
      +    "outlineWidth": {
      +      "description": "Outline width in range 0-255",
      +      "maximum": 255,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "pointSize": {
      +      "description": "Point size in range 0-255",
      +      "maximum": 255,
      +      "minimum": 0,
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  5. Changed5 schema fields changedv1.139.14
    • changedInput schema / properties / labelStyle / description
      Previous value: -"标注样式(font, fillColor, outlineColor, outlineWidth, scale 等)"New value: +"Label style (font, fillColor, outlineColor, outlineWidth, scale, etc.)"
    • changedInput schema / properties / layerId / description
      Previous value: -"图层ID"New value: +"Layer ID"
    • changedInput schema / properties / layerStyle / description
      Previous value: -"图层样式(color, opacity, strokeWidth, pointSize)"New value: +"Layer style (color, opacity, strokeWidth, pointSize)"
    • addedInput schema / properties / sessionId
      Added value: +{
      +  "description": "Target browser session ID for multi-browser routing (optional)",
      +  "type": "string"
      +}
    • addedInput schema / properties / tileStyle
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "3D Tiles style (Cesium3DTileStyle expressions: color, show, pointSize, meta)",
      +  "properties": {
      +    "color": {
      +      "description": "3D Tiles 颜色表达式,如 \"color('red')\" 或条件表达式",
      +      "type": "string"
      +    },
      +    "meta": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "description": "3D Tiles meta 属性",
      +      "type": "object"
      +    },
      +    "pointSize": {
      +      "description": "3D Tiles 点大小表达式",
      +      "type": "string"
      +    },
      +    "show": {
      +      "description": "3D Tiles 显示条件表达式,如 \"${Height} > 50\"",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  6. First observedv1.139.4

TDQS

B3.4/5.0
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.

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