Skip to main content
Glama
GIS MCP Server
by mahdin75

write_raster

Write a 2D array to a raster file using a reference raster's grid to preserve spatial alignment.

Instructions

Write a 2D array as a raster using the grid of a reference raster.

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": {
      "array": "<array>",
      "reference_raster": "<reference_raster>",
      "output_path": "<output_path>"
    },
    "name": "write_raster"
  }
}

Input Schema

NameRequiredDescriptionDefault
arrayYes
dtypeNo
output_pathYes
reference_rasterYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.16.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. Changed8 schema fields changedv1.0.0
    • removedInput schema / properties / array / title
      Removed value: -"Array"
    • addedInput schema / properties / dtype / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / dtype / title
      Removed value: -"Dtype"
    • removedInput schema / properties / dtype / type
      Removed value: -"string"
    • removedInput schema / properties / output_path / title
      Removed value: -"Output Path"
    • removedInput schema / properties / reference_raster / title
      Removed value: -"Reference Raster"
    • removedInput schema / title
      Removed value: -"write_rasterArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  3. First observed

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden but discloses almost nothing: it does not say whether an existing file at output_path is overwritten, whether CRS/transform/nodata are inherited from the reference raster, or how dtype is inferred. For a write operation with a filesystem side effect, that is a substantial gap.

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?

A single front-loaded sentence with no filler; the core operation and the grid-defining mechanism come first. It is efficient rather than padded, though it is arguably too terse for a write tool.

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

Completeness3/5

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

For a simple write tool with no output schema, the sentence conveys the core contract — array plus reference grid to a path. However, given 0% schema coverage and no annotations, it leaves the mutation semantics and the dtype parameter undocumented.

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 compensate for all four parameters. It implies the roles of array, reference_raster (supplies the grid) and output_path, but says nothing about 'dtype' — whether it overrides the array's type, is inferred when null, or what values are accepted.

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?

Names a specific verb and resource ('Write a 2D array as a raster') and adds the key mechanism ('using the grid of a reference raster'), which lets an agent distinguish this from write_file_gpd. It falls short of 5 only because it does not explicitly contrast itself with any sibling.

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?

The sentence describes what the tool does, not when to choose it over alternatives such as write_file_gpd or tile_raster, and gives no prerequisites or exclusions. Any usage context must be inferred by the caller.

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