MCP get_forecast does not project recurrence series (parity with CLI forecast) #16

Closed
opened 2026-06-05 17:34:46 +00:00 by victor · 0 comments
Owner

Follow-up to #14. The CLI next forecast now projects schedule-type recurrence series forward over the horizon (commit a4c20a3), but the MCP get_forecast tool (src/mcp/tools/view.rs) is a separate implementation that still lists only existing tasks whose stored due <= cutoff — it does not project future, not-yet-spawned occurrences.

Impact: AI clients using MCP see a weekly task's single current instance instead of the ~12 occurrences in a 90-day window — inconsistent with the CLI.

Fix: bring get_forecast to parity with the CLI: project active schedule-type recurrences via next_occurrence up to the horizon, mark projected (not-yet-spawned) occurrences distinctly in the JSON, and skip completion-type / done / cancelled as the CLI does. Reuse the projection logic from src/cli/commands/forecast.rs where practical (consider extracting a shared core helper so the two implementations cannot drift again). Add MCP tests.

Found during the #14 fix.

Follow-up to #14. The CLI `next forecast` now projects schedule-type recurrence series forward over the horizon (commit a4c20a3), but the MCP `get_forecast` tool (src/mcp/tools/view.rs) is a separate implementation that still lists only existing tasks whose stored `due <= cutoff` — it does not project future, not-yet-spawned occurrences. **Impact:** AI clients using MCP see a weekly task's single current instance instead of the ~12 occurrences in a 90-day window — inconsistent with the CLI. **Fix:** bring `get_forecast` to parity with the CLI: project active schedule-type recurrences via `next_occurrence` up to the horizon, mark projected (not-yet-spawned) occurrences distinctly in the JSON, and skip completion-type / done / cancelled as the CLI does. Reuse the projection logic from src/cli/commands/forecast.rs where practical (consider extracting a shared core helper so the two implementations cannot drift again). Add MCP tests. Found during the #14 fix.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
victor/task-manager#16
No description provided.