feat(tools): add maintenance and meal planning tools with CRUD operations
- Implement maintenance tool for adding, logging, and retrieving tasks - Create meals tool for managing recipes, meal plans, and shopping lists - Introduce reparse metadata tool for updating thought metadata - Add household knowledge, home maintenance, family calendar, meal planning, and professional CRM database migrations - Grant necessary permissions for new database tables
This commit is contained in:
@@ -24,7 +24,13 @@ type ToolSet struct {
|
||||
Recall *tools.RecallTool
|
||||
Summarize *tools.SummarizeTool
|
||||
Links *tools.LinksTool
|
||||
Backfill *tools.BackfillTool
|
||||
Backfill *tools.BackfillTool
|
||||
Reparse *tools.ReparseMetadataTool
|
||||
Household *tools.HouseholdTool
|
||||
Maintenance *tools.MaintenanceTool
|
||||
Calendar *tools.CalendarTool
|
||||
Meals *tools.MealsTool
|
||||
CRM *tools.CRMTool
|
||||
}
|
||||
|
||||
func New(cfg config.MCPConfig, toolSet ToolSet) http.Handler {
|
||||
@@ -123,6 +129,161 @@ func New(cfg config.MCPConfig, toolSet ToolSet) http.Handler {
|
||||
Description: "Generate missing embeddings for stored thoughts using the active embedding model.",
|
||||
}, toolSet.Backfill.Handle)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "reparse_thought_metadata",
|
||||
Description: "Re-extract and normalize metadata for stored thoughts from their content.",
|
||||
}, toolSet.Reparse.Handle)
|
||||
|
||||
// Household Knowledge
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "add_household_item",
|
||||
Description: "Store a household fact (paint color, appliance details, measurement, document, etc.).",
|
||||
}, toolSet.Household.AddItem)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "search_household_items",
|
||||
Description: "Search household items by name, category, or location.",
|
||||
}, toolSet.Household.SearchItems)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "get_household_item",
|
||||
Description: "Retrieve a household item by id.",
|
||||
}, toolSet.Household.GetItem)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "add_vendor",
|
||||
Description: "Add a service provider (plumber, electrician, landscaper, etc.).",
|
||||
}, toolSet.Household.AddVendor)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "list_vendors",
|
||||
Description: "List household service vendors, optionally filtered by service type.",
|
||||
}, toolSet.Household.ListVendors)
|
||||
|
||||
// Home Maintenance
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "add_maintenance_task",
|
||||
Description: "Create a recurring or one-time home maintenance task.",
|
||||
}, toolSet.Maintenance.AddTask)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "log_maintenance",
|
||||
Description: "Log completed maintenance work; automatically updates the task's next due date.",
|
||||
}, toolSet.Maintenance.LogWork)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "get_upcoming_maintenance",
|
||||
Description: "List maintenance tasks due within the next N days.",
|
||||
}, toolSet.Maintenance.GetUpcoming)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "search_maintenance_history",
|
||||
Description: "Search the maintenance log by task name, category, or date range.",
|
||||
}, toolSet.Maintenance.SearchHistory)
|
||||
|
||||
// Family Calendar
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "add_family_member",
|
||||
Description: "Add a family member to the household.",
|
||||
}, toolSet.Calendar.AddMember)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "list_family_members",
|
||||
Description: "List all family members.",
|
||||
}, toolSet.Calendar.ListMembers)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "add_activity",
|
||||
Description: "Schedule a one-time or recurring family activity.",
|
||||
}, toolSet.Calendar.AddActivity)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "get_week_schedule",
|
||||
Description: "Get all activities scheduled for a given week.",
|
||||
}, toolSet.Calendar.GetWeekSchedule)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "search_activities",
|
||||
Description: "Search activities by title, type, or family member.",
|
||||
}, toolSet.Calendar.SearchActivities)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "add_important_date",
|
||||
Description: "Track a birthday, anniversary, deadline, or other important date.",
|
||||
}, toolSet.Calendar.AddImportantDate)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "get_upcoming_dates",
|
||||
Description: "Get important dates coming up in the next N days.",
|
||||
}, toolSet.Calendar.GetUpcomingDates)
|
||||
|
||||
// Meal Planning
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "add_recipe",
|
||||
Description: "Save a recipe with ingredients and instructions.",
|
||||
}, toolSet.Meals.AddRecipe)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "search_recipes",
|
||||
Description: "Search recipes by name, cuisine, tags, or ingredient.",
|
||||
}, toolSet.Meals.SearchRecipes)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "update_recipe",
|
||||
Description: "Update an existing recipe.",
|
||||
}, toolSet.Meals.UpdateRecipe)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "create_meal_plan",
|
||||
Description: "Set the meal plan for a week; replaces any existing plan for that week.",
|
||||
}, toolSet.Meals.CreateMealPlan)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "get_meal_plan",
|
||||
Description: "Get the meal plan for a given week.",
|
||||
}, toolSet.Meals.GetMealPlan)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "generate_shopping_list",
|
||||
Description: "Auto-generate a shopping list from the meal plan for a given week.",
|
||||
}, toolSet.Meals.GenerateShoppingList)
|
||||
|
||||
// Professional CRM
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "add_professional_contact",
|
||||
Description: "Add a professional contact to the CRM.",
|
||||
}, toolSet.CRM.AddContact)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "search_contacts",
|
||||
Description: "Search professional contacts by name, company, title, notes, or tags.",
|
||||
}, toolSet.CRM.SearchContacts)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "log_interaction",
|
||||
Description: "Log an interaction with a professional contact.",
|
||||
}, toolSet.CRM.LogInteraction)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "get_contact_history",
|
||||
Description: "Get full history (interactions and opportunities) for a contact.",
|
||||
}, toolSet.CRM.GetHistory)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "create_opportunity",
|
||||
Description: "Create a deal, project, or opportunity linked to a contact.",
|
||||
}, toolSet.CRM.CreateOpportunity)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "get_follow_ups_due",
|
||||
Description: "List contacts with a follow-up date due within the next N days.",
|
||||
}, toolSet.CRM.GetFollowUpsDue)
|
||||
|
||||
addTool(server, &mcp.Tool{
|
||||
Name: "link_thought_to_contact",
|
||||
Description: "Append a stored thought to a contact's notes.",
|
||||
}, toolSet.CRM.LinkThought)
|
||||
|
||||
return mcp.NewStreamableHTTPHandler(func(*http.Request) *mcp.Server {
|
||||
return server
|
||||
}, &mcp.StreamableHTTPOptions{
|
||||
|
||||
Reference in New Issue
Block a user