Skip to main content
Glama

Set Layer Style

set_layer_style

Configure QGIS layer symbology for single symbols, unique values, or numeric ranges; set fields, color ramps, class counts, and opacity to visualize data clearly.

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). opacity: layer opacity from 0.0 to 1.0 (default 1.0).

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

NameRequiredDescriptionDefault
fieldNo
classesNo
opacityNo
layer_idYes
color_rampNoSpectral
style_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden and only discloses parameter mechanics. It does not say whether the existing symbology is replaced or merged, whether the change is persisted to the project or undoable, what happens on an invalid field name, or how vector vs raster layers are handled.

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 definition is a single front-loaded statement followed by a terse parameter list; every clause carries information and nothing is padded. The telegraphic style is slightly clipped but appropriate for the domain.

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

Completeness3/5

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

For a six-parameter mutation tool with no annotations and no output schema, the parameter coverage is solid but the behavioral side is thin: nothing explains side effects, persistence, or layer-type constraints. An agent could call it correctly but cannot predict what it overwrites.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the schema has no enums, yet the description supplies the valid style_type values, the field/classes/opacity/color_ramp defaults and ranges, and concrete ramp names. Only layer_id is left undocumented, which is self-evident from the name.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource ("Set symbology") and immediately enumerates the three styling modes ('single', 'categorized', 'graduated'), so the agent knows exactly what operation is performed. It does not, however, distinguish itself from siblings like set_raster_style or apply_style_qml, leaving mode selection to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The only conditional guidance is 'field required for categorized/graduated', which is parameter-level rather than tool-level. There is no statement of when to choose this tool over set_raster_style, apply_style_qml, or save_style_qml, and no prerequisites (e.g. that the layer must exist and be vector for categorized/graduated).

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

Deploy Server

Other Tools