Skip to main content
Glama

minimum_rotated_rectangle

Calculate the smallest rotated rectangle that encloses a geometry, useful for bounding box analysis and spatial orientation in GIS workflows.

Instructions

Get minimum rotated rectangle of a geometry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geometryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'minimum_rotated_rectangle' tool. It takes a WKT geometry string, loads it with shapely.wkt.loads, computes the minimum rotated rectangle using geom.minimum_rotated_rectangle, and returns the result as WKT in a success dictionary.
    @gis_mcp.tool()
    def minimum_rotated_rectangle(geometry: str) -> Dict[str, Any]:
        """Get minimum rotated rectangle of a geometry."""
        try:
            from shapely import wkt
            geom = wkt.loads(geometry)
            result = geom.minimum_rotated_rectangle
            return {
                "status": "success",
                "geometry": result.wkt,
                "message": "Minimum rotated rectangle created successfully"
            }
        except Exception as e:
            logger.error(f"Error creating minimum rotated rectangle: {str(e)}")
            raise ValueError(f"Failed to create minimum rotated rectangle: {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 what the tool does ('Get minimum rotated rectangle') without any details on behavior, such as input format (e.g., geometry string representation), output characteristics, error handling, or computational implications. 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, direct sentence with no wasted words. It is front-loaded with the core action and resource, making it highly efficient. Every word contributes to the purpose without redundancy or unnecessary elaboration.

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 geometric operations and the lack of annotations, the description is incomplete. It does not explain what a 'minimum rotated rectangle' entails (e.g., orientation, area minimization), input requirements, or output format. While an output schema exists, the description should provide more context to guide effective use, especially with no annotations and low schema coverage.

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 but no details on format or constraints. The description does not add any semantic information about the parameter, such as expected geometry formats (e.g., GeoJSON, WKT) or examples. It fails to compensate for the low schema coverage.

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 the resource 'minimum rotated rectangle of a geometry', which is specific and functional. It distinguishes itself from siblings like 'envelope' or 'convex_hull' by specifying the 'rotated' aspect, though it doesn't explicitly contrast with them. The purpose is unambiguous but lacks explicit 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?

No guidance is provided on when to use this tool versus alternatives. The description does not mention prerequisites, context, or exclusions, such as when a rotated rectangle is preferred over a standard envelope or convex hull. It leaves the agent to 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