Skip to main content
Glama

envelope

Calculate the bounding box of a geometry using the GIS MCP Server, enabling precise geospatial analysis and integration with AI-driven workflows.

Instructions

Get bounding box of a geometry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geometryYes

Implementation Reference

  • The handler function for the "envelope" MCP tool. It takes a WKT geometry string, loads it with Shapely, computes the envelope (bounding box), and returns the result as WKT in a success dictionary.
    @gis_mcp.tool() def envelope(geometry: str) -> Dict[str, Any]: """Get bounding box of a geometry.""" try: from shapely import wkt geom = wkt.loads(geometry) result = geom.envelope return { "status": "success", "geometry": result.wkt, "message": "Envelope created successfully" } except Exception as e: logger.error(f"Error creating envelope: {str(e)}") raise ValueError(f"Failed to create envelope: {str(e)}")

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