Skip to main content
Glama

raster_algebra

Perform addition or subtraction on two raster bands with automatic alignment. Specify source rasters, band index, operation, and destination path for the result.

Instructions

Perform algebraic operations (addition or subtraction) on two raster bands, handling alignment issues automatically.

Parameters:

  • raster1: Path to the first raster (.tif).

  • raster2: Path to the second raster (.tif).

  • band_index: Index of the band to process (1-based index).

  • operation: Either "add" or "subtract" to specify the calculation.

  • destination: Path to save the result as a new raster.

The function aligns rasters if needed, applies the selected operation, and saves the result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
raster1Yes
raster2Yes
band_indexYes
operationYes
destinationYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

Description mentions alignment handling and operation type but does not disclose error conditions, behavior with different extents, or return value. Since annotations are absent, description carries full burden but omits important behavioral details.

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?

Description is concise with clear bullet-point parameters. Every sentence adds value, no fluff or repetition.

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?

Covers purpose, parameters, and basic behavior. Lacks mention of return value or prerequisites like same CRS. Output schema exists but description could still note what the function returns.

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?

With 0% schema description coverage, the description adds meaning to all 5 parameters, including path, band index, operation type, and destination. However, it could include constraints like valid operation values or expected format for paths.

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?

Description clearly states 'Perform algebraic operations (addition or subtraction) on two raster bands' with a specific verb and resource. It distinguishes from siblings like compute_ndvi or concat_bands by focusing on algebraic operations.

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?

No explicit guidance on when to use this tool vs alternatives like weighted_band_sum or concat_bands. Usage is implied by the description but lacks exclusions or context for when another tool would be more appropriate.

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/mahdin75/gis-mcp'

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