-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Summary
Add Computed Fields
// In internal/models/types.go
type Park struct {
// ...existing fields...
// Enriched fields for better LLM understanding
Summary string `json:"summary,omitempty"` // One-sentence description
BestTimeToVisit string `json:"best_time_to_visit,omitempty"` // Derived from weather patterns
AccessibilityLevel string `json:"accessibility_level,omitempty"` // Easy/Moderate/Difficult
CrowdLevel string `json:"crowd_level,omitempty"` // Low/Medium/High (seasonal)
}Example Handler Enhancement
// In internal/mcp/handlers.go
func (s *Server) handleGetParkDetails(ctx context.Context, input GetParkDetailsInput) (*GetParkDetailsOutput, error) {
park, err := s.npsClient.GetParkDetails(ctx, input.ParkCode)
if err != nil {
return nil, err
}
// Enrich with computed insights
park = enrichParkData(park)
return &GetParkDetailsOutput{Park: park}, nil
}
func enrichParkData(park *models.Park) *models.Park {
// Generate concise summary from description
park.Summary = generateSummary(park.Description, 150) // 150 char max
// Add seasonal recommendations
park.BestTimeToVisit = determineBestSeason(park)
return park
}Reactions are currently unavailable