Skip to main content
Glama
nkarasiak

QGIS MCP

by nkarasiak

Get Field Statistics

get_field_statistics
Read-only

Compute aggregate statistics like count, sum, mean, min, max, and standard deviation for numeric fields, or count and distinct values for non-numeric fields in a QGIS layer.

Instructions

Compute aggregate statistics (count, sum, mean, min, max, stdev) for a numeric field. For non-numeric fields returns count and distinct values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layer_idYes
field_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

The description discloses behavioral traits beyond the readOnlyHint annotation by detailing how the tool handles numeric versus non-numeric fields. It does not contradict annotations and adds useful context about output variability.

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 with two sentences, front-loading the core functionality and differentiating behavior. No extraneous information.

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 (not shown), the description adequately covers the tool's purpose and behavior. It lacks explicit mention of the return structure but the output schema likely fills that gap. For a simple two-parameter tool, it is sufficiently complete.

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?

The description adds meaning by explaining how field_name affects behavior (numeric vs non-numeric) but does not elaborate on parameter format or constraints. With 0% schema coverage, it partially compensates but could be more explicit.

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 the tool computes aggregate statistics (count, sum, mean, min, max, stdev) for numeric fields and distinct values for non-numeric fields. It specifies the verb 'compute' and the resource 'field statistics', and distinguishes from sibling tools by focusing on statistical aggregation rather than other field operations.

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 implies usage for obtaining summary statistics but does not provide explicit guidance on when to use this tool versus alternatives, nor does it state when not to use it or mention any prerequisites.

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

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