Skip to main content
Glama

Topological relationship

check_spatial_relationship
Read-onlyIdempotent

Ground-truth topology: does geometry_a geometry_b?

    Use instead of guessing containment, overlap or adjacency. Invalid geometries (for
    example self-intersecting polygons) are refused with the reason.
    

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": {
      "geometry_a": "<geometry_a>",
      "geometry_b": "<geometry_b>",
      "relationship": "<relationship>"
    },
    "name": "check_spatial_relationship"
  }
}

Input Schema

NameRequiredDescriptionDefault
geometry_aYesA GeoJSON geometry, e.g. {"type": "Point", "coordinates": [lon, lat]}
geometry_bYesA GeoJSON geometry, e.g. {"type": "Point", "coordinates": [lon, lat]}
relationshipYesThe relationship to test: does geometry_a <relationship> geometry_b

Output Schema

NameRequiredDescriptionDefault
holdsYesWhether geometry_a <relationship> geometry_b is true
unitsNoUnit of each numeric field
statusNook
warningsNoCaveats to tell the user
provenanceNoSource, licence, attribution, retrieval time and method
relationshipYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / relationship / description
      Added value: +"The relationship to test: does geometry_a <relationship> geometry_b"
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds a real behavioral trait not present in any structured field: invalid geometries such as self-intersecting polygons are refused with a stated reason, which tells the agent how failures surface.

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?

Two short sentences, front-loaded with the core action and followed immediately by the usage hint and the failure behavior. No filler, though the inline angle-bracket placeholder reads slightly like a template rather than prose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With three required parameters all schema-documented, an output schema carrying return values, and annotations covering the safety profile, the description needs only to explain the operation and its failure mode, which it does. Only the absence of guidance on choosing among the sibling spatial tools leaves a minor gap.

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 coverage is 100%, so both geometry parameters and the relationship enum are already fully documented with examples and valid values. The description only restates the 'geometry_a <relationship> geometry_b' ordering as a placeholder template, adding no input semantics beyond the schema.

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 states a specific verb and resource: it tests a named topological relationship between two GeoJSON geometries. That is clear enough to separate it from distance/measurement tools, but it never names a sibling such as spatial_operation as the contrasting alternative, leaving differentiation implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use instead of guessing containment, overlap or adjacency' gives a situational cue for when to reach for this tool. However, there is no when-not guidance, no prerequisites, and no explicit routing to or away from the other spatial tools, so the agent must infer context.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.