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
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | The 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_id | Yes | Skeleton layer id, e.g. "road-major". Call `list_style_layers` for the accepted ids. | |
| property | Yes | MapLibre paint property name, e.g. "line-width" or "fill-color". | |
| style_id | Yes | Hosted style id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version | Yes | The newly published version. | |
| style_id | Yes | Hosted style id. | |
| style_url | Yes | Immutable URL of the compiled style at this version. |