Skip to main content
Glama
GSA-TTS

mcp-server-usgs-nationalmap

by GSA-TTS

Count NHDPlus HR Features at Geometry

hydro_count_features
Read-onlyIdempotent

Count hydrographic features (streams, lakes, gages, etc.) intersecting a given point or GeoJSON geometry. Use it to estimate result size before running detailed feature queries, avoiding large data transfers.

Instructions

Return ONLY how many features of a layer intersect a point or geometry (size check).

Use before the find_* tools to gauge result size without fetching full attributes -- useful for large polygons or densely mapped areas. A count of 0 means the geometry is outside coverage or has no features of that type.

Returns: { "count": int, "layer": str, "query_geometry": {"type": str, "crs_epsg": int}, "provenance": {...} }

Error responses:

  • "Error: supply either lat+lon or geometry, not both (or neither)"

  • "Error: unsupported geometry type ..."

  • "Error: NHDPlus HR request failed: ..."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latNoLatitude in decimal degrees (WGS84). Use with 'lon'. Omit when supplying 'geometry'.
lonNoLongitude in decimal degrees (WGS84). Use with 'lat'. Omit when supplying 'geometry'.
layerYesWhich feature layer to count. One of: 'waterways' (flowlines), 'waterbodies', 'areas', 'gages', 'points', 'lines', 'watershed'.
geometryNoGeoJSON geometry object as a JSON string. Supported types: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, or BoundingBox shorthand {"type": "BoundingBox", "bbox": [minLon, minLat, maxLon, maxLat]}. All coordinates must be WGS84 decimal degrees. Supply either this OR lat+lon, not both.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Despite annotations already declaring readOnlyHint and idempotentHint, the description adds substantial behavioral context: the tool returns ONLY a count (no full attributes), interprets a count of 0, provides exact return JSON structure, and lists specific error messages. This goes beyond what annotations alone convey, covering edge cases and response semantics.

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 well-organized and every sentence earns its place: a clear purpose, a usage guideline, an interpretation of results, and a concise return/error format. The inclusion of JSON and error examples is justified for agent clarity, and the structure is easily scannable.

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

Completeness5/5

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

For a relatively simple tool with 4 params and an output schema, the description fully covers the tool's role, output structure, and error conditions. It also addresses the only non-obvious outcome (zero count) and provides enough context for an agent to decide when to invoke it without needing to see the output schema.

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 100%, so the input schema already fully documents all parameters (lat, lon, layer, geometry) with their constraints and inter-dependencies. The tool description adds no extra parameter semantics beyond what is already in the schema, meeting the baseline for full schema coverage.

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

Purpose5/5

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

The description explicitly states the tool counts features intersecting a point or geometry, using a specific verb ('Return ONLY how many') and resource ('features of a layer'). It differentiates from sibling find_* tools by framing it as a size check, making its purpose unmistakable.

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

Usage Guidelines5/5

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

The description tells the agent exactly when to use this tool: 'Use before the find_* tools to gauge result size without fetching full attributes', and for what scenarios (large polygons, densely mapped areas). It also clarifies the meaning of a zero count, effectively guiding when not to proceed.

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/GSA-TTS/mcp-server-usgs-nationalmap'

If you have feedback or need assistance with the MCP directory API, please join our Discord server