Skip to main content
Glama
GIS MCP Server
by mahdin75

snap_geometry

Aligns one geometry to another within a specified distance tolerance, returning the adjusted geometry as WKT for GIS topology correction.

Instructions

Snap one geometry to another using shapely.ops.snap. Args: geometry1: WKT string of the geometry to be snapped. geometry2: WKT string of the reference geometry. tolerance: Distance tolerance for snapping. Returns: Dictionary with status, message, and snapped geometry as WKT.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "geometry1": "<geometry1>",
      "geometry2": "<geometry2>",
      "tolerance": "<tolerance>"
    },
    "name": "snap_geometry"
  }
}

Input Schema

NameRequiredDescriptionDefault
geometry1Yes
geometry2Yes
toleranceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.16.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. Changed5 schema fields changedv1.0.0
    • removedInput schema / properties / geometry1 / title
      Removed value: -"Geometry1"
    • removedInput schema / properties / geometry2 / title
      Removed value: -"Geometry2"
    • removedInput schema / properties / tolerance / title
      Removed value: -"Tolerance"
    • removedInput schema / title
      Removed value: -"snap_geometryArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  3. First observed

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden; it does usefully state the return shape (status, message, snapped geometry as WKT) and the delegated algorithm. It omits tolerances-in-coordinate-units, CRS assumptions, whether inputs are mutated, and what failure conditions produce a non-success status.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The docstring format is compact and front-loads the action before the parameter list, with no filler sentences. The Args section largely restates parameter names already present in the schema, which is mildly redundant but conventional.

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?

For a three-required-parameter geometry transform with no output schema and no annotations, the description covers purpose, inputs, and return shape, which is most of the burden. It stops short on the details an agent needs to call it correctly the first time: tolerance units and error behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/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, and it does establish that both geometry inputs are WKT strings and which one is the target versus the reference. However, 'tolerance' is only described as 'Distance tolerance for snapping' with no units or basis, which is the single most consequential detail for correct invocation.

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 gives a specific verb and resource ('Snap one geometry to another') and even names the underlying operation (shapely.ops.snap), which tells an agent exactly what geometric transformation occurs. It does not name or contrast with any sibling tool, so differentiation is left to the agent's inference.

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?

There is no statement of when this tool should be chosen over related siblings such as normalize_geometry or nearest_point_on_geometry, nor any precondition (matching CRS, overlapping extents) that would determine success. The only guidance is an implicit reading of the two-role parameter split.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.