Expose OGC WMS and WFS geospatial services as Model Context Protocol tools.
Three well-named, verb-prefixed tools with complete input schemas and clear descriptions. All parameters are typed and described. Tool names (list_wms_layers, get_wms_map, query_wfs_features) follow verb_noun convention and are unambiguous. Descriptions are substantive (100-200 chars), explaining what each tool does and what it returns. Input schemas use proper JSON Schema with types, descriptions, and sensible defaults. However, output schemas are not formally documented in the tool definitions, LayerInfo is a Pydantic model but not exposed in the schema metadata. Error handling is present (wrap_connection_errors context manager) but not integrated into tool responses; agents see raw exceptions rather than actionable recovery guidance. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite all three being READ_ONLY operations.
Fetch a rendered map image from a WMS endpoint. Args: wms_url: Base URL of the WMS service. layer: Layer name (from list_wms_layers). bbox: (minx, miny, maxx, maxy) in the requested CRS. crs: Coordinate reference system (default EPSG:3857, Web Mercator). width: Output image width in pixels. height: Output image height in pixels. image_format: MIME type of the image (default "image/png"). time: Optional ISO 8601 time value for time-aware layers. Returns: The rendered map as an image the client can display.
Discover the layers a WMS endpoint exposes. Args: wms_url: Base URL of the WMS service. Returns: One LayerInfo per named layer (name, title, abstract, CRS options, bbox).
Query vector features from a WFS endpoint as GeoJSON. Args: wfs_url: Base URL of the WFS service. type_name: Feature type to query (from the service's capabilities). bbox: Optional bounding box filter (minx, miny, maxx, maxy). max_features: Maximum number of features to return. Returns: A GeoJSON FeatureCollection as a dict.
Output schemas not formally documented. LayerInfo and GeoJSON FeatureCollection are returned but not described in tool metadata. LLMs cannot plan downstream operations without knowing response structure.
Error handling does not guide LLM recovery. wrap_connection_errors catches exceptions and raises OGCError, but tool implementations do not catch these and return structured error responses. Agents see raw exceptions instead of actionable messages like 'Try a different WMS URL' or 'Layer not found. Available layers: ...'
No tool annotations despite all three tools being READ_ONLY. FastMCP supports readOnlyHint via @mcp.tool(readOnly=True). This metadata helps clients optimize caching and concurrency.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 65 | 2026-07-28+ | v2 |
get_wms_map returns Image(data=..., format=...) but the Image type and its serialization are not documented. LLMs need to know the response is binary image data, not a JSON object.
query_wfs_features returns dict[str, Any] with no schema documentation. GeoJSON FeatureCollection structure is not described, forcing LLMs to guess at response fields.