Skip to main content
Glama

get_geometry_type

Determine the geometry type from a given geometry string to enable accurate geospatial analysis and classification within GIS workflows.

Instructions

Get the type of a geometry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geometryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function decorated with @gis_mcp.tool() that implements the get_geometry_type tool. It takes a WKT geometry string, loads it with Shapely, and returns the geometry type (e.g., 'Point', 'LineString') along with status and message.
    @gis_mcp.tool()
    def get_geometry_type(geometry: str) -> Dict[str, Any]:
        """Get the type of a geometry."""
        try:
            from shapely import wkt
            geom = wkt.loads(geometry)
            return {
                "status": "success",
                "type": geom.geom_type,
                "message": "Geometry type retrieved successfully"
            }
        except Exception as e:
            logger.error(f"Error getting geometry type: {str(e)}")
            raise ValueError(f"Failed to get geometry type: {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 the action ('Get') but doesn't explain what 'type' means (e.g., point, polygon, line), how the geometry input should be formatted, or what the output might look like. This leaves critical behavioral details unspecified for a tool with one parameter.

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: 'Get the type of a geometry.' It's front-loaded and wastes no words, making it easy to parse quickly. Every word contributes directly to the purpose without unnecessary elaboration.

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 has one parameter and an output schema exists, the description is minimally adequate but incomplete. It states the purpose but lacks details on parameter semantics and behavioral context. With no annotations and low schema coverage, it should provide more guidance on usage and input format to be fully helpful.

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?

The input schema has 0% description coverage, with one parameter 'geometry' of type string. The description doesn't add any semantic details about this parameter, such as what format the geometry string should be in (e.g., GeoJSON, WKT) or examples. This fails to compensate for the low schema coverage, leaving the parameter poorly documented.

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: 'Get the type of a geometry.' It uses a specific verb ('Get') and resource ('type of a geometry'), making it unambiguous. However, it doesn't differentiate from sibling tools like 'get_bounds' or 'get_centroid', which also retrieve geometry properties, so it doesn't fully distinguish its specific function.

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 any prerequisites, context, or comparisons to sibling tools such as 'get_area' or 'get_length', which serve similar purposes for different geometry properties. Without this, users must infer usage from the tool name 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