Skip to main content
Glama

clip_raster_with_shapefile

Use polygons from a shapefile to clip a raster dataset and write the output. Automatically converts the shapefile's coordinate system to match the raster's if they differ.

Instructions

Clip a raster dataset using polygons from a shapefile and write the result. Converts the shapefile's CRS to match the raster's CRS if they are different.

Parameters:

  • raster_path_or_url: local path or HTTPS URL of the source raster.

  • shapefile_path: local filesystem path to a .shp file containing polygons.

  • destination: local path where the masked raster will be written.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
raster_path_or_urlYes
shapefile_pathYes
destinationYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations are provided, so the description must carry the burden. It discloses CRS conversion behavior but does not mention overwrite behavior, error handling, or limitations (e.g., polygon count, raster size). Partial but incomplete.

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 compact: a clear one-line purpose followed by a bulleted list of parameters. No redundant or generic language. Every sentence adds value.

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 tool with 3 required parameters and an output schema (assumed to document return), the description covers the main flow but omits important context: file overwrite behavior, required permissions, expected output format from the output schema, or error scenarios.

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?

Despite 0% schema description coverage, the description adds meaning to all three parameters: clarifies raster_path_or_url can be URL or local path, shapefile_path must be .shp, destination is local path. This exceeds the schema's empty strings.

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 specifies the action ('Clip a raster dataset'), the input resource ('polygons from a shapefile'), and the output ('write the result'). It distinguishes from sibling 'clip_vector' by explicitly mentioning raster and shapefile.

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?

No guidance on when to use this tool versus alternatives like 'clip_vector' or other raster operations. No conditions or prerequisites mentioned, only a technical CRS conversion note.

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