Skip to main content
Glama

set_layer_paint

Set one MapLibre paint property on one skeleton layer of a hosted style (e.g. layer_id "road-major", property "line-width", value 4 or an expression array; null removes the property, e.g. line-dasharray null draws the dashed road-path solid) and publish the result as a new immutable style version. Layer ids come from list_style_layers. Returns the new version and style URL.

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": {
      "style_id": "<style_id>",
      "layer_id": "<layer_id>",
      "property": "<property>",
      "value": "<value>"
    },
    "name": "set_layer_paint"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYesThe paint value (any MapLibre-valid JSON: number, colour string or expression array), or null to remove the property (for example `line-dasharray` null draws a dashed skeleton layer solid).
layer_idYesSkeleton layer id, e.g. "road-major". Call `list_style_layers` for the accepted ids.
propertyYesMapLibre paint property name, e.g. "line-width" or "fill-color".
style_idYesHosted style id.

Output Schema

NameRequiredDescriptionDefault
versionYesThe newly published version.
style_idYesHosted style id.
style_urlYesImmutable URL of the compiled style at this version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / value / description
      Previous value: -"The paint value (any MapLibre-valid JSON: number, colour string or\nexpression array)."New value: +"The paint value (any MapLibre-valid JSON: number, colour string or\nexpression array), or null to remove the property (for example\n`line-dasharray` null draws a dashed skeleton layer solid)."
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden and does well: it states the operation publishes 'a new immutable style version' and returns the new version and style URL, disclosing the mutation and versioning model. It also discloses the null-removal semantic. It omits permission/auth requirements and any conflict or versioning caveats, which is the main remaining gap.

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 operation is front-loaded in the first clause, and the parentheticals are informative rather than filler. The single long sentence is dense but every clause (examples, null behavior, layer-id source, return value) earns its place. Slightly heavy parenthetical nesting keeps it from a 5.

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

Completeness4/5

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

The tool is well-covered: 100% schema coverage and an output schema mean return values and parameter details need not be explained. The description still provides the key behavioral fact (immutable new version) and routing hint to list_style_layers. Only auth and version-conflict behavior are absent, which is a minor gap for this complexity.

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?

Schema coverage is 100%, so the schema already documents style_id, layer_id, property, and value in detail. The description reinforces value semantics (number, expression array, null removal) but largely repeats what the schema provides rather than adding new meaning. Baseline 3 applies when the schema does the heavy lifting.

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 states a precise verb and resource: 'Set one MapLibre paint property on one skeleton layer of a hosted style.' It also enumerates the scope (one layer, one property) and contrasts implicitly with the layout sibling by specifying 'paint' rather than layout. An agent can distinguish it from set_layer_layout and understands exactly what gets modified.

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?

It supplies concrete usage context: layer ids come from list_style_layers, null removes a property, and examples clarify intent. It gives a worked example of the null-removal behavior. However, it does not explicitly say when to prefer set_layer_layout or when not to use this tool, leaving sibling routing partly to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources