Skip to main content
Glama
USGS Spatial Data Catalog MCP Server

USGS Spatial Data Catalog MCP Server

by GSA-TTS

Usgs Spatcat Distance To Layers

usgs_spatcat_distance_to_layers
Read-onlyIdempotent

Find the nearest vector features in specified USGS layers to a WGS84 point, polygon, or multipolygon, with distance in meters and an outward search buffer.

Instructions

Find nearest vector features to a WGS84 Point, Polygon, or MultiPolygon.

Esri/WFS distance is closest approach in meters, zero for overlap, searching outward up to buffer_meters. S3 vectors use polygon centroids and ignore buffer_meters. Raster distance (COG/WCS/WMS raster) is NOT implemented. Discover supported layers first. No match does not prove absence beyond the search radius; preserve per-layer errors.

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": {
      "layer_ids": "<layer_ids>",
      "geometry": "<geometry>"
    },
    "name": "usgs_spatcat_distance_to_layers"
  }
}

Input Schema

NameRequiredDescriptionDefault
geometryYesBounded two-dimensional WGS84 GeoJSON geometry (longitude, latitude).
layer_idsYes
buffer_metersNo

Output Schema

NameRequiredDescriptionDefault
dataYes
sourceYes
warningsNo
retrieved_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/openWorld annotations, the description discloses the distance metric (closest approach in meters, zero for overlap), the outward search bound, a backend-specific quirk (S3 vectors use polygon centroids and ignore buffer_meters), an explicitly unimplemented raster path, and an error-handling instruction to preserve per-layer errors. These are behavioral facts an agent could not derive from the schema or annotations.

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?

Purpose is front-loaded in the first sentence with operational caveats following in descending order of importance. Every sentence carries information, though 'Raster distance (COG/WCS/WMS raster) is NOT implemented' repeats the word raster and the telegraphic style occasionally costs readability.

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?

An output schema exists, so return-value documentation is not required, and the description covers the non-obvious behaviors an agent needs: metric semantics, buffer behavior, backend divergence, and the negative-result caveat. Remaining gaps (how layer_ids are sourced, what per-layer errors look like) are minor for a 3-parameter read-only tool.

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 only 33%, with only the geometry object documented, so the description has to carry buffer_meters and layer_ids. It does add real meaning for buffer_meters ('searching outward up to buffer_meters', and that S3 layers ignore it), but layer_ids gets only the indirect 'discover supported layers first' hint, and the units/effect of buffer_meters beyond the schema default are not elaborated. Partial compensation warrants a 3.

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 first sentence names a specific verb and resource ('Find nearest vector features') and bounds the input geometry types (WGS84 Point, Polygon, MultiPolygon). It also implicitly separates itself from the intersect sibling by framing the operation as proximity search rather than overlay. It stops short of naming any sibling explicitly, keeping it just below a 5.

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

Usage Guidelines4/5

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

'Discover supported layers first' tells the agent a prerequisite step exists, and 'Raster distance ... is NOT implemented' plus the S3-centroid caveat define clear boundary conditions on when this tool applies. The portable guidance is present but the discovery tool is not named, so the agent must infer that usgs_spatcat_list_spatial_layers or search_layers is the prerequisite.

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