Skip to main content
Glama

get_field_statistics

Compute min, max, mean, sum, and distinct value count for a numeric field in a QGIS layer. Returns an error if the field type is unsupported.

Instructions

Get min/max/mean/sum and distinct-value count for a numeric field.

Fails with UnsupportedFieldType if the field isn't numeric. Also includes a capped preview of distinct values seen on the field.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
field_nameYes
layer_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 the error condition for non-numeric fields and mentions a capped preview of distinct values. With no annotations, this provides useful behavioral context, though it omits details like auth requirements or potential performance implications.

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 consists of two concise sentences: the first states the core purpose, and the second adds error behavior and additional output. No superfluous information, well-structured and front-loaded.

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 simplicity (two string parameters, clear output schema exists), the description covers the main functionality, error condition, and output highlights. It does not specify the cap size for previews, but overall it is sufficient for an agent to understand and invoke the tool correctly.

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

Parameters2/5

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

The input schema has 0% description coverage, leaving the description to compensate. However, it does not define or add constraints to the parameters (layer_name, field_name) beyond their names. While the names are self-explanatory, the description fails to add meaning or constraints, earning a low score.

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 retrieves min/max/mean/sum and distinct-value count for a numeric field. It is a specific verb-resource combination, and the sibling tools operate at the layer level, distinguishing this as a field-specific statistics tool.

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 use on numeric fields (fails with UnsupportedFieldType otherwise) but does not explicitly state when to use this tool vs. alternatives or provide when-not guidance. Siblings do not offer field-level statistics, so competition is minimal, but explicit guidance is lacking.

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