Skip to main content
Glama

get_utm_crs

Convert geographic coordinates to UTM coordinate reference systems for accurate geospatial mapping and analysis.

Instructions

Get UTM CRS for given coordinates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coordinatesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'get_utm_crs' tool, decorated with @gis_mcp.tool(). It uses pyproj to query the UTM CRS info for the given lon/lat coordinates and returns the CRS string representation.
    @gis_mcp.tool()
    def get_utm_crs(coordinates: List[float]) -> Dict[str, Any]:
        """Get UTM CRS for given coordinates."""
        try:
            import pyproj
            from pyproj.database import query_utm_crs_info
            lon, lat = coordinates
            crs_info_list = query_utm_crs_info(
                datum_name="WGS 84",  # Use "WGS 84" with space as per standard
                area_of_interest=pyproj.aoi.AreaOfInterest(
                    west_lon_degree=lon,
                    south_lat_degree=lat,
                    east_lon_degree=lon,
                    north_lat_degree=lat
                )
            )
            if not crs_info_list:
                raise ValueError("No UTM CRS found for the given coordinates")
            
            # Create CRS from CRSInfo and get its string representation
            crs_obj = pyproj.CRS.from_authority(crs_info_list[0].auth_name, crs_info_list[0].code)
            crs_str = crs_obj.to_string()
            
            return {
                "status": "success",
                "crs": crs_str,
                "message": "UTM CRS retrieved successfully"
            }
        except Exception as e:
            logger.error(f"Error getting UTM CRS: {str(e)}")
            raise ValueError(f"Failed to get UTM CRS: {str(e)}")
  • MCP resource endpoint that lists 'get_utm_crs' among the available CRS information operations, serving as a tool directory.
    @gis_mcp.resource("gis://crs/info")
    def get_crs_info_operations() -> Dict[str, List[str]]:
        """List available CRS information operations."""
        return {
            "operations": [
                "get_crs_info",
                "get_available_crs",
                "get_utm_zone",
                "get_utm_crs",
                "get_geocentric_crs"
            ]
        }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Get UTM CRS' which suggests a read-only operation, but doesn't disclose any behavioral traits like error handling, rate limits, authentication needs, or what the output entails. This is a significant gap for a tool with no annotation coverage.

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 a single, efficient sentence with zero waste—it directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 low complexity (1 parameter, no nested objects) and the presence of an output schema, the description is minimally adequate. However, with no annotations and 0% schema coverage, it lacks details on behavior and parameter semantics, making it incomplete for optimal agent use despite the output schema handling return values.

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 undocumented parameters. It mentions 'given coordinates' which hints at the 'coordinates' parameter, but doesn't add meaning beyond the schema—no details on coordinate format (e.g., [longitude, latitude]), units, or constraints. This fails to adequately compensate for the low coverage.

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 'Get UTM CRS for given coordinates' clearly states the action (get) and resource (UTM CRS), but it's vague about what UTM CRS specifically refers to (e.g., coordinate reference system details) and doesn't distinguish it from siblings like 'get_available_crs' or 'get_geocentric_crs'. It provides a basic purpose but lacks specificity.

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 such as 'get_available_crs' or 'get_geocentric_crs'. The description implies usage for coordinates but doesn't specify context, prerequisites, or exclusions, leaving the agent to infer based on tool names alone.

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