Skip to main content
Glama

Set Layer Style

set_layer_style

Apply 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).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldNo
classesNo
layer_idYes
color_rampNoSpectral
style_typeYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It describes the action ('Set symbology') but does not disclose behavioral traits such as whether the style is replaced entirely, if changes are reversible, or any side effects like canvas refresh. The description is functional but lacks deeper behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise: two sentences with clear colons and bullet-like structure. Every part adds value, and it is front-loaded with the primary action. No wasted words.

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

Completeness4/5

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

Given the tool's complexity (5 params, no output schema, no annotations), the description covers most relevant aspects. It explains the main parameters and usage conditions. Minor gaps: no mention of error states, prerequisites (e.g., layer must exist), or that the tool modifies the layer's visual representation (implied but not explicit).

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?

The schema has 0% coverage, so the description must add meaning. It explains style_type options, that field is required for categorized/graduated (and defaults to null), color_ramp as QGIS ramp names, and classes default to 5. It does not explain 'layer_id', but overall adds significant value beyond the raw schema.

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

Purpose5/5

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

The description clearly states 'Set symbology' and explains the three style types ('single', 'categorized', 'graduated'), distinguishing it from sibling tools like 'apply_style_qml' which applies QML style files. The verb+resource combination is specific and unambiguous.

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

Usage Guidelines4/5

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

The description provides clear guidance on when to use each style_type ('field required for categorized/graduated') and includes defaults (classes=5, color_ramp='Spectral'). However, it does not explicitly state when NOT to use this tool versus alternatives like 'apply_style_qml' or 'set_layer_property'.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lefcgis/qgis-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server