Skip to main content
Glama
GSA-TTS

mcp-server-usace-iwr

by GSA-TTS

mcp-server-usace-iwr

An MCP (Model Context Protocol) server that wraps the U.S. Army Corps of Engineers (USACE) Institute for Water Resources (IWR) River Mile Marker ArcGIS Feature Service, letting an LLM locate river mile markers on navigable U.S. rivers and answer "what river mile am I at?" style questions.

  • Dataset: USACE River Mile Markers

  • Service: https://services7.arcgis.com/n1YM8pTrFmm7L4hs/arcgis/rest/services/usace_river_mile_markers/FeatureServer/0

  • Auth: none (public service)

  • CRS: WGS84 (EPSG:4326) decimal degrees

Tools

Tool

Purpose

usace_rivermile_nearest

Return the single closest marker to a lat/lon (with distance + bearing).

usace_rivermile_find_markers

Find markers near a point (radius) or within a GeoJSON geometry/bbox.

usace_rivermile_query

Filter markers by river name and/or mile-value range, with pagination.

All tools are read-only and return provenance (source agency, dataset, service URL, layer, CRS, retrieval time).

Related MCP server: pumperly-mcp

Layer fields

name, LONGITUDE1, LATITUDE1, MILE, RIVER_CODE, RIVER_NAME, RIVER_NUMB, SOURCE.

Running locally (stdio)

uv sync
uv run python -m usace_iwr_server.app

The server uses stdio transport by default. If a PORT (or DATABRICKS_APP_PORT) environment variable is set, it serves streamable HTTP at /mcp instead, with a /health readiness endpoint.

Container / deployment

bash scripts/build-and-push.sh   # builds linux/amd64 and pushes to GHCR

Development

uv run python -m py_compile src/usace_iwr_server/*.py src/usace_iwr_server/tools/*.py
npx @modelcontextprotocol/inspector uv run python -m usace_iwr_server.app

Available Tools

3 tools
usace_rivermile_find_markersFind River Mile Markers Near a LocationA
Read-onlyIdempotent

Find USACE river mile markers near a point or within a geometry.

Accepts EITHER a lat/lon pair (+ radius_meters) OR a GeoJSON geometry string.

Use lat+lon when: "What river mile markers are near 31.45, -92.71?", "Markers within 2 km of this boat ramp?" Use geometry when: "Which markers fall inside this county polygon / bbox?", "Markers along this river-reach corridor?"

For point (lat/lon) queries, each returned marker includes 'distance_m' (great-circle meters from the query point) and results are sorted nearest-first. Geometry queries return markers intersecting the geometry.

Returns: { "count": int, # markers returned (after limit) "truncated": bool, # true if more markers matched than returned "markers": [ { name, MILE, RIVER_NAME, RIVER_CODE, RIVER_NUMB, LONGITUDE1, LATITUDE1, SOURCE, distance_m? }, ... ], "query": { "type": str, "radius_meters": float|null, "crs_epsg": int }, "provenance": { source agency, dataset, service URL, layer, CRS, retrieved_utc } }

Error responses:

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

  • "Error: 'geometry' is not valid JSON: ..."

  • "Error: unsupported geometry type ..."

  • "Error: River Mile request failed: ..."

ParametersJSON Schema
NameRequiredDescriptionDefault
latNoLatitude in decimal degrees (WGS84). Use with 'lon' for a proximity search. Omit when supplying 'geometry'.
lonNoLongitude in decimal degrees (WGS84). Use with 'lat' for a proximity search. Omit when supplying 'geometry'.
limitNoMaximum number of markers to return. Default 25.
geometryNoGeoJSON geometry object as a JSON string. Supported types: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon. Also accepts BoundingBox shorthand: {"type": "BoundingBox", "bbox": [minLon, minLat, maxLon, maxLat]}. All coordinates must be WGS84 decimal degrees. Supply either this OR lat+lon, not both.
radius_metersNoSearch radius in meters around the lat/lon point. Ignored when 'geometry' is supplied. Default 5000 (5 km).

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

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

The annotations already state readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description adds value beyond annotations by explaining that results for point queries include 'distance_m' and are sorted nearest-first, that geometry queries return intersecting markers, and that the 'truncated' field indicates more matches exist. It also lists error responses. This is above and beyond what annotations provide, though the output schema (which exists) already documents the return format, slightly reducing the need for that detail.

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 description is well-structured with clear sections (purpose, usage patterns, return format, error responses). It is fairly concise for the amount of information provided, but could be slightly trimmed (e.g., the full error list could be summarized as 'See error responses: ...'). Still, nearly every sentence earns its place.

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?

For a tool with 5 parameters, 100% schema coverage, a detailed output schema, and comprehensive annotations, the description is nearly complete. It explains the two usage modes, result sorting, truncation behavior, and error cases. The only minor gap is that it does not explicitly state what happens when no markers are found (though the output schema structure implicitly shows count=0). Overall, very well-rounded.

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%, providing solid baseline. The description adds limited extra semantics beyond the schema—it explains the dual-mode logic and gives usage examples, but the schema already covers descriptions for each parameter decently. The description does not add new constraints or format details for parameters that aren't already in the schema. Baseline 3 is appropriate.

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 clearly specifies 'Find USACE river mile markers near a point or within a geometry', using a specific verb ('Find'), a distinct resource ('USACE river mile markers'), and the operation's dual modes (point+radius or geometry). It explicitly distinguishes itself from siblings by not being the 'nearest' or a generic 'query' tool.

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 provides explicit when-to-use guidance with concrete query examples for both lat/lon and geometry modes, and clearly warns 'supply either lat+lon or geometry, not both (or neither)'. This fully addresses when and how to choose between usage patterns, earning a top score.

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

usace_rivermile_nearestNearest River Mile Marker to a LocationA
Read-onlyIdempotent

Return the single closest river mile marker to a WGS84 coordinate.

Answers "what river mile am I at?" / "nearest marker to this point". Searches within max_radius_meters and returns the nearest marker with its great-circle distance, plus a plain-language finding.

Returns: { "finding": str, # e.g. "Nearest marker: RED River, Mile 111, ~180 m NE" "found": bool, "nearest": { name, MILE, RIVER_NAME, RIVER_CODE, RIVER_NUMB, LONGITUDE1, LATITUDE1, SOURCE, distance_m, bearing } | null, "candidates_searched": int, "query": { "lat": float, "lon": float, "max_radius_meters": float, "crs_epsg": int }, "provenance": { source agency, dataset, service URL, layer, CRS, retrieved_utc } }

Error responses:

  • "Error: River Mile request failed: ..."

ParametersJSON Schema
NameRequiredDescriptionDefault
latYesLatitude in decimal degrees (WGS84).
lonYesLongitude in decimal degrees (WGS84).
max_radius_metersNoMaximum search radius in meters. If no marker is found within this radius, the tool reports none found. Default 50000 (50 km).

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so safety is clear. The description adds substantial behavioral detail beyond annotations: it explains the search logic (nearest within radius, great-circle distance calculation), the return structure including bearing and plain-language finding, and error response format. This is valuable context that complements the annotations.

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 concise and well-structured. It leads with the core purpose in the first sentence, then provides a clear example of the JSON return and error format. Every sentence serves a purpose, and the structure allows quick scanning for an agent. No wasted text.

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?

Given the low parameter count (3), full schema coverage, presence of annotations, and output schema, the description is complete. It covers the core logic, return structure, error handling, and provenance information. An agent has all necessary context to invoke and correctly interpret results.

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 baseline is 3. The description does not add new parameter-level detail beyond what the schema provides; it only reiterates the max_radius_meters search behavior. The lat/lon parameters are not elaborated beyond the schema. Thus, the description adds marginal value to parameter understanding.

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 starts with a clear verb and resource: 'Return the single closest river mile marker to a WGS84 coordinate.' It pinpoints the exact operation (find nearest) and resource (river mile marker), and implicitly distinguishes from siblings by focusing on 'single closest' rather than listing or querying multiple markers.

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?

The description explicitly frames the use case: 'Answers "what river mile am I at?" / "nearest marker to this point"', providing clear context for when to use this tool. It also mentions the max_radius_meters search boundary. However, it does not explicitly indicate when NOT to use (e.g., if multiple markers are needed) or reference sibling tools as alternatives, leaving a slight gap in exclusion guidance.

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

usace_rivermile_queryQuery River Mile Markers by River and Mile RangeA
Read-onlyIdempotent

Query USACE river mile markers by river name and/or mile-value range.

Use when: "List markers on the RED river", "How many markers on the Mississippi between mile 400 and 600?", "Show markers on the Ohio above mile 900" (mile_min=900).

Results are ordered by MILE ascending and paginated. total_count reflects all matching markers; use next_offset to fetch the next page.

Returns: { "count": int, # markers on this page "total_count": int, # total markers matching the filter "has_more": bool, "next_offset": int|null, # pass as 'offset' to get the next page "where": str, # the WHERE clause applied (for transparency) "markers": [ { name, MILE, RIVER_NAME, RIVER_CODE, RIVER_NUMB, LONGITUDE1, LATITUDE1, SOURCE }, ... ], "provenance": { source agency, dataset, service URL, layer, CRS, retrieved_utc } }

Error responses:

  • "Error: mile_min cannot be greater than mile_max"

  • "Error: provide at least one filter (river_name, mile_min, or mile_max)"

  • "Error: River Mile request failed: ..."

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum markers to return per page. Default 25.
offsetNoNumber of matching markers to skip (for pagination). Default 0.
mile_maxNoMaximum river mile value (inclusive). Omit for no upper bound.
mile_minNoMinimum river mile value (inclusive). Omit for no lower bound.
river_nameNoRiver name to filter on (case-insensitive substring match against RIVER_NAME, e.g. 'RED', 'MISSISSIPPI', 'OHIO'). Omit to match all rivers.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true, so the safety profile is clear. The description adds useful behavioral details: results are ordered by MILE ascending, paginated via offset with total_count and next_offset, and a 'where' field is included for transparency. It also documents three specific error responses. Minor gap: no mention of rate limits or data staleness, but overall strong for a read-only query tool.

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-structured with clear sections: purpose, usage examples, pagination semantics, output format, and error responses. Every line is informative, and the examples are front-loaded. At about 20 lines, it's appropriately sized without redundancy.

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?

Given the tool has 5 parameters with 100% schema coverage, an output schema that documents the return structure, and clear annotations, the description is complete. It covers pagination behavior, error handling, filter constraints, and response structure. No gaps remain for effective agent decision-making.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds value by showing example values (e.g., 'RED', 'MISSISSIPPI', 'OHIO') for river_name, clarifying inclusive bounds for mile_min/mile_max, and demonstrating usage patterns (e.g., 'mile_min=900'). It also explains the interplay between filters ('provide at least one filter'). However, it doesn't add new parameter semantics beyond what the schema already provides, so a 4 is appropriate.

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 clearly states the tool queries USACE river mile markers by river name and/or mile-value range, using specific verbs like 'Query' and 'List'. It distinguishes from siblings by mentioning filtering by river and mile range, while sibling names like 'find_markers' and 'nearest' imply different use cases.

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 explicitly states when to use the tool with example queries ('List markers on the RED river', 'How many markers on the Mississippi between mile 400 and 600?') and provides a clear alternative pattern (mile_min=900). It does not mention siblings directly but implies when to use this vs other tools by its focus on combined river and mile filtering.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.0
    • First observedusace_rivermile_find_markers
    • First observedusace_rivermile_nearest
    • First observedusace_rivermile_query

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: find_markers returns all markers near a point or within a geometry, nearest returns the single closest marker to a coordinate, and query filters by river name and mile range. Their descriptions are thorough and include usage guidance that eliminates ambiguity.

Naming Consistency4/5

All tool names follow a `usace_rivermile_verb` pattern, using clear and descriptive verbs (find_markers, nearest, query). The naming is consistent and predictable, though slightly long. A minor deviation is that 'nearest' is an adjective rather than a verb, but the intent is still clear.

Tool Count5/5

Three tools is an ideal count for this specialized domain. Each tool addresses a distinct and common query pattern for river mile markers: spatial search, nearest point, and attribute-based filtering. There are no redundant or missing core operations.

Completeness4/5

The tool set covers the primary use cases for querying river mile markers: proximity search, nearest-marker lookup, and attribute filtering/pagination. A minor gap is the lack of a tool to retrieve a single marker by ID or name, but the existing tools cover the most common workflows without dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    An experimental MCP server providing spatial context for LLMs by interfacing with French Geoplateforme services. It enables tasks such as geocoding, altitude lookups, and querying administrative, cadastral, or urban planning data.
    12
    4
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that gives AI assistants direct access to the FEMA National Flood Hazard Layer (NFHL) for flood zone lookups, FIRM panel information, and flood map data in the United States.
    6
    15
    MIT

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-usace-iwr'

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