Skip to main content
Glama

Get Unique Values

get_unique_values
Read-only

Retrieve distinct field values from a QGIS layer to build categorized symbology or filter conditions.

Instructions

Return the distinct values of a field. Use 'limit' to cap results (-1 for all). Useful before building categorized symbology or filters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldYes
limitNo
layer_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

Annotations already declare readOnlyHint=true. The description adds context about the 'limit' parameter behavior, including that '-1 for all' returns all values. This is useful but does not disclose significant additional behavioral traits beyond what annotations provide.

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 extremely concise with two efficient sentences. It front-loads the core purpose and provides key usage detail without any superfluous 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 presence of an output schema (documenting return values) and readOnlyHint annotation, the description covers the essential: what it does, how to use limit, and a typical scenario. It could mention that it scans all features or be more explicit about the field's origin, but it's largely complete for its simplicity.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It explains the 'limit' parameter in a helpful way ('-1 for all') and implies 'field' as the target. However, it omits 'layer_id' entirely, leaving its purpose unclear despite being required. The description adds some value but incomplete coverage.

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 'Return the distinct values of a field,' specifying a precise verb and resource. It distinguishes the tool from siblings like get_field_statistics or get_layer_features by focusing on unique values rather than statistics or general features.

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

Usage Guidelines3/5

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

The description mentions it is 'Useful before building categorized symbology or filters,' giving a contextual use case. However, it does not explicitly state when not to use this tool or name alternatives, leaving usage guidance implicit rather than explicit.

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