Skip to main content
Glama

transform_coordinates

Convert geographic coordinates between different coordinate reference systems (CRS) for accurate spatial data alignment and analysis.

Instructions

Transform coordinates between CRS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coordinatesYes
source_crsYes
target_crsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'transform_coordinates' MCP tool. It takes a list of two floats (x,y), source CRS string, target CRS string, creates a pyproj Transformer, transforms the point, and returns a dict with the result.
    @gis_mcp.tool()
    def transform_coordinates(coordinates: List[float], source_crs: str, 
                            target_crs: str) -> Dict[str, Any]:
        """Transform coordinates between CRS."""
        try:
            from pyproj import Transformer
            transformer = Transformer.from_crs(source_crs, target_crs, always_xy=True)
            x, y = coordinates
            x_transformed, y_transformed = transformer.transform(x, y)
            return {
                "status": "success",
                "coordinates": [x_transformed, y_transformed],
                "source_crs": source_crs,
                "target_crs": target_crs,
                "message": "Coordinates transformed successfully"
            }
        except Exception as e:
            logger.error(f"Error transforming coordinates: {str(e)}")
            raise ValueError(f"Failed to transform coordinates: {str(e)}")
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the basic function without detailing traits like error handling, performance, or output format. For a transformation tool with potential complexity in CRS handling, this lack of information is inadequate and could lead to misuse.

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. It is front-loaded and wastes no words, making it efficient to parse. However, this conciseness comes at the cost of completeness, as noted in other dimensions.

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 tool's complexity (coordinate transformation involves mathematical operations and CRS standards), no annotations, and 0% schema coverage, the description is incomplete. While an output schema exists, the description doesn't address key contextual aspects like CRS validation, transformation accuracy, or common use cases, making it insufficient for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning the input schema provides no descriptions for parameters. The tool description adds no semantic information about parameters like 'coordinates', 'source_crs', or 'target_crs', such as expected formats (e.g., arrays of numbers for coordinates, EPSG codes for CRS). This leaves parameters entirely undocumented, failing to compensate for the schema gap.

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?

The description clearly states the tool's purpose: transforming coordinates between coordinate reference systems (CRS). It specifies the verb 'transform' and the resource 'coordinates', making it understandable. However, it doesn't differentiate from sibling tools like 'project_geometry' or 'reproject_raster', which might handle similar transformations but for different data types, leaving some ambiguity.

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. With sibling tools like 'project_geometry' and 'reproject_raster' available, it's unclear if this tool is for point coordinates only or if it should be preferred in specific scenarios. No exclusions or prerequisites are mentioned, leaving usage context vague.

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