Set Layer Style
set_layer_styleApply symbology to a QGIS layer: single symbol, categorized unique values, or graduated numeric ranges. Set field, color ramp, and class count for thematic mapping.
Instructions
Set symbology. style_type: 'single' (one symbol), 'categorized' (unique values), 'graduated' (numeric ranges). field required for categorized/graduated. color_ramp: QGIS ramp name (e.g. 'Spectral', 'Viridis', 'Blues'). classes: graduated class count (default 5).
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": {
"layer_id": "<layer_id>",
"style_type": "<style_type>"
},
"name": "set_layer_style"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field | No | ||
| classes | No | ||
| layer_id | Yes | ||
| color_ramp | No | Spectral | |
| style_type | Yes |