Skip to main content
Glama

envelope

Calculate the bounding box for any geometry to define its spatial extent for mapping and analysis.

Instructions

Get bounding box of a geometry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geometryYes

Implementation Reference

  • The core handler function for the 'envelope' MCP tool, which computes the bounding box (envelope) of an input geometry provided as WKT string using Shapely library and returns the result as WKT with status information.
    @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