feat(tools): link thoughts and learnings
This commit is contained in:
@@ -38,14 +38,15 @@ type ToolSet struct {
|
||||
Reparse *tools.ReparseMetadataTool
|
||||
RetryMetadata *tools.RetryEnrichmentTool
|
||||
//Maintenance *tools.MaintenanceTool
|
||||
Skills *tools.SkillsTool
|
||||
Personas *tools.AgentPersonasTool
|
||||
ChatHistory *tools.ChatHistoryTool
|
||||
Describe *tools.DescribeTool
|
||||
Learnings *tools.LearningsTool
|
||||
Plans *tools.PlansTool
|
||||
ProjectPersonas *tools.ProjectPersonasTool
|
||||
WorldModel *tools.WorldModelTool
|
||||
Skills *tools.SkillsTool
|
||||
Personas *tools.AgentPersonasTool
|
||||
ChatHistory *tools.ChatHistoryTool
|
||||
Describe *tools.DescribeTool
|
||||
Learnings *tools.LearningsTool
|
||||
Plans *tools.PlansTool
|
||||
ProjectPersonas *tools.ProjectPersonasTool
|
||||
WorldModel *tools.WorldModelTool
|
||||
ThoughtLearningLinks *tools.ThoughtLearningLinksTool
|
||||
}
|
||||
|
||||
// Handlers groups the HTTP handlers produced for an MCP server instance.
|
||||
@@ -91,6 +92,7 @@ func NewHandlers(cfg config.MCPConfig, logger *slog.Logger, toolSet ToolSet, onS
|
||||
registerProjectTools,
|
||||
registerWorldModelTools,
|
||||
registerLearningTools,
|
||||
registerThoughtLearningLinkTools,
|
||||
registerPlanTools,
|
||||
registerFileTools,
|
||||
registerMaintenanceTools,
|
||||
@@ -308,6 +310,34 @@ func registerLearningTools(server *mcp.Server, logger *slog.Logger, toolSet Tool
|
||||
return nil
|
||||
}
|
||||
|
||||
func registerThoughtLearningLinkTools(server *mcp.Server, logger *slog.Logger, toolSet ToolSet) error {
|
||||
if err := addTool(server, logger, &mcp.Tool{
|
||||
Name: "link_thought_learning",
|
||||
Description: "Create or update an explicit association between a raw thought and a curated learning.",
|
||||
}, toolSet.ThoughtLearningLinks.Link); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addTool(server, logger, &mcp.Tool{
|
||||
Name: "unlink_thought_learning",
|
||||
Description: "Remove an explicit association between a thought and a learning.",
|
||||
}, toolSet.ThoughtLearningLinks.Unlink); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addTool(server, logger, &mcp.Tool{
|
||||
Name: "get_thought_learnings",
|
||||
Description: "List curated learnings explicitly linked to a thought.",
|
||||
}, toolSet.ThoughtLearningLinks.GetThoughtLearnings); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := addTool(server, logger, &mcp.Tool{
|
||||
Name: "get_learning_thoughts",
|
||||
Description: "List raw thoughts explicitly linked to a learning.",
|
||||
}, toolSet.ThoughtLearningLinks.GetLearningThoughts); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func registerPlanTools(server *mcp.Server, logger *slog.Logger, toolSet ToolSet) error {
|
||||
if err := addTool(server, logger, &mcp.Tool{
|
||||
Name: "create_plan",
|
||||
@@ -755,6 +785,10 @@ func BuildToolCatalog() []tools.ToolEntry {
|
||||
{Name: "add_learning", Description: "Create a curated learning record distinct from raw thoughts.", Category: "projects"},
|
||||
{Name: "get_learning", Description: "Retrieve a structured learning by id.", Category: "projects"},
|
||||
{Name: "list_learnings", Description: "List structured learnings with optional project, category, area, status, priority, tag, and text filters.", Category: "projects"},
|
||||
{Name: "link_thought_learning", Description: "Create or update a lightweight explicit association between a raw thought and a curated learning.", Category: "projects"},
|
||||
{Name: "unlink_thought_learning", Description: "Remove a lightweight explicit association between a thought and a learning.", Category: "projects"},
|
||||
{Name: "get_thought_learnings", Description: "List curated learnings explicitly associated with a thought.", Category: "projects"},
|
||||
{Name: "get_learning_thoughts", Description: "List raw source thoughts explicitly associated with a learning.", Category: "projects"},
|
||||
|
||||
// plans
|
||||
{Name: "create_plan", Description: "Create a structured plan with status, priority, owner, due date, and optional project link.", Category: "plans"},
|
||||
|
||||
Reference in New Issue
Block a user