Skip to main content
Glama

get_bounds

Calculate the bounding coordinates of a geographic shape to define its spatial extent for mapping and analysis.

Instructions

Get the bounds of a geometry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geometryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_bounds' tool. It parses a WKT geometry string using Shapely, computes the bounds (minx, miny, maxx, maxy), and returns them as a list in a success dictionary.
    @gis_mcp.tool()
    def get_bounds(geometry: str) -> Dict[str, Any]:
        """Get the bounds of a geometry."""
        try:
            from shapely import wkt
            geom = wkt.loads(geometry)
            return {
                "status": "success",
                "bounds": list(geom.bounds),
                "message": "Bounds calculated successfully"
            }
        except Exception as e:
            logger.error(f"Error calculating bounds: {str(e)}")
            raise ValueError(f"Failed to calculate bounds: {str(e)}")
  • Imports the shapely_functions module in the main entry point, triggering the @gis_mcp.tool() decorators to register the get_bounds tool with the FastMCP instance.
    from . import (
        geopandas_functions,
        shapely_functions,
        rasterio_functions,
        pyproj_functions,
        pysal_functions,
    )
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. It states a read operation ('Get'), implying it's likely non-destructive, but doesn't specify any behavioral traits such as input format requirements, error handling, or output characteristics. This leaves significant gaps in understanding how the tool behaves beyond its basic purpose.

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, clear sentence with no wasted words, making it easy to parse quickly. It's appropriately sized for a simple tool and front-loads the core action, though this brevity contributes to gaps in other dimensions.

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's apparent simplicity (one parameter, output schema provided), the description is minimally adequate but incomplete. It covers the basic purpose but lacks details on parameter semantics and behavioral context, which are needed for effective use. The presence of an output schema helps, but the description doesn't leverage this to guide usage.

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 required parameter 'geometry' of type string. The description mentions 'geometry' but adds no semantic meaning beyond what's in the schema—it doesn't explain what format the geometry string should be in (e.g., GeoJSON, WKT) or any constraints. With low schema coverage, the description fails to compensate adequately.

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

Purpose3/5

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

The description 'Get the bounds of a geometry' clearly states the action (get) and resource (bounds of a geometry), making the purpose understandable. However, it's somewhat vague about what 'bounds' specifically means (e.g., bounding box, extent) and doesn't distinguish it from similar tools like 'envelope' or 'minimum_rotated_rectangle' in the sibling list, which might serve overlapping purposes.

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. With siblings like 'envelope' and 'minimum_rotated_rectangle' that likely relate to geometric extents, there's no indication of differences in functionality or context, leaving the agent to guess based on tool names 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