Skip to main content
Glama
awheeler262
by awheeler262

Raster Calculator

raster_calculator

Perform band math on raster layers using QGIS raster calculator. Reference layers by name and band, output results as GeoTIFF.

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
Behavior3/5

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

No annotations exist, so the description carries full burden. It explains output format and default behavior for reference_layer, but does not cover error handling, overwrite behavior, or permission requirements.

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?

Two sentences, each contributing essential information. The first sentence states the core purpose, the second adds critical details on layer referencing, output format, and extent defaults. No wasted 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 no output schema, the description covers input parameters and behavior adequately. It could mention what the tool returns (e.g., success message or file path), but for a calculation tool, the current detail is sufficient.

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

Parameters4/5

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

Schema has no parameter descriptions, but the description explains expression syntax (e.g., 'dem@1'), output_path location, reference_layer optionality with default. This adds significant meaning beyond the raw schema.

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 defines the tool as band math via the QGIS raster calculator, referencing layers with a specific syntax, writing to GeoTIFF, and specifying grid/extent behavior. It is distinct from sibling tools like sample_raster_values or zonal_statistics.

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 for band math calculations but does not explicitly state when to use this versus alternatives like sample_raster_values or field_calculator. No when-not-to-use guidance is provided.

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