Skip to main content
Glama
nkarasiak

QGIS MCP

by nkarasiak

Sample Raster Values

sample_raster_values
Read-only

Extract pixel values from a raster at given points, reprojecting coordinates if a CRS is provided. Optionally sample a specific band; flags indicate off-raster or transform failures.

Instructions

Sample raster pixel values at points. 'points' is a list of [x, y] in crs when given (reprojected to the raster), else in the raster's CRS. Omit 'band' to sample all bands. A null value is nodata when outside_extent is false; outside_extent true means the point is off the raster (often a CRS mix-up); transform_failed marks a point the raster's CRS cannot express.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
crsNo
bandNo
pointsYes
raster_layerYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.15.0
    • addedInput schema / properties / crs
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. Addedv0.5.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses important behaviors: coordinate reprojection when crs is supplied, band omission sampling all bands, null-as-nodata semantics, and the meaning of outside_extent and transform_failed. This gives the agent an accurate mental model of edge cases.

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?

Four sentences, each earning its place. The purpose is front-loaded, and the subsequent sentences add critical operational detail without repeating schema information or adding filler.

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

Completeness5/5

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

With an output schema present, the description does not need to document return types. It covers all meaningful input behavior, coordinate handling, and edge cases. No essential calling information is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden for parameters. It explains the structure of 'points' as [x, y] lists, the role of 'crs' with reprojection semantics, and the effect of omitting 'band'. The only parameter left implicit is raster_layer, which is self-evident from the tool name.

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 opens with a specific verb and resource: 'Sample raster pixel values at points.' This clearly distinguishes it from sibling tools like zonal_statistics or identify_features, and the scope (point sampling on a raster) is unambiguous.

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

Usage Guidelines4/5

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

The description gives clear context for when to use the tool: whenever point-level raster sampling is needed. It does not explicitly name alternatives or exclusions, so it stops short of a 5, but the intended use is immediately inferable.

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

Deploy Server

Other Tools