[prompts] Add MCP prompts support for workflow templates #79
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Adds MCP prompts feature to capture geospatial workflow expertise in reusable templates. Prompts guide AI agents through multi-step tasks with best practices built-in, complementing the tool description improvements in #78.
What are MCP Prompts?
Prompts are pre-built workflow templates that:
Think of them as "recipes" for common geospatial workflows.
Infrastructure Added
Base Classes
BasePrompt- Abstract base class with:Prompt Registry
promptRegistry.ts- Central registry for all promptsgetAllPrompts()- Get all available promptsgetPromptByName(name)- Get specific promptServer Integration
promptscapability to MCP serverListPromptsrequest handlerGetPromptrequest handlerPrompts Added (3)
1.
find-places-nearbySearch for places near a location with map visualization.
Workflow: Geocode location → Category search → Display results on map
Arguments:
location(required) - Address, place name, or coordinatescategory(optional) - Type of place (e.g., "coffee shops", "restaurants")radius(optional) - Search radius in meters (default: 1000)Example queries:
2.
get-directionsTurn-by-turn directions with route visualization.
Workflow: Geocode locations → Get directions → Display route on map
Arguments:
from(required) - Starting locationto(required) - Destination locationmode(optional) - Travel mode: driving, walking, or cycling (default: driving)Example queries:
3.
show-reachable-areasIsochrone visualization for accessibility analysis.
Workflow: Geocode location → Calculate isochrone → Display coverage areas
Arguments:
location(required) - Center point locationtime(optional) - Travel time in minutes (comma-separated for multiple: "10,20,30")mode(optional) - Travel mode: driving, walking, or cycling (default: driving)Example queries:
Benefits
For AI Agents
For RAG-based Systems
Example RAG Flow
How Clients Use Prompts
List available prompts
Get a prompt with arguments
Testing
Relationship to #78
This PR complements the tool description improvements:
Together they provide:
Future Work
Potential additional prompts:
optimize-route- Multi-stop route optimizationcompare-locations- Travel time comparison between locationsanalyze-accessibility- Accessibility analysis for a service areamap-visualization- Create custom map with multiple layers🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com