diff --git a/tools/tools.go b/tools/tools.go index bf9fa2d0dcbebd230534802c8aed991231db2d83..00dc914af6f8ce2e7df8a0c08dcebada985ac68b 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -113,46 +113,3 @@ func (h *Handlers) HandleListAreasAndGoals(ctx context.Context, request mcp.Call }, }, nil } - -// HandleGetTimestamp handles the get_timestamp tool call. -func (h *Handlers) HandleGetTimestamp(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { - natLangDate, ok := request.Params.Arguments["natural_language_date"].(string) - if !ok || natLangDate == "" { - return reportMCPError("Missing or invalid required argument: natural_language_date") - } - loc, err := LoadLocation(h.config.Timezone) - if err != nil { - return reportMCPError(err.Error()) - } - parsedTime, err := anytime.Parse(natLangDate, time.Now().In(loc)) - if err != nil { - return reportMCPError(fmt.Sprintf("Could not parse natural language date: %v", err)) - } - return &mcp.CallToolResult{ - Content: []mcp.Content{ - mcp.TextContent{ - Type: "text", - Text: parsedTime.Format(time.RFC3339), - }, - }, - }, nil -} - -// HandleListAreasAndGoals handles the list_areas_and_goals tool call. -func (h *Handlers) HandleListAreasAndGoals(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { - var b strings.Builder - for _, area := range h.config.Areas { - fmt.Fprintf(&b, "- %s: %s\n", area.GetName(), area.GetID()) - for _, goal := range area.GetGoals() { - fmt.Fprintf(&b, " - %s: %s\n", goal.GetName(), goal.GetID()) - } - } - return &mcp.CallToolResult{ - Content: []mcp.Content{ - mcp.TextContent{ - Type: "text", - Text: b.String(), - }, - }, - }, nil -}