Skip to main content
Glama

get_available_crs

Retrieve coordinate reference systems for geospatial analysis, enabling accurate coordinate transformations and spatial measurements in GIS operations.

Instructions

Get list of available CRS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_available_crs' MCP tool. It fetches a list of available CRS from PyProj's EPSG database (limited to first 100 for performance), extracts name and type for each, with fallback to well-known CRS if none found.
    @gis_mcp.tool()
    def get_available_crs() -> Dict[str, Any]:
        """Get list of available CRS."""
        try:
            import pyproj
            from pyproj.database import get_codes
            from pyproj.enums import PJType
            
            crs_list = []
            # Get a sample of common EPSG codes (limit to avoid huge lists)
            epsg_codes = list(get_codes("EPSG", PJType.CRS))[:100]  # Limit to first 100 for performance
            
            for code in epsg_codes:
                try:
                    # Directly create CRS and get info without calling the tool function
                    crs_obj = pyproj.CRS.from_epsg(int(code))
                    crs_list.append({
                        "auth_name": "EPSG",
                        "code": str(code),
                        "name": crs_obj.name,
                        "type": crs_obj.type_name
                    })
                except Exception as ex:
                    # Skip invalid CRS codes
                    logger.debug(f"Skipping EPSG:{code}: {str(ex)}")
                    continue
            
            if not crs_list:
                # Fallback: return some well-known CRS
                well_known_crs = [
                    {"auth_name": "EPSG", "code": "4326", "name": "WGS 84", "type": "Geographic 2D CRS"},
                    {"auth_name": "EPSG", "code": "3857", "name": "WGS 84 / Pseudo-Mercator", "type": "Projected CRS"},
                    {"auth_name": "EPSG", "code": "4269", "name": "NAD83", "type": "Geographic 2D CRS"},
                ]
                crs_list = well_known_crs
            
            return {
                "status": "success",
                "crs_list": crs_list,
                "message": "Available CRS list retrieved successfully"
            }
        except Exception as e:
            logger.error(f"Error getting available CRS: {str(e)}")
            raise ValueError(f"Failed to get available CRS: {str(e)}")
Behavior2/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 states 'Get list of available CRS,' which implies a read-only operation, but doesn't specify aspects like whether it returns all CRS or a filtered subset, the format of the list, any rate limits, or authentication needs. This leaves significant gaps for an agent to understand the tool's behavior.

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 ('Get list of available CRS.') that directly states the tool's purpose without any unnecessary words. It is 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 that the tool has no parameters, an output schema exists, and it's a read operation, the description is minimally adequate. However, it lacks details on what 'available CRS' means (e.g., all supported CRS, user-accessible ones) and doesn't leverage the output schema to hint at return values, leaving some contextual gaps.

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?

The input schema has 0 parameters with 100% coverage, so the schema fully documents the lack of inputs. The description adds no parameter information, which is acceptable since there are no parameters to explain. This meets the baseline for tools with zero parameters.

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 with a specific verb ('Get') and resource ('list of available CRS'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_crs_info', 'get_geocentric_crs', or 'get_utm_crs', which might also retrieve CRS-related information, so it misses full sibling differentiation.

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 such as 'get_crs_info' that might offer more detailed CRS information, there's no indication of context, prerequisites, or exclusions for selecting this tool over others.

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