Skip to main content
Glama

style_set_categorized

Apply categorized styling to a vector layer by assigning colors to distinct field values, either automatically or with custom colors and labels.

Instructions

Style a vector layer with one color per distinct value of field.

Pass categories as an explicit list of {"value", "color", "label"} to control colors/labels yourself. Omit it to auto-generate one category per distinct value in the field, colored from color_ramp (a QGIS style color ramp name, e.g. "Spectral" - the default if omitted).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldYes
layer_idYes
categoriesNo
color_rampNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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 discloses the two behavioral modes and default parameters (color_ramp defaults to 'Spectral'), but does not mention whether the style is replaced or added to, nor any permissions or side effects.

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 two short paragraphs with no fluff. First sentence states the core purpose, second explains the two modes. Every sentence adds value.

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 complexity and number of parameters, the description covers the main behaviors and defaults. It omits mention that the tool replaces existing style (implied) and that the field type should be categorical, but overall sufficient for an agent to select and use it.

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?

With 0% schema description coverage, the description adds meaning for three of four parameters: field, categories (explicit list vs auto), and color_ramp. Layer_id is not described but is self-explanatory. This compensates well for the schema gap.

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 it styles a vector layer with one color per distinct value of a field, using the verb 'style' and specifying the resource. It distinguishes from sibling tools like style_set_single_symbol and style_set_graduated by focusing on categorical styling.

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 explains two modes: explicit categories list vs auto-generation from field values, providing clear guidance on when to use each. It implicitly contrasts with other style tools but does not explicitly name alternatives or state when not to use it.

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/piatkowski/qgis-mcp'

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