Skip to main content
Glama
GIS MCP Server
by mahdin75

raster_histogram

Computes per-band histograms of raster pixel values, letting you set bin counts or return a compact 32-bin summary for distribution analysis.

Instructions

Per-band histogram of pixel values. The default uses the requested bins. compact=true returns at most 32 bins.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "source": "<source>"
    },
    "name": "raster_histogram"
  }
}

Input Schema

NameRequiredDescriptionDefault
binsNo
sourceYes
compactNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.16.0
    • addedInput schema / properties / compact
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. Changed4 schema fields changedv1.0.0
    • removedInput schema / properties / bins / title
      Removed value: -"Bins"
    • removedInput schema / properties / source / title
      Removed value: -"Source"
    • removedInput schema / title
      Removed value: -"raster_histogramArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  3. First observed

TDQS

C2.9/5.0
Behavior3/5

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

No annotations exist, so the description carries the whole burden. It does disclose two real behaviors — the default bin count and the 32-bin cap under compact=true — which is genuine value, but it says nothing about the returned structure, handling of nodata/empty bands, or cost of large binnings.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the operation and followed by the two option behaviors. The sentence 'The default uses the requested bins' is somewhat redundant and adds nearly no information, keeping it just below a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations, no output schema, and zero schema coverage across three parameters, the description should do more. It leaves the required source argument and the shape of the histogram result unexplained, so an agent still cannot call this confidently.

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 description coverage is 0%, so the description must define all three parameters. It explains bins only circularly ('the default uses the requested bins') and explains compact as a 32-bin cap, but the required 'source' parameter — whether it is a path, URI, or dataset identifier — is never addressed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific operation and resource: a per-band histogram of pixel values. That is enough for an agent to tell it apart from a general statistics tool, but it never explicitly contrasts itself with the nearby raster_band_statistics sibling, so differentiation is left to inference.

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

Usage Guidelines2/5

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

There is no statement of when to reach for a histogram versus band statistics, focal statistics, or any other analysis sibling. The only conditional guidance is about the compact flag, which is an option-level hint, not a when-to-use rule.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.