Skip to main content
Glama

voronoi

Generate Voronoi diagrams from point data to visualize spatial proximity and territory allocation for geospatial analysis.

Instructions

Create a Voronoi diagram from points.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geometryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'voronoi' tool. It takes a WKT string of points, computes the Voronoi diagram using shapely.ops.voronoi_diagram, and returns the result as WKT.
    def voronoi(geometry: str) -> Dict[str, Any]:
        """Create a Voronoi diagram from points."""
        try:
            from shapely import wkt
            from shapely.ops import voronoi_diagram
            geom = wkt.loads(geometry)
            result = voronoi_diagram(geom)
            return {
                "status": "success",
                "geometry": result.wkt,
                "message": "Voronoi diagram created successfully"
            }
        except Exception as e:
            logger.error(f"Error creating Voronoi diagram: {str(e)}")
            raise ValueError(f"Failed to create Voronoi diagram: {str(e)}")
  • Resource listing that registers 'voronoi' as an available advanced GIS operation.
    def get_advanced_operations() -> Dict[str, List[str]]:
        """List available advanced operations."""
        return {
            "operations": [
                "triangulate_geometry",
                "voronoi",
                "unary_union_geometries"
            ]
        }
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. It states 'Create' which implies a write/mutation operation, but provides no information about permissions, side effects, output format, error conditions, or computational characteristics. This is inadequate for a tool with mutation implications.

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, efficient sentence with zero wasted words. It's front-loaded with the core action and immediately communicates the essential operation.

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?

The tool has an output schema which reduces the need to describe return values, but with no annotations and minimal parameter guidance, the description leaves significant gaps. For a geometric processing tool among many alternatives, more context about use cases and input requirements would be valuable.

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?

Schema description coverage is 0%, so the description must compensate. It mentions 'from points' which hints that the 'geometry' parameter should contain point data, but doesn't specify format (e.g., GeoJSON, WKT), structure, or constraints. This adds minimal value beyond the bare parameter name.

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 ('Create') and resource ('Voronoi diagram from points'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'triangulate_geometry' or 'convex_hull', but the specific geometric operation is clear.

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 many sibling tools performing geometric operations (e.g., 'triangulate_geometry', 'convex_hull', 'buffer'), there's no indication of when Voronoi diagrams are appropriate or what prerequisites exist.

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