set_layer_layout
Set one MapLibre layout property on one skeleton layer of a hosted style (e.g. layer_id "road-path", property "line-cap", value "round"; null removes the property) and publish the result as a new immutable style version. Pair it with set_layer_paint for line patterns: dotted footpaths are road-path line-dasharray [0, 2] plus line-cap round. 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_layout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | The layout value (any MapLibre-valid JSON, e.g. "round"), or null to remove the property and fall back to the skeleton's. | |
| layer_id | Yes | Skeleton layer id, e.g. "road-path". Call `list_style_layers` for the accepted ids. | |
| property | Yes | MapLibre layout property name, e.g. "line-cap", "line-join" or "visibility". | |
| 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. |