Skip to main content
Glama
awheeler262
by awheeler262

Get Field Statistics

get_field_statistics
Read-only

Compute aggregate statistics for a QGIS layer field: numeric fields get count, sum, mean, min, max, stdev; non-numeric fields get count and distinct values.

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?

Annotations provide readOnlyHint=true, and the description adds behavioral detail: handling of non-numeric fields. This goes beyond the annotation. However, it doesn't mention edge cases like missing values or performance constraints.

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 succinct sentences, front-loaded with the main purpose. No redundant or unnecessary 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 (not shown here), the description doesn't need to detail return values. It covers both numeric and non-numeric cases. Minor gap: no mention of parameter constraints (e.g., field must exist, layer must be loaded).

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?

Schema coverage is 0%, so the description should compensate for missing parameter descriptions. It does not explicitly define layer_id or field_name; only implicitly through context. For 0% coverage, this is insufficient to guide parameter selection.

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 computes aggregate statistics (count, sum, mean, min, max, stdev) for a numeric field. It also specifies behavior for non-numeric fields (count and distinct values). This distinguishes it from sibling tools like get_unique_values or field_calculator.

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 when to use (when you need aggregate stats for a field), but does not explicitly provide guidance on when not to use it or compare to alternatives. Sibling tools like field_calculator or zonal_statistics could be misused if the agent doesn't know the distinction.

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/awheeler262/qgis_mcp'

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