set_palette
Recolour one or more palette slots of a hosted style (e.g. {"water": "#0b2038", "roadMajor": "#8a6d3b"}) and publish the result as a new immutable style version. Slot names come from list_style_layers; colours are CSS (#rgb/#rrggbb/#rrggbbaa/rgb()/hsl()). 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>",
"colours": "<colours>"
},
"name": "set_palette"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| colours | Yes | Palette overrides: slot name → CSS colour (e.g. {"water": "#0b2038"}). Call `list_style_layers` for the slot names. | |
| 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. |