You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose the existing static-map capability through the MCP server so an AI client can request a map for a GeoBTAA resource and receive an actual image result rather than only a URL or textual geometry description.
The first implementation should reuse the current static-map service and cache behind GET /api/v1/static-maps/{resource_id}. It should not introduce a parallel rendering pipeline.
The final tool name and schema may follow the existing MCP naming conventions.
Behavior
Resolve the requested resource using its canonical GeoBTAA identifier.
Render or retrieve the cached static map for the resource geometry.
Return the image through MCP as image content with the correct MIME type.
Include compact textual context alongside the image: resource ID, title, geographic extent, canonical resource URL, and map endpoint URL.
Return a useful structured error when the resource does not exist, has no usable geometry, cannot be rendered, or exceeds configured limits.
Preserve the existing static-map fallback/placeholder behavior only when it communicates a real no-geometry state; do not present a placeholder as a successfully rendered geographic map.
Acceptance criteria
A new MCP tool is discoverable through tools/list with a clear description and JSON schema.
Calling the tool for a resource with valid geometry returns valid image content and the correct MIME type.
The implementation delegates rendering and caching to the existing static-map service.
The response includes enough text metadata for clients that do not display MCP image content.
Unknown IDs, missing geometry, renderer failures, timeouts, and unsupported options produce stable, documented errors.
Width, height, and output format are constrained to safe supported values with sensible defaults.
Authorization and visibility rules are applied before returning metadata or imagery.
Unit and MCP integration tests cover successful, cached, missing-geometry, unauthorized, invalid-input, and renderer-failure paths.
The MCP documentation includes example requests and describes the returned content blocks.
Summary
Expose the existing static-map capability through the MCP server so an AI client can request a map for a GeoBTAA resource and receive an actual image result rather than only a URL or textual geometry description.
The first implementation should reuse the current static-map service and cache behind
GET /api/v1/static-maps/{resource_id}. It should not introduce a parallel rendering pipeline.Proposed tool
The final tool name and schema may follow the existing MCP naming conventions.
Behavior
Acceptance criteria
tools/listwith a clear description and JSON schema.Implementation context
Relevant existing components include:
backend/app/services/mcp_service.pybackend/app/tasks/static_maps.pyGET /api/v1/static-maps/{resource_id}GET /api/v1/static-maps/{resource_id}/geometrybackend/tests/services/test_mcp_service.pybackend/tests/api/v1/test_static_map_endpoints.py