foldnotes-mcp 2.5.1__tar.gz → 2.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: foldnotes-mcp
3
- Version: 2.5.1
3
+ Version: 2.7.0
4
4
  Summary: MCP server exposing the FoldNotes CLI (fn) as tools for Claude Desktop, Claude Code, and other MCP clients.
5
5
  Project-URL: Homepage, https://foldnotes.io
6
6
  Project-URL: Documentation, https://foldnotes.io/advanced/ai-integration/
@@ -26,7 +26,7 @@ Configure in Claude Desktop's claude_desktop_config.json:
26
26
  }
27
27
  """
28
28
 
29
- __version__ = "2.5.1"
29
+ __version__ = "2.7.0"
30
30
 
31
31
  import json
32
32
  import os
@@ -498,6 +498,10 @@ def rename_tag(
498
498
 
499
499
  @mcp.tool()
500
500
  def list_tasks(
501
+ today: bool = False,
502
+ upcoming: bool = False,
503
+ late: bool = False,
504
+ scheduled: str | None = None,
501
505
  due_today: bool = False,
502
506
  due_tomorrow: bool = False,
503
507
  due_this_week: bool = False,
@@ -511,13 +515,40 @@ def list_tasks(
511
515
  no_project: bool = False,
512
516
  no_context: bool = False,
513
517
  all: bool = False,
518
+ created: str | None = None,
514
519
  collection: str | None = None,
515
520
  ) -> str:
516
521
  """List tasks across all notes with filtering.
517
522
 
523
+ "Today" in FoldNotes means the Today list, as the app's Tasks view and its
524
+ widgets show it: for "what's on today", "what should I do today" or "my
525
+ day", use today=True, not due_today. Each task in the result says which
526
+ list it is on (`list`: overdue, due_today or today, the Today list's
527
+ headings; done_today; or upcoming) and when, in the app's words (`when`:
528
+ "Due today", "2 days late", "In progress", "Fri · due Mon"). `when` is for
529
+ showing; the days are `due` and `scheduled` (YYYY-MM-DD, the user's own
530
+ local days). Several list and due filters combine as "any of"; the other
531
+ filters narrow them.
532
+
518
533
  Args:
519
- due_today: Show tasks due today and not yet overdue (a task due today
520
- becomes overdue at 5 PM). Several due filters combine as "any of".
534
+ today: The Today list: overdue tasks, tasks due today, tasks scheduled
535
+ for today or an earlier day (late to start included), and tasks in
536
+ progress unless scheduled for a later day. A deadline wins: a task
537
+ due today is on it whatever its scheduled day. In the Tasks view's
538
+ order. With all=True, the tasks done today too. Needs an fn newer
539
+ than FoldNotes for Mac 1.3.6.
540
+ upcoming: The Upcoming list: open tasks not on Today, by their
541
+ scheduled day, else their due day, soonest first. Needs an fn newer
542
+ than FoldNotes for Mac 1.3.6.
543
+ late: Tasks late to start: their scheduled day has passed and they
544
+ haven't been started. Never counted as overdue, which goes by the
545
+ due date alone. Needs an fn newer than FoldNotes for Mac 1.3.6.
546
+ scheduled: Tasks scheduled for a day (the day the user plans to do
547
+ them): today, this-week, next-week, none, or a date (tomorrow,
548
+ 2026-11-14, next monday). Needs an fn with Tasks 2.0.
549
+ due_today: Tasks due today and not yet overdue, by the due date alone
550
+ (a task due today becomes overdue at 5 PM). Not the Today list: use
551
+ today=True for that.
521
552
  due_tomorrow: Show tasks due tomorrow.
522
553
  due_this_week: Show tasks due this week (today and the next six days).
523
554
  days: Show tasks due in the next N days, counting today.
@@ -530,9 +561,22 @@ def list_tasks(
530
561
  no_project: Only tasks with no project assigned (inline or inherited).
531
562
  no_context: Only tasks with no context assigned.
532
563
  all: Include done and cancelled tasks.
564
+ created: Show tasks created on a day: today, yesterday, or a date
565
+ (2026-11-14, last friday). A task with no created date of its own
566
+ counts as made on its note's day. Needs an fn with Tasks 2.0; each
567
+ task's day is in its `created` field, with `createdFromNote: true`
568
+ when it is the note's day.
533
569
  collection: Collection name, UUID, or path.
534
570
  """
535
571
  args = ["tasks"]
572
+ if today:
573
+ args.append("--today")
574
+ if upcoming:
575
+ args.append("--upcoming")
576
+ if late:
577
+ args.append("--late")
578
+ if scheduled:
579
+ args += ["--scheduled", scheduled]
536
580
  if due_today:
537
581
  args.append("--due-today")
538
582
  if due_tomorrow:
@@ -559,6 +603,8 @@ def list_tasks(
559
603
  args.append("--no-context")
560
604
  if all:
561
605
  args.append("--all")
606
+ if created:
607
+ args += ["--created", created]
562
608
  return json.dumps(run_fn(args, collection), indent=2)
563
609
 
564
610
 
@@ -569,6 +615,7 @@ def add_task(
569
615
  text: str,
570
616
  note: str | None = None,
571
617
  due: str | None = None,
618
+ scheduled: str | None = None,
572
619
  priority: str | None = None,
573
620
  project: str | None = None,
574
621
  context: str | None = None,
@@ -580,7 +627,11 @@ def add_task(
580
627
  text: Task description text.
581
628
  note: Target note title. Omit to add the task to the end of today's
582
629
  daily note (created if needed) — the same rule as Siri's Add Task.
583
- due: Due date (YYYY-MM-DD, 'today', 'tomorrow', 'next monday', etc.).
630
+ due: Due date, the deadline (YYYY-MM-DD, 'today', 'tomorrow',
631
+ 'next monday', etc.).
632
+ scheduled: Scheduled day, the day the user plans to do it (the same
633
+ forms as due). It puts the task on the Today list from that day.
634
+ Refused when it is after the due date. Needs an fn with Tasks 2.0.
584
635
  priority: Priority level: high, medium, low.
585
636
  project: Project name for the task.
586
637
  context: Context(s) for the task; comma-separate for several (e.g. "errand,phone").
@@ -589,6 +640,8 @@ def add_task(
589
640
  args = ["tasks", "add", text] + _note_args(note)
590
641
  if due:
591
642
  args += ["--due", due]
643
+ if scheduled:
644
+ args += ["--scheduled", scheduled]
592
645
  if priority:
593
646
  args += ["--priority", priority]
594
647
  if project:
@@ -723,6 +776,8 @@ def set_task(
723
776
  task_id: str | None = None,
724
777
  due: str | None = None,
725
778
  clear_due: bool = False,
779
+ scheduled: str | None = None,
780
+ clear_scheduled: bool = False,
726
781
  priority: str | None = None,
727
782
  clear_priority: bool = False,
728
783
  project: str | None = None,
@@ -731,7 +786,7 @@ def set_task(
731
786
  clear_context: bool = False,
732
787
  collection: str | None = None,
733
788
  ) -> str:
734
- """Amend an existing task's due date, priority, project, or context.
789
+ """Amend an existing task's due date, scheduled day, priority, project, or context.
735
790
 
736
791
  Identify the task by `task_id` (exact, preferred) or `text` (substring),
737
792
  then pass at least one field to change. Amending metadata preserves the
@@ -745,7 +800,14 @@ def set_task(
745
800
  one task; if several match, the command is refused — pass task_id.
746
801
  task_id: Exact task UUID from `list_tasks`. Preferred.
747
802
  due: New due date (YYYY-MM-DD, 'today', 'tomorrow', 'next monday', ...).
803
+ A due date before the task's scheduled day moves the scheduled day
804
+ to it.
748
805
  clear_due: Remove the due date instead of setting one.
806
+ scheduled: New scheduled day, the day the user plans to do it (the same
807
+ forms as due). Refused when it is after the due date: move the due
808
+ date first. Needs an fn with Tasks 2.0.
809
+ clear_scheduled: Remove the scheduled day (a repeating task stops
810
+ repeating, as it needs one). Needs an fn with Tasks 2.0.
749
811
  priority: New priority: high, medium, low.
750
812
  clear_priority: Remove the priority.
751
813
  project: New project name.
@@ -762,6 +824,10 @@ def set_task(
762
824
  args += ["--due", due]
763
825
  if clear_due:
764
826
  args += ["--clear-due"]
827
+ if scheduled:
828
+ args += ["--scheduled", scheduled]
829
+ if clear_scheduled:
830
+ args += ["--clear-scheduled"]
765
831
  if priority:
766
832
  args += ["--priority", priority]
767
833
  if clear_priority:
@@ -786,11 +852,12 @@ def remove_task(
786
852
  task_id: str | None = None,
787
853
  collection: str | None = None,
788
854
  ) -> str:
789
- """Delete a task line from a note.
855
+ """Delete a task from a note, with its comments and the lines indented under it.
790
856
 
791
857
  Identify the task by `task_id` (exact, preferred) or `text` (substring).
792
- This permanently removes the task line from the note body — unlike
793
- delete_note it does not go to the trash. Prefer `task_id`, and confirm with
858
+ This permanently removes the task from the note body (its line, its `> `
859
+ comments and the lines indented under it) — unlike delete_note it does not
860
+ go to the trash. Prefer `task_id`, and confirm with
794
861
  `list_tasks` first when matching by text. Surviving tasks keep their UUIDs.
795
862
 
796
863
  Args:
@@ -808,6 +875,52 @@ def remove_task(
808
875
  return json.dumps(run_fn(["tasks", "remove"] + sel + _note_args(note), collection), indent=2)
809
876
 
810
877
 
878
+ # ---- Tasks: Move ----
879
+
880
+ @mcp.tool()
881
+ def move_task(
882
+ to: str,
883
+ note: str | None = None,
884
+ text: str | None = None,
885
+ task_id: str | None = None,
886
+ heading: str | None = None,
887
+ collection: str | None = None,
888
+ ) -> str:
889
+ """Move a task to another note, keeping it the same task.
890
+
891
+ The task's line moves with its id, its created date, its comments (the `> `
892
+ lines under it) and the lines indented under it, to the end of the `to`
893
+ note, or to the end of one of its headings' sections. Nothing of it is left
894
+ in the note it came from. Needs an fn with Move to Note (FoldNotes' Tasks
895
+ 2.0). Identify the task by `task_id` (exact, preferred) or `text`
896
+ (substring).
897
+
898
+ Args:
899
+ to: The note to move the task to: its title, filename or UUID. A daily
900
+ note can be named (its title is its date, e.g. 20261117), so a task
901
+ moved by mistake can be put back on its day.
902
+ note: Note title containing the task now. Optional — without it the
903
+ task is found across all notes, and a text match in more than one
904
+ note is refused (the error lists the candidates; pass task_id).
905
+ text: Task text to match (case-insensitive substring). Must match
906
+ exactly one task; if several match, the command is refused — pass
907
+ task_id.
908
+ task_id: Exact task UUID from `list_tasks`. Preferred.
909
+ heading: A heading in the `to` note, by its words (any level): the task
910
+ goes at the end of its section. Omit for the end of the note. A
911
+ heading the note doesn't have is refused, and the error lists the
912
+ note's headings.
913
+ collection: Collection name, UUID, or path.
914
+ """
915
+ sel = _task_selector(text, task_id)
916
+ if sel is None:
917
+ return json.dumps({"error": "Provide either text or task_id."}, indent=2)
918
+ args = ["tasks", "move"] + sel + _note_args(note) + ["--to", to]
919
+ if heading:
920
+ args += ["--heading", heading]
921
+ return json.dumps(run_fn(args, collection), indent=2)
922
+
923
+
811
924
  # ---- Tasks: Projects ----
812
925
 
813
926
  @mcp.tool()
@@ -865,7 +978,8 @@ def daily_note(
865
978
  Args:
866
979
  date: Date (YYYY-MM-DD, 'today', 'yesterday', 'tomorrow'). Default: today.
867
980
  create: Create the daily note if it doesn't exist.
868
- tasks: Show tasks from the daily note.
981
+ tasks: Show the tasks written in that daily note. Not the Today list:
982
+ for what's on today, use list_tasks with today=True.
869
983
  collection: Collection name, UUID, or path.
870
984
  """
871
985
  args = ["daily"]
@@ -904,8 +1018,12 @@ def daily_overdue(
904
1018
  ) -> str:
905
1019
  """Insert or refresh the overdue / due-today task block in a daily note.
906
1020
 
907
- Rewrites the block in place if it is already present, so repeated calls
908
- are safe. Creates the daily note if it doesn't exist.
1021
+ The block is a snapshot written into the note: its Overdue and Due Today
1022
+ sections go by due dates alone. It is not the Today list, which also holds
1023
+ tasks scheduled for today or earlier and tasks in progress: for what's on
1024
+ today, use list_tasks with today=True. Rewrites the block in place if it
1025
+ is already present, so repeated calls are safe. Creates the daily note if
1026
+ it doesn't exist.
909
1027
 
910
1028
  Args:
911
1029
  date: Date for the daily note (default: today).
@@ -924,9 +1042,10 @@ def daily_summary(
924
1042
  ) -> str:
925
1043
  """Insert or refresh the activity summary block in a daily note.
926
1044
 
927
- Summarises the notes touched on that day. Rewrites the block in place if
928
- it is already present, so repeated calls are safe. Creates the daily note
929
- if it doesn't exist.
1045
+ Summarises the notes touched on that day: what was done, not what's on.
1046
+ For what's on today, use list_tasks with today=True. Rewrites the block in
1047
+ place if it is already present, so repeated calls are safe. Creates the
1048
+ daily note if it doesn't exist.
930
1049
 
931
1050
  Args:
932
1051
  date: Date for the daily note (default: today).
File without changes
File without changes
File without changes