Skip to main content
Glama

write_raster

Convert numpy arrays to raster files by copying geospatial metadata from reference rasters for consistent GIS data output.

Instructions

Write a numpy array to a raster file using metadata from a reference raster. Args: array: 2D or 3D list (or numpy array) of raster values. reference_raster: Path to a raster whose metadata will be copied. output_path: Path to save the new raster. dtype: Optional data type (e.g., 'float32', 'uint8'). Returns: Dictionary with status and message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
arrayYes
reference_rasterYes
output_pathYes
dtypeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral disclosure. It mentions the output format ('Dictionary with status and message') but doesn't cover critical aspects like file format support, error conditions, permission requirements, or whether the operation overwrites existing files. For a write operation with zero annotation coverage, this leaves significant gaps.

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?

The description is efficiently structured with a clear purpose statement followed by parameter explanations. Every sentence adds value, though the 'Returns' section could be integrated more smoothly. The text is appropriately sized for a 4-parameter tool with no annotations.

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?

Given the tool's complexity (file writing with metadata copying), no annotations, and an output schema that presumably documents the return dictionary, the description is minimally adequate. It covers parameters well but lacks behavioral context about file operations, error handling, and format constraints that would be important for safe usage.

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 compensates well by explaining all four parameters: 'array' (2D/3D numpy array values), 'reference_raster' (metadata source path), 'output_path' (save location), and 'dtype' (optional data type). It adds meaningful context beyond the bare schema types, though it could specify accepted dtype values more precisely.

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 states the specific action ('Write a numpy array to a raster file') and resource ('using metadata from a reference raster'), distinguishing it from sibling tools like 'write_file_gpd' (vector data) and 'reproject_raster' (coordinate transformation). The verb 'write' combined with the metadata copying mechanism provides precise purpose.

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 description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid reference raster), exclusions, or comparisons to similar tools like 'save_results' or 'tile_raster'. Usage context is implied but not explicitly stated.

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