Skip to main content
Glama
nkarasiak

QGIS MCP

by nkarasiak

Raster Calculator

raster_calculator

Perform band math on raster layers using QGIS expressions (e.g., 'dem@1 > 1000'). Output a GeoTIFF with grid and extent from a reference layer.

Instructions

Band math via the QGIS raster calculator. Reference loaded raster layers in the expression as 'LayerName@band' (e.g. '("dem@1" > 1000) * 1'). Writes a GeoTIFF to output_path. Output grid/extent taken from reference_layer (layer id or name), defaulting to the first loaded raster.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYes
output_pathYes
reference_layerNo
Behavior4/5

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

No annotations are provided, so the description fully bears the responsibility. It discloses that the tool writes a GeoTIFF file, uses the QGIS raster calculator engine, and takes output extent from a reference layer. It does not mention whether existing layers are modified (assumed not), nor does it cover error conditions or performance, but the core behavior is transparent.

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 three sentences long, each sentence adding necessary information: the purpose, expression syntax example, and output behavior with reference layer handling. It is front-loaded with the main purpose and contains no redundant or extraneous text.

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?

The tool is straightforward, and the description covers the key aspects: input expression, output file, and reference layer. It omits details like CRS handling, no-data treatment, or error messages, but these are acceptable for this complexity level. Given the lack of output schema and annotations, the description provides sufficient completeness for correct invocation.

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%, but the description compensates thoroughly. It explains the expression format with an example, clarifies that output_path is the GeoTIFF destination, and describes reference_layer's role in determining grid/extent and its default. This adds essential meaning beyond the schema types.

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 starts with 'Band math via the QGIS raster calculator', which clearly states the verb (perform band math) and resource (raster layers). The example and details on layer referencing further clarify the tool's specific function, distinguishing it from generic processing tools like execute_processing.

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 provides a concrete example of expression syntax and explains how to specify the reference layer, giving clear usage context. However, it does not explicitly mention when to use this tool over alternatives (e.g., execute_processing), which would further guide agent decision-making.

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