Skip to main content
Glama

project_geometry

Transform geographic coordinates between coordinate reference systems for accurate spatial analysis and mapping.

Instructions

Project a geometry between CRS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geometryYes
source_crsYes
target_crsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'project_geometry' MCP tool. It takes a WKT geometry string and CRS identifiers, projects the geometry using pyproj Transformer and shapely.transform, and returns the projected WKT geometry.
    @gis_mcp.tool()
    def project_geometry(geometry: str, source_crs: str, 
                        target_crs: str) -> Dict[str, Any]:
        """Project a geometry between CRS."""
        try:
            from shapely import wkt
            from shapely.ops import transform
            from pyproj import Transformer
            geom = wkt.loads(geometry)
            transformer = Transformer.from_crs(source_crs, target_crs, always_xy=True)
            projected = transform(transformer.transform, geom)
            return {
                "status": "success",
                "geometry": projected.wkt,
                "source_crs": source_crs,
                "target_crs": target_crs,
                "message": "Geometry projected successfully"
            }
        except Exception as e:
            logger.error(f"Error projecting geometry: {str(e)}")
            raise ValueError(f"Failed to project geometry: {str(e)}")
  • Resource listing that registers 'project_geometry' as an available CRS transformation operation under the 'gis://crs/transformations' resource.
    @gis_mcp.resource("gis://crs/transformations")
    def get_crs_transformations() -> Dict[str, List[str]]:
        """List available CRS transformation operations."""
        return {
            "operations": [
                "transform_coordinates",
                "project_geometry"
            ]
        }
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 only states the basic operation. It doesn't disclose behavioral traits like whether this modifies the original geometry, what formats are supported for geometry input, error handling for invalid CRS, or performance characteristics. The description is minimal and lacks critical operational context.

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 extremely concise with a single sentence that directly states the tool's function. There's no wasted verbiage or unnecessary information, making it front-loaded and efficient in structure.

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

Completeness2/5

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

Given the complexity of CRS transformation (a non-trivial geospatial operation with 3 required parameters and no schema descriptions), the description is inadequate. While an output schema exists, the description doesn't address prerequisites, error conditions, or typical use cases. For a tool with zero schema coverage and no annotations, more context is needed.

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 but adds no parameter information. It doesn't explain what 'geometry' should contain (e.g., WKT, GeoJSON), what format 'source_crs' and 'target_crs' use (e.g., EPSG codes, PROJ strings), or provide examples. The description fails to add meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Project a geometry between CRS' states the action (project) and resource (geometry) but is vague about what 'project' means in this context. It distinguishes from siblings by mentioning CRS (Coordinate Reference System), but doesn't specify if this is for vector or raster data, making it less specific than ideal.

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 is provided on when to use this tool versus alternatives like 'reproject_raster' or 'transform_coordinates'. The description mentions CRS but doesn't clarify if this is for geometry transformation specifically versus other coordinate operations available in sibling tools.

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