Skip to main content
Glama

get_geocentric_crs

Convert geographic coordinates to geocentric coordinate reference systems for accurate 3D spatial analysis and transformations in GIS workflows.

Instructions

Get geocentric 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_geocentric_crs' tool. It returns the fixed WGS 84 geocentric CRS (EPSG:4978) by parsing the input coordinates but not using them for CRS selection.
    @gis_mcp.tool()
    def get_geocentric_crs(coordinates: List[float]) -> Dict[str, Any]:
        """Get geocentric CRS for given coordinates."""
        try:
            import pyproj
            from pyproj.database import query_crs_info
            lon, lat = coordinates
            
            # Query for geocentric CRS (type PJType.GEOCENTRIC_CRS)
            # Since query_geocentric_crs_info doesn't exist, use a standard geocentric CRS
            # WGS 84 geocentric is a common choice: EPSG:4978
            crs_obj = pyproj.CRS.from_epsg(4978)  # WGS 84 geocentric
            
            return {
                "status": "success",
                "crs": crs_obj.to_string(),
                "message": "Geocentric CRS retrieved successfully"
            }
        except Exception as e:
            logger.error(f"Error getting geocentric CRS: {str(e)}")
            raise ValueError(f"Failed to get geocentric CRS: {str(e)}")
  • Import of pyproj_functions module in the main entry point, which executes the @gis_mcp.tool() decorators to register the 'get_geocentric_crs' tool with the MCP server.
    from . import (
        geopandas_functions,
        shapely_functions,
        rasterio_functions,
        pyproj_functions,
        pysal_functions,
    )
  • MCP resource that lists 'get_geocentric_crs' as one of the available CRS operations, aiding tool discovery.
    @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"
            ]
        }
  • src/gis_mcp/mcp.py:1-6 (registration)
    Definition of the gis_mcp FastMCP instance used by decorators to register tools including 'get_geocentric_crs'.
    # MCP imports using the new SDK patterns
    from fastmcp import FastMCP
    
    
    gis_mcp = FastMCP("GIS MCP")
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 action ('Get') without any details on permissions, rate limits, output format, or error handling. For a tool with coordinates input and CRS output, this is inadequate, as it doesn't explain what a 'geocentric CRS' entails or how the transformation works.

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 purpose. It's front-loaded and wastes no words, making it easy to parse quickly. 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 complexity of geospatial operations, the lack of annotations, 0% schema coverage, and the presence of an output schema (which might help but isn't described), the description is insufficient. It doesn't explain what a geocentric CRS is, how coordinates are interpreted, or any behavioral aspects, making it incomplete for effective tool 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 the 'coordinates' parameter. The description adds minimal semantics by mentioning 'given coordinates', but it doesn't specify the format (e.g., array of numbers, coordinate system, units), expected length, or valid ranges. This leaves the parameter largely undocumented.

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 verb ('Get') and resource ('geocentric CRS'), making the purpose understandable. It specifies the input ('for given coordinates'), which distinguishes it from similar tools like 'get_available_crs' or 'get_crs_info' that don't require coordinates. However, it doesn't explicitly differentiate from all siblings, such as 'get_utm_crs', which might also involve coordinate-based CRS retrieval.

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. It doesn't mention prerequisites, context, or comparisons to sibling tools like 'get_utm_crs' or 'get_crs_info', leaving the agent to infer usage based on the name alone. This lack of explicit guidance reduces its effectiveness in tool selection.

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