Skip to main content
Glama

get_coordinates

Extract coordinate data from geometric shapes to enable geospatial analysis and mapping applications.

Instructions

Get the coordinates of a geometry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geometryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_coordinates' MCP tool. It takes a WKT geometry string, loads it using Shapely, extracts the coordinates using geom.coords, and returns them as a list of lists in a success dictionary. Errors are logged and raised.
    @gis_mcp.tool()
    def get_coordinates(geometry: str) -> Dict[str, Any]:
        """Get the coordinates of a geometry."""
        try:
            from shapely import wkt
            geom = wkt.loads(geometry)
            return {
                "status": "success",
                "coordinates": [list(coord) for coord in geom.coords],
                "message": "Coordinates retrieved successfully"
            }
        except Exception as e:
            logger.error(f"Error getting coordinates: {str(e)}")
            raise ValueError(f"Failed to get 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 action without any details on permissions, rate limits, output format (though an output schema exists), or error handling. This is inadequate 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 no wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly, though this conciseness comes at the cost of detail.

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 (a geometric operation with 1 parameter at 0% schema coverage) and the presence of an output schema, the description is incomplete. It doesn't compensate for the lack of parameter documentation or provide behavioral context, making it insufficient for reliable tool selection and 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.

Parameters1/5

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

The schema description coverage is 0%, meaning the 'geometry' parameter is undocumented in the schema. The description adds no meaning beyond the schema, failing to explain what 'geometry' should be (e.g., a GeoJSON string, WKT format, or other representation), leaving it ambiguous and unhelpful for correct invocation.

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 the coordinates of a geometry' clearly states the verb ('Get') and resource ('coordinates'), but it's vague about what 'coordinates' specifically means (e.g., centroid, bounding box, vertices) and doesn't distinguish from sibling tools like 'get_bounds' or 'get_centroid', which might provide related geometric information. It avoids tautology by not just restating the name.

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. With many sibling tools like 'get_bounds' or 'get_centroid' that might offer similar or overlapping functionality, the description lacks any context, prerequisites, or exclusions to help an agent choose appropriately.

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