keepsake-mcp 1.18.0 → 1.20.0

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.
package/README.md CHANGED
@@ -195,14 +195,14 @@ Material kept *alongside* a note without entering its text — an idea, a refere
195
195
  |------|-------------|
196
196
  | `list_days` | List days with their intention or question of the day (the one in force, which stays until changed), by date range |
197
197
  | `get_day` | Get a day, its intention in force (`intention`, carried over until changed) and what was written that day (`note`) |
198
- | `update_day` | Set a day's intention or question — one short line, not a journal (upsert); it stays in place on the following days until changed |
198
+ | `update_day` | Set a day's intention or question — one short line, not a journal (upsert), or make it a no-task day (`tasks_skipped`); it stays in place on the following days until changed |
199
199
 
200
200
  ### Day blocks (Day-view timeline)
201
201
  | Tool | Description |
202
202
  |------|-------------|
203
203
  | `list_day_blocks` | List a day's time blocks, in timeline order (creates that day's recurring blocks first) |
204
- | `create_day_block` | Create a block, auto-placed first-fit (or pinned via anchor_time) |
205
- | `update_day_block` | Update a block (title, duration, anchor, note, done) |
204
+ | `create_day_block` | Create a block, auto-placed first-fit (or pinned via anchor_time), with its people and pages (contact_ids, company_ids, tag_ids) |
205
+ | `update_day_block` | Update a block (title, duration, anchor, note, done, people and pages) |
206
206
  | `delete_day_block` | Delete a block and prune its timeline ref (on a recurring block: remove it from that day only) |
207
207
 
208
208
  ### Recurring blocks (ideal day / ideal week, habits)
@@ -233,7 +233,7 @@ Material kept *alongside* a note without entering its text — an idea, a refere
233
233
  |------|-------------|
234
234
  | `list_task_headers` | List all task headers (section separators) |
235
235
  | `get_task_header` | Get a task header by ID |
236
- | `create_task_header` | Create a task header (section) — insert `h:<id>` in the tag's `tasks_order` to place it |
236
+ | `create_task_header` | Create a task header (section) — `tag_id` adds it at the bottom of that tag's page |
237
237
  | `update_task_header` | Update a task header (name, description, collapsed) |
238
238
  | `delete_task_header` | Permanently delete a task header |
239
239
 
package/build/tools.js CHANGED
@@ -419,7 +419,7 @@ export function registerAllTools(server, fetchApi) {
419
419
  return toContent(await fetchApi(`/tasks/${id}`));
420
420
  });
421
421
  server.registerTool("create_task", {
422
- description: "A TASK is an action item to accomplish. Can have due date, recurrence, priority, linked to contacts and tags.\n\nCreate a new task. Title supports #tag# and [[tag]] for automatic tag linking.",
422
+ description: "A TASK is an action item to accomplish. Can have due date, recurrence, priority, linked to contacts and tags.\n\nCreate a new task. Title supports #tag# and [[tag]] for automatic tag linking. To file it in a section of a tag page, pass header_id: it lands at the end of that section, without touching the rest of the page's order.",
423
423
  inputSchema: {
424
424
  title: z.string().describe("Task title (supports #tag# and [[tag]])"),
425
425
  description: z.string().optional().describe("Task description"),
@@ -463,6 +463,11 @@ export function registerAllTools(server, fetchApi) {
463
463
  .array(z.string().uuid())
464
464
  .optional()
465
465
  .describe("Array of tag UUIDs to link"),
466
+ header_id: z
467
+ .string()
468
+ .uuid()
469
+ .optional()
470
+ .describe("Section (task header) of a tag page: the task is linked to that tag and placed at the end of the section. If the section is on several tag pages, name the right one in tag_ids."),
466
471
  },
467
472
  annotations: { title: "Create task", destructiveHint: false, idempotentHint: false, openWorldHint: false },
468
473
  }, async (params) => {
@@ -728,7 +733,8 @@ export function registerAllTools(server, fetchApi) {
728
733
  description: "Create or update a day's intention or question of the day (upsert on the date). The `note` field is the intention or question of the day — one short line at the top of the Today view (a mantra, an intention, a single priority, or a question to keep in mind). Not a journal: never write a summary of the day here.\n\nAn intention is valid for its own day only: it does not carry over to the following days. The user types it by hand each morning, on purpose — do not set it for them unless they ask. `null` or an empty string removes it.\n\nNOT for attaching a note to a day: this field is a single line and you would overwrite the user's intention. To put a note on a day, use create_note with `dates` or link_note_date.",
729
734
  inputSchema: {
730
735
  date: z.string().describe("Date (YYYY-MM-DD)"),
731
- note: z.string().nullable().describe("The intention or question of the day: one short line (mantra, intention, single priority, or a question to keep in mind). Not a journal summary. null or empty string = no intention that day."),
736
+ note: z.string().nullable().optional().describe("The intention or question of the day: one short line (mantra, intention, single priority, or a question to keep in mind). Not a journal summary. null or empty string = no intention that day. Omit to leave it unchanged."),
737
+ tasks_skipped: z.boolean().optional().describe("true = no-task day: the day's task blocks are hidden on the Today view and no task is changed (tasks created afterwards still show). false = bring them back. Use only when the user asks for a day without tasks."),
732
738
  },
733
739
  annotations: { title: "Update day", destructiveHint: false, idempotentHint: true, openWorldHint: false },
734
740
  }, async (params) => {
@@ -738,7 +744,7 @@ export function registerAllTools(server, fetchApi) {
738
744
  // DAY BLOCKS (Day-view timeline)
739
745
  // ===========================================================================
740
746
  server.registerTool("list_day_blocks", {
741
- description: "List the time blocks of a day's timeline (Day view), in timeline order. A block is either an activity (type 'block') or a task bucket (type 'tasks' — groups the day's untimed tasks). The meta carries the day's raw timeline_order: \"b:<uuid>\" refs are blocks, bare uuids are tasks inside a bucket's run.\n\nRecurring blocks: listing today or a future day first creates that day's recurring blocks if they do not exist yet (same as opening the day in the app), so every block returned has a real id you can update or mark done. A block that repeats carries `repeats: { recurring_block_id, weekdays }` (ISO weekdays, 1 = Monday … 7 = Sunday); otherwise `repeats` is null. Past days are never filled in afterwards.\n\nNotes: each block carries `notes` ([{ id, title, content }], real Keepsake notes linked to the block — prepared before, completed after), `note` (the first note's text) and `entry_id` (the short entry that tells the block, created by the app's \"Add details\" or by create_entry with day_block_id; null if none). A recurring block also carries `kept_notes` (same shape): notes kept by its repetition, shown on every occurrence from the day they were kept (see keep_recurring_block_note) — `notes` and `note` are that day's own notes only.",
747
+ description: "List the time blocks of a day's timeline (Day view), in timeline order. A block is either an activity (type 'block') or a task bucket (type 'tasks' — shows the day's untimed tasks, or what its filter selects: `filter_tag_id` = one page, `filter_due` = due dates; null = the day's tasks). The meta carries the day's raw timeline_order: \"b:<uuid>\" refs are blocks, bare uuids after a bucket are the order the user chose for its tasks.\n\nRecurring blocks: listing today or a future day first creates that day's recurring blocks if they do not exist yet (same as opening the day in the app), so every block returned has a real id you can update or mark done. A block that repeats carries `repeats: { recurring_block_id, weekdays }` (ISO weekdays, 1 = Monday … 7 = Sunday); otherwise `repeats` is null. Past days are never filled in afterwards.\n\nNotes: each block carries `notes` ([{ id, title, content }], real Keepsake notes linked to the block — prepared before, completed after), `note` (the first note's text) and `entry_id` (the short entry that tells the block, created by the app's \"Add details\" or by create_entry with day_block_id; null if none). A recurring block also carries `kept_notes` (same shape): notes kept by its repetition, shown on every occurrence from the day they were kept (see keep_recurring_block_note) — `notes` and `note` are that day's own notes only.\n\nPeople and pages: each block carries `contact_ids`, `company_ids` and `tag_ids` (the people, companies and pages it is about — e.g. a meeting with Romain about a project). They are an agenda intention, not history: a contact's timeline does not list blocks; the entry created by \"Add details\" carries the block's people and pages.",
742
748
  inputSchema: {
743
749
  date: z.string().describe("Date (YYYY-MM-DD)"),
744
750
  },
@@ -746,15 +752,41 @@ export function registerAllTools(server, fetchApi) {
746
752
  }, async ({ date }) => {
747
753
  return toContent(await fetchApi(`/day-blocks${qs({ date })}`));
748
754
  });
755
+ // Task block filter (16/11/2026): a task bucket shows every open task that
756
+ // matches its page and due dates — two buckets may show the same task.
757
+ const taskFilterTagSchema = z
758
+ .string()
759
+ .uuid()
760
+ .nullable()
761
+ .optional()
762
+ .describe("Task buckets only: show only the tasks linked to this page (tag id, from list_tags). null = all pages.");
763
+ const taskFilterDueSchema = z
764
+ .array(z.enum(["today", "overdue", "week", "asap", "someday", "all"]))
765
+ .nullable()
766
+ .optional()
767
+ .describe("Task buckets only: which tasks to show, by due date — today, overdue (today only), week (from this day to Sunday), asap, someday, all. null = the day's tasks (today + overdue + ASAP on today), the default. Every bucket shows ALL the open tasks matching its filter, even if another bucket shows them too; the app displays what fits in the block's duration (15 min per task without a duration) and the rest under « show more ».");
768
+ // People and pages of a block (17/11/2026): replace semantics, like a task
769
+ const blockContactIdsSchema = z
770
+ .array(z.string().uuid())
771
+ .optional()
772
+ .describe("People linked to the block (contact ids). Replaces the list. A title with @Name@ also links that person.");
773
+ const blockCompanyIdsSchema = z
774
+ .array(z.string().uuid())
775
+ .optional()
776
+ .describe("Companies linked to the block (company ids). Replaces the list.");
777
+ const blockTagIdsSchema = z
778
+ .array(z.string().uuid())
779
+ .optional()
780
+ .describe("Pages linked to the block (tag ids, from list_tags). Replaces the list. A title with #page# or [[page]] also links that page (created if needed).");
749
781
  server.registerTool("create_day_block", {
750
- description: "Create a time block on a day's timeline. The block is auto-placed in the earliest free gap large enough for it (same first-fit engine as the app); pass anchor_time to pin it at a fixed hour instead. Its \"b:<id>\" ref is inserted into the day's timeline_order for you — never write timeline_order by hand.",
782
+ description: "Create a time block on a day's timeline. The block is auto-placed in the earliest free gap large enough for it (same first-fit engine as the app); pass anchor_time to pin it at a fixed hour instead. Its \"b:<id>\" ref is inserted into the day's timeline_order for you — never write timeline_order by hand.\n\nA block can be about people and pages (contact_ids, company_ids, tag_ids), like a task: \"Meeting #Keepsake Dev# with @Romain Dupont@\" links the page and Romain from its title alone. A note created for the block inherits them.",
751
783
  inputSchema: {
752
784
  date: z.string().describe("Date (YYYY-MM-DD)"),
753
785
  title: z.string().optional().describe("Block label (e.g. \"Deep work\", \"Lunch\")"),
754
786
  type: z
755
787
  .enum(["block", "tasks"])
756
788
  .optional()
757
- .describe("'block' = activity (default). 'tasks' = task bucket: a window that gathers the day's untimed tasks."),
789
+ .describe("'block' = activity (default). 'tasks' = task bucket: a window that shows tasks — by default the day's untimed tasks, or what filter_tag_id / filter_due select."),
758
790
  duration_minutes: z
759
791
  .number()
760
792
  .int()
@@ -768,13 +800,18 @@ export function registerAllTools(server, fetchApi) {
768
800
  .optional()
769
801
  .describe("Pin the block at a fixed wall-clock hour HH:MM (it becomes a wall other blocks flow around). Omit for automatic first-fit placement."),
770
802
  note: z.string().optional().describe("Text of the block's note: a real note is created (kept out of the Inbox) and linked to the block. Supports #tag#, [[tag]] and @Name@. To attach an existing note, use link_day_block_note."),
803
+ filter_tag_id: taskFilterTagSchema,
804
+ filter_due: taskFilterDueSchema,
805
+ contact_ids: blockContactIdsSchema,
806
+ company_ids: blockCompanyIdsSchema,
807
+ tag_ids: blockTagIdsSchema,
771
808
  },
772
809
  annotations: { title: "Create day block", destructiveHint: false, idempotentHint: false, openWorldHint: false },
773
810
  }, async (params) => {
774
811
  return toContent(await fetchApi("/day-blocks", "POST", params));
775
812
  });
776
813
  server.registerTool("update_day_block", {
777
- description: "Update a time block (title, duration, anchor, note, done). Only send fields you want to change. The block keeps its position in the timeline order.\n\nMarking a block done records when it actually happened: it ends now and starts its planned duration earlier (never before the previous done block ended). In the app, a done block then stays at that time in the past of the day, while what is left to do stacks from the current time. A block with a fixed time keeps its hour.",
814
+ description: "Update a time block (title, duration, anchor, note, done, people and pages; for a task bucket, its filter: filter_tag_id, filter_due). Only send fields you want to change. The block keeps its position in the timeline order.\n\nMarking a block done records when it actually happened (it ends now and starts its planned duration earlier, never before the previous done block ended); the times can be corrected in the app. In the app's day view, what is done moves to the top, in the order it was done, and what is left follows; a finished fixed-time block no longer pushes anything. The block \"in progress\" is simply the first one not marked done, whatever the time.\n\ncontact_ids, company_ids and tag_ids replace the block's people, companies and pages; a new title with #page# or @Name@ adds what it names.",
778
815
  inputSchema: {
779
816
  id: z.string().uuid().describe("Block UUID"),
780
817
  title: z.string().nullable().optional().describe("Block label"),
@@ -793,6 +830,11 @@ export function registerAllTools(server, fetchApi) {
793
830
  .describe("Fixed wall-clock hour HH:MM. Pass null to unpin (the block flows with the rest again)."),
794
831
  note: z.string().nullable().optional().describe("Text of the block's first linked note (created and linked if the block has none). An empty value or null changes nothing: to detach a note, use unlink_day_block_note."),
795
832
  done: z.boolean().optional().describe("Mark the block done (true) or not done (false)"),
833
+ filter_tag_id: taskFilterTagSchema,
834
+ filter_due: taskFilterDueSchema,
835
+ contact_ids: blockContactIdsSchema,
836
+ company_ids: blockCompanyIdsSchema,
837
+ tag_ids: blockTagIdsSchema,
796
838
  },
797
839
  annotations: { title: "Update day block", destructiveHint: false, idempotentHint: true, openWorldHint: false },
798
840
  }, async ({ id, ...body }) => {
@@ -827,7 +869,7 @@ export function registerAllTools(server, fetchApi) {
827
869
  description: "Make a time block come back on chosen weekdays. Two ways: pass `block_id` to turn an EXISTING block into a recurring one (it becomes the first occurrence and keeps its title, duration and fixed time — do this when the block is already on the timeline, otherwise that day would get it twice), or describe a new one (title, duration, optional fixed time) starting on `start_date`. Nothing is created on the timeline right away: each day's block appears when that day is opened in the app or listed with list_day_blocks. With `anchor_time` the block sits at that hour every day; without it, it is placed from the user's wake time and shifts with it.",
828
870
  inputSchema: {
829
871
  weekdays: weekdaysSchema,
830
- block_id: z.string().uuid().optional().describe("Existing block to repeat (from list_day_blocks). When given, title/type/duration/anchor/start_date are taken from that block."),
872
+ block_id: z.string().uuid().optional().describe("Existing block to repeat (from list_day_blocks). When given, title/type/duration/anchor/start_date (and a bucket's filter) are taken from that block."),
831
873
  title: z.string().optional().describe("Block label (e.g. \"Meditation\")"),
832
874
  type: z.enum(["block", "tasks"]).optional().describe("'block' = activity (default). 'tasks' = a recurring task bucket (e.g. a daily \"Writing\" window the day's tasks go into)."),
833
875
  duration_minutes: z.number().int().min(1).max(1440).optional().describe("Duration in minutes (default 30 for an activity, 60 for a bucket)"),
@@ -837,13 +879,15 @@ export function registerAllTools(server, fetchApi) {
837
879
  .optional()
838
880
  .describe("Fixed wall-clock hour HH:MM. Omit for a block that follows the wake time."),
839
881
  start_date: z.string().optional().describe("First day the rule applies (YYYY-MM-DD). Default: today (UTC). Pass the user's local date when you know it."),
882
+ filter_tag_id: taskFilterTagSchema,
883
+ filter_due: taskFilterDueSchema,
840
884
  },
841
885
  annotations: { title: "Create recurring block", destructiveHint: false, idempotentHint: false, openWorldHint: false },
842
886
  }, async (params) => {
843
887
  return toContent(await fetchApi("/recurring-blocks", "POST", params));
844
888
  });
845
889
  server.registerTool("update_recurring_block", {
846
- description: "Change a recurring block FROM A DATE ONWARD (title, duration, fixed time, weekdays). The past is never rewritten: earlier days keep their blocks as they were, and the habit keeps its history. Upcoming occurrences already created and not yet checked are updated, or removed if their day is no longer planned. To change a single day only, use update_day_block on that day's block instead.",
890
+ description: "Change a recurring block FROM A DATE ONWARD (title, duration, fixed time, weekdays; for a task bucket, its filter). The past is never rewritten: earlier days keep their blocks as they were, and the habit keeps its history. Upcoming occurrences already created and not yet checked are updated, or removed if their day is no longer planned. To change a single day only, use update_day_block on that day's block instead.",
847
891
  inputSchema: {
848
892
  id: z.string().uuid().describe("Recurring block UUID (from list_recurring_blocks, or `repeats.recurring_block_id` of a day block)"),
849
893
  title: z.string().nullable().optional().describe("Block label"),
@@ -855,6 +899,8 @@ export function registerAllTools(server, fetchApi) {
855
899
  .optional()
856
900
  .describe("Fixed wall-clock hour HH:MM. Pass null to let the block follow the wake time."),
857
901
  weekdays: weekdaysSchema.optional(),
902
+ filter_tag_id: taskFilterTagSchema,
903
+ filter_due: taskFilterDueSchema,
858
904
  from_date: z.string().optional().describe("First day the change applies (YYYY-MM-DD). Default: today (UTC)."),
859
905
  },
860
906
  annotations: { title: "Update recurring block", destructiveHint: false, idempotentHint: true, openWorldHint: false },
@@ -1020,11 +1066,12 @@ export function registerAllTools(server, fetchApi) {
1020
1066
  return toContent(await fetchApi(`/task-headers/${id}`));
1021
1067
  });
1022
1068
  server.registerTool("create_task_header", {
1023
- description: "Create a new task header (section separator). To show it on a tag page, insert \"h:<header_id>\" into that tag's tasks_order (get_tag, then update_tag) where the section should start: the tasks listed after it belong to that section.",
1069
+ description: "Create a new task header (section separator). Pass tag_id to add it at the bottom of that tag's page; then create_task with header_id files tasks in it. To place it elsewhere on the page, reorder tasks_order (get_tag, then update_tag): the tasks listed after \"h:<header_id>\" belong to that section.",
1024
1070
  inputSchema: {
1025
1071
  name: z.string().describe("Header name"),
1026
1072
  description: z.string().optional().describe("Optional description below the header"),
1027
1073
  collapsed: z.boolean().optional().describe("Whether the section is collapsed (default false)"),
1074
+ tag_id: z.string().uuid().optional().describe("Tag page to add the section to, at the bottom"),
1028
1075
  },
1029
1076
  annotations: { title: "Create task header", destructiveHint: false, idempotentHint: false, openWorldHint: false },
1030
1077
  }, async (body) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keepsake-mcp",
3
- "version": "1.18.0",
3
+ "version": "1.20.0",
4
4
  "description": "MCP server for Keepsake (keepsake.place), the app where creators and solo entrepreneurs empty their heads — connect your AI to your notes, tasks and contacts",
5
5
  "type": "module",
6
6
  "bin": {