Skip to main content
Glama

rotate_geometry

Rotate geometric shapes by specifying an angle and optional origin point to adjust spatial orientation for GIS analysis.

Instructions

Rotate a geometry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geometryYes
angleYes
originNocenter
use_radiansNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function implementing the 'rotate_geometry' tool. It takes WKT geometry string, angle, optional origin and use_radians flag, loads the geometry with shapely.wkt, rotates it using shapely.affinity.rotate, and returns the result as WKT in a success dict or raises error.
    @gis_mcp.tool()
    def rotate_geometry(geometry: str, angle: float, origin: str = "center", 
                    use_radians: bool = False) -> Dict[str, Any]:
        """Rotate a geometry."""
        try:
            from shapely import wkt
            from shapely.affinity import rotate
            geom = wkt.loads(geometry)
            result = rotate(geom, angle=angle, origin=origin, use_radians=use_radians)
            return {
                "status": "success",
                "geometry": result.wkt,
                "message": "Geometry rotated successfully"
            }
        except Exception as e:
            logger.error(f"Error rotating geometry: {str(e)}")
            raise ValueError(f"Failed to rotate geometry: {str(e)}")
Behavior1/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 but provides none. It doesn't indicate whether this is a read-only or destructive operation, what permissions might be required, whether the rotation is applied in-place or returns a new geometry, what coordinate system is used, or any error conditions. The description fails to disclose any behavioral traits beyond the basic action.

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 maximally concise at just three words, with zero wasted language. It's appropriately sized for such a simple statement, though this conciseness comes at the expense of completeness. The structure is front-loaded with the core action, though there's no additional information to structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a geometry transformation tool with 4 parameters, 0% schema coverage, no annotations, and multiple sibling transformation tools, the description is completely inadequate. While an output schema exists (which might explain return values), the description fails to provide the minimal context needed for an agent to understand when and how to use this tool versus alternatives, what the parameters mean, or what behavioral characteristics to expect.

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?

With 0% schema description coverage for all 4 parameters, the description provides no semantic information about any parameters. It doesn't explain what 'geometry' should contain (coordinates, format), what 'angle' represents (degrees/radians, direction), what 'origin' options exist beyond the default 'center', or when to use 'use_radians'. The description fails to compensate for the complete lack of schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Rotate a geometry' is a tautology that restates the tool name without adding meaningful context. It specifies the verb ('rotate') and resource ('geometry'), but doesn't distinguish this from sibling tools like 'scale_geometry' or 'translate_geometry' beyond the obvious difference in transformation type. The description lacks specificity about what kind of geometry or rotation context is involved.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides absolutely no guidance on when to use this tool versus alternatives. There are multiple sibling geometry transformation tools (scale_geometry, translate_geometry, project_geometry, etc.), but the description offers no context about when rotation is appropriate versus other transformations, nor any prerequisites or limitations for using this tool.

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