keepsake-mcp 1.15.1 → 1.17.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
@@ -115,7 +115,7 @@ rather than in the chat, which disappears.
115
115
  |--------|-----------|-------------|
116
116
  | `review_note` | `note_id` | Act as the editor of a note: read it, judge form and substance, leave anchored remarks in the margin, never rewrite the text |
117
117
 
118
- ## Available tools (84)
118
+ ## Available tools (89)
119
119
 
120
120
  ### Contacts
121
121
  | Tool | Description |
@@ -169,10 +169,11 @@ rather than in the chat, which disappears.
169
169
  | `list_notes` | List notes — filter by pinned/archived, day, company, page (`tag_id`), publication-flow stage (`status`) |
170
170
  | `list_note_statuses` | The stages of the user's publication flow (Idea → In progress → To review → Ready → Published by default — the user can rename, add or remove them) |
171
171
  | `get_note` | Get one note by ID with its tags, contacts, tasks and linked notes |
172
- | `create_note` | Create a note — supports `#tag#` and `[[tag]]` syntax; `status` puts it straight into the publication flow |
172
+ | `create_note` | Create a note — supports `#tag#` and `[[tag]]` syntax; `archived` creates a permanent Note directly (no Inbox), `status` puts it straight into the publication flow |
173
173
  | `update_note` | Update note content, links, days, or its publication-flow stage (`status`) |
174
174
  | `delete_note` | Soft-delete (or permanent) |
175
175
  | `pin_note` | Pin as a post-it (short reference always at hand) |
176
+ | `unpin_note` | Unpin a note (it stays where it is) |
176
177
  | `archive_note` | Archive a note |
177
178
  | `restore_note` | Restore a deleted/archived note |
178
179
 
@@ -197,18 +198,26 @@ Material kept *alongside* a note without entering its text — an idea, a refere
197
198
  ### Day blocks (Day-view timeline)
198
199
  | Tool | Description |
199
200
  |------|-------------|
200
- | `list_day_blocks` | List a day's time blocks, in timeline order |
201
+ | `list_day_blocks` | List a day's time blocks, in timeline order (creates that day's recurring blocks first) |
201
202
  | `create_day_block` | Create a block, auto-placed first-fit (or pinned via anchor_time) |
202
203
  | `update_day_block` | Update a block (title, duration, anchor, note, done) |
203
- | `delete_day_block` | Delete a block and prune its timeline ref |
204
+ | `delete_day_block` | Delete a block and prune its timeline ref (on a recurring block: remove it from that day only) |
205
+
206
+ ### Recurring blocks (ideal day / ideal week, habits)
207
+ | Tool | Description |
208
+ |------|-------------|
209
+ | `list_recurring_blocks` | List the blocks that come back on chosen weekdays (the user's ideal week and habits) |
210
+ | `create_recurring_block` | Make a block recurring — from an existing block, or from scratch |
211
+ | `update_recurring_block` | Change a recurring block from a date onward (title, duration, fixed time, weekdays) — the past is never rewritten |
212
+ | `stop_recurring_block` | Stop a repetition from a date onward; past days keep their blocks |
204
213
 
205
214
  ### Tags
206
215
  | Tool | Description |
207
216
  |------|-------------|
208
- | `list_tags` | List tags (lightweight — ordering arrays omitted), with optional name search (`q`) |
217
+ | `list_tags` | List tags (lightweight — ordering arrays omitted), with optional name search (`q`) and `archived` / `favorite` filters |
209
218
  | `get_tag` | Get a tag by ID with all properties, including `tasks_order` (section markers `h:<header_id>`) |
210
219
  | `create_tag` | Create a new tag |
211
- | `update_tag` | Update a tag (name, description, color, icon, favorite, order of tasks and sections via `tasks_order`) |
220
+ | `update_tag` | Update a tag (name, description, color, icon, favorite, `archived` to close a project without deleting anything, order of tasks and sections via `tasks_order`) |
212
221
  | `delete_tag` | Permanently delete a tag and all its links |
213
222
  | `get_tag_items` | Get items linked to a tag — filter by `types`/`status`, `summary` mode, task `sections` included |
214
223
  | `link_tag` | Link any entity to a tag |
package/build/index.js CHANGED
File without changes
package/build/tools.js CHANGED
@@ -584,7 +584,7 @@ export function registerAllTools(server, fetchApi) {
584
584
  return toContent(withNoteHint(await fetchApi(`/notes/${id}`)));
585
585
  });
586
586
  server.registerTool("create_note", {
587
- description: "Create a new QuickNote in the Inbox. QuickNotes are temporary captures — use archive_note to transform one into a permanent Note.\n\nContent supports #tag# and [[tag]] for automatic tag linking.\n\nPass `dates` to attach the note to one or more days (\"note for tomorrow\", meeting prep for Thursday): it then surfaces in that day's view while staying in the notes list. A dated note is NOT a task (no action to complete) and NOT the day's intention (see update_day).",
587
+ description: "Create a new QuickNote in the Inbox. QuickNotes are temporary captures — use archive_note to transform one into a permanent Note, or pass archived=true to create the permanent Note directly (reference material the user asked you to keep — a project's status note, meeting minutes filed on a page — rather than a capture for them to sort).\n\nContent supports #tag# and [[tag]] for automatic tag linking.\n\nPass `dates` to attach the note to one or more days (\"note for tomorrow\", meeting prep for Thursday): it then surfaces in that day's view while staying in the notes list. A dated note is NOT a task (no action to complete) and NOT the day's intention (see update_day).",
588
588
  inputSchema: {
589
589
  content: z.string().describe("Note content (supports #tag# and [[tag]])"),
590
590
  is_pinned: z.boolean().optional().describe("Pin the note (default: false)"),
@@ -604,6 +604,10 @@ export function registerAllTools(server, fetchApi) {
604
604
  .string()
605
605
  .optional()
606
606
  .describe("Put the note straight into the publication flow at this stage (name, key or id from list_note_statuses). The note is then created as a permanent Note, not an Inbox QuickNote — like \"Keep to publish\" in the app. Only when the user says they may publish it."),
607
+ archived: z
608
+ .boolean()
609
+ .optional()
610
+ .describe("Create a permanent Note directly instead of an Inbox QuickNote (default: false). Tags, links and @mentions work the same. Implied by status."),
607
611
  },
608
612
  annotations: { title: "Create note", destructiveHint: false, idempotentHint: false, openWorldHint: false },
609
613
  }, async (params) => {
@@ -660,6 +664,15 @@ export function registerAllTools(server, fetchApi) {
660
664
  }, async ({ id }) => {
661
665
  return toContent(await fetchApi(`/notes/${id}/pin`, "POST"));
662
666
  });
667
+ server.registerTool("unpin_note", {
668
+ description: "Unpin a note: it leaves the pinned post-its and stays where it is (Inbox or Notes), nothing else changes. Use when a pinned reference is no longer needed at hand — e.g. a project status note replaced by a newer one, or a project being closed.",
669
+ inputSchema: {
670
+ id: z.string().uuid().describe("Note UUID"),
671
+ },
672
+ annotations: { title: "Unpin note", destructiveHint: false, idempotentHint: true, openWorldHint: false },
673
+ }, async ({ id }) => {
674
+ return toContent(await fetchApi(`/notes/${id}/unpin`, "POST"));
675
+ });
663
676
  server.registerTool("archive_note", {
664
677
  description: "Transform a QuickNote into a permanent Note (archive it). Notes appear on contact pages, tag pages, and the Notes section.",
665
678
  inputSchema: {
@@ -716,7 +729,7 @@ export function registerAllTools(server, fetchApi) {
716
729
  // DAY BLOCKS (Day-view timeline)
717
730
  // ===========================================================================
718
731
  server.registerTool("list_day_blocks", {
719
- 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.",
732
+ 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.",
720
733
  inputSchema: {
721
734
  date: z.string().describe("Date (YYYY-MM-DD)"),
722
735
  },
@@ -752,7 +765,7 @@ export function registerAllTools(server, fetchApi) {
752
765
  return toContent(await fetchApi("/day-blocks", "POST", params));
753
766
  });
754
767
  server.registerTool("update_day_block", {
755
- 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.",
768
+ 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.",
756
769
  inputSchema: {
757
770
  id: z.string().uuid().describe("Block UUID"),
758
771
  title: z.string().nullable().optional().describe("Block label"),
@@ -777,7 +790,7 @@ export function registerAllTools(server, fetchApi) {
777
790
  return toContent(await fetchApi(`/day-blocks/${id}`, "PATCH", body));
778
791
  });
779
792
  server.registerTool("delete_day_block", {
780
- description: "Delete a time block. Its ref is pruned from the day's timeline_order; for a task bucket, the tasks themselves are untouched (they fall back to the day's computed bucket).",
793
+ description: "Delete a time block. Its ref is pruned from the day's timeline_order; for a task bucket, the tasks themselves are untouched (they fall back to the day's computed bucket).\n\nOn a recurring block, this removes it from THAT DAY ONLY (the app's \"Remove from today\"): the block keeps coming back on the other days, and the skipped day does not break the habit streak. To stop the repetition itself, use stop_recurring_block.",
781
794
  inputSchema: {
782
795
  id: z.string().uuid().describe("Block UUID"),
783
796
  },
@@ -786,18 +799,90 @@ export function registerAllTools(server, fetchApi) {
786
799
  return toContent(await fetchApi(`/day-blocks/${id}`, "DELETE"));
787
800
  });
788
801
  // ===========================================================================
802
+ // RECURRING BLOCKS (ideal day / ideal week — also the user's habits)
803
+ // ===========================================================================
804
+ const weekdaysSchema = z
805
+ .array(z.number().int().min(1).max(7))
806
+ .describe("ISO weekdays the block comes back on: 1 = Monday … 7 = Sunday. Every day = [1,2,3,4,5,6,7]; working week = [1,2,3,4,5].");
807
+ server.registerTool("list_recurring_blocks", {
808
+ description: "List the user's recurring time blocks: their ideal day / ideal week (\"Meditation\" every day at 08:00, \"Writing\" on weekday mornings). A recurring block is also a habit: each day it appears on the timeline as a regular block the user checks off (see list_day_blocks), and consecutive checked days form a streak. `weekdays` is the rule in force on the given date; `next_change` announces a rule already recorded for later (a repetition that starts or stops on a future date).",
809
+ inputSchema: {
810
+ date: z.string().optional().describe("Date the rule is read at (YYYY-MM-DD). Default: today (UTC)."),
811
+ include_stopped: z.boolean().optional().describe("Also return repetitions that no longer plan anything (default false)"),
812
+ },
813
+ annotations: { title: "List recurring blocks", readOnlyHint: true, openWorldHint: false },
814
+ }, async ({ date, include_stopped }) => {
815
+ return toContent(await fetchApi(`/recurring-blocks${qs({ date, include_stopped })}`));
816
+ });
817
+ server.registerTool("create_recurring_block", {
818
+ 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.",
819
+ inputSchema: {
820
+ weekdays: weekdaysSchema,
821
+ 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."),
822
+ title: z.string().optional().describe("Block label (e.g. \"Meditation\")"),
823
+ 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)."),
824
+ duration_minutes: z.number().int().min(1).max(1440).optional().describe("Duration in minutes (default 30 for an activity, 60 for a bucket)"),
825
+ anchor_time: z
826
+ .string()
827
+ .regex(/^([01]\d|2[0-3]):[0-5]\d$/)
828
+ .optional()
829
+ .describe("Fixed wall-clock hour HH:MM. Omit for a block that follows the wake time."),
830
+ 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."),
831
+ },
832
+ annotations: { title: "Create recurring block", destructiveHint: false, idempotentHint: false, openWorldHint: false },
833
+ }, async (params) => {
834
+ return toContent(await fetchApi("/recurring-blocks", "POST", params));
835
+ });
836
+ server.registerTool("update_recurring_block", {
837
+ 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.",
838
+ inputSchema: {
839
+ id: z.string().uuid().describe("Recurring block UUID (from list_recurring_blocks, or `repeats.recurring_block_id` of a day block)"),
840
+ title: z.string().nullable().optional().describe("Block label"),
841
+ duration_minutes: z.number().int().min(1).max(1440).optional().describe("Duration in minutes"),
842
+ anchor_time: z
843
+ .string()
844
+ .regex(/^([01]\d|2[0-3]):[0-5]\d$/)
845
+ .nullable()
846
+ .optional()
847
+ .describe("Fixed wall-clock hour HH:MM. Pass null to let the block follow the wake time."),
848
+ weekdays: weekdaysSchema.optional(),
849
+ from_date: z.string().optional().describe("First day the change applies (YYYY-MM-DD). Default: today (UTC)."),
850
+ },
851
+ annotations: { title: "Update recurring block", destructiveHint: false, idempotentHint: true, openWorldHint: false },
852
+ }, async ({ id, ...body }) => {
853
+ return toContent(await fetchApi(`/recurring-blocks/${id}`, "PATCH", body));
854
+ });
855
+ server.registerTool("stop_recurring_block", {
856
+ description: "Stop a recurring block from a date onward (the app's \"Stop repeating\"). Past days keep their blocks and the habit keeps its history; upcoming occurrences already created and not yet checked are removed. To skip a single day and keep the repetition, use delete_day_block on that day's block.",
857
+ inputSchema: {
858
+ id: z.string().uuid().describe("Recurring block UUID"),
859
+ from_date: z.string().optional().describe("First day without the block (YYYY-MM-DD). Default: today (UTC)."),
860
+ },
861
+ annotations: { title: "Stop recurring block", destructiveHint: true, idempotentHint: true, openWorldHint: false },
862
+ }, async ({ id, from_date }) => {
863
+ return toContent(await fetchApi(`/recurring-blocks/${id}${qs({ from_date })}`, "DELETE"));
864
+ });
865
+ // ===========================================================================
789
866
  // TAGS
790
867
  // ===========================================================================
791
868
  server.registerTool("list_tags", {
792
- description: "List tags (lightweight: the manual tasks_order arrays are omitted — use get_tag for a tag's full ordering). Tags organize contacts, entries, tasks, notes, and companies. Use q to find a tag by name.",
869
+ description: "List tags (lightweight: the manual tasks_order arrays are omitted — use get_tag for a tag's full ordering). Tags organize contacts, entries, tasks, notes, and companies. Use q to find a tag by name. Archived tags (closed projects) are included unless you pass archived=false; each tag's archived_at tells which.",
793
870
  inputSchema: {
794
871
  q: z.string().optional().describe("Filter by name (case-insensitive substring match)"),
872
+ archived: z
873
+ .boolean()
874
+ .optional()
875
+ .describe("true: only archived tags; false: only active tags (default: both)"),
876
+ favorite: z
877
+ .boolean()
878
+ .optional()
879
+ .describe("true: only the user's favorite tags (sidebar); false: only non-favorites (default: both)"),
795
880
  limit: z.number().int().positive().optional().describe("Max results (default 50)"),
796
881
  offset: z.number().int().nonnegative().optional().describe("Pagination offset"),
797
882
  },
798
883
  annotations: { title: "List tags", readOnlyHint: true, openWorldHint: false },
799
- }, async ({ q, limit, offset }) => {
800
- return toContent(await fetchApi(`/tags${qs({ q, limit, offset })}`));
884
+ }, async ({ q, archived, favorite, limit, offset }) => {
885
+ return toContent(await fetchApi(`/tags${qs({ q, archived, favorite, limit, offset })}`));
801
886
  });
802
887
  server.registerTool("get_tag", {
803
888
  description: "Get a single tag by ID with all its properties (name, description, color, icon, view mode, favorite status). Includes tasks_order, the manual ordering of the tag page's task list, where entries of the form \"h:<header_id>\" are section separators (see list_task_headers).",
@@ -837,7 +922,7 @@ export function registerAllTools(server, fetchApi) {
837
922
  return toContent(await fetchApi("/tags", "POST", body));
838
923
  });
839
924
  server.registerTool("update_tag", {
840
- description: "Update an existing tag. Only send the fields you want to change. Supports name, description, color, icon, favorite status, and the order of the page's tasks and sections (tasks_order).",
925
+ description: "Update an existing tag. Only send the fields you want to change. Supports name, description, color, icon, favorite status, archiving, and the order of the page's tasks and sections (tasks_order). The description is the place for a page's state (status, deadline, next step): there is no separate field for it.",
841
926
  inputSchema: {
842
927
  id: z.string().uuid().describe("Tag UUID"),
843
928
  name: z.string().optional().describe("Tag name"),
@@ -849,6 +934,10 @@ export function registerAllTools(server, fetchApi) {
849
934
  .optional()
850
935
  .describe("Full display order of the page's tasks: task ids and \"h:<header_id>\" entries for sections, top to bottom. Read the current one with get_tag, insert or move entries, send the whole array back. Tasks listed after a section belong to it."),
851
936
  is_favorite: z.boolean().optional().describe("Whether the tag is a favorite"),
937
+ archived: z
938
+ .boolean()
939
+ .optional()
940
+ .describe("true archives the tag: it leaves the active surfaces (sidebar, page lists, suggestions) but nothing is deleted — its notes, tasks and links stay, and it can be unarchived with false. The way to close a finished project."),
852
941
  },
853
942
  annotations: { title: "Update tag", destructiveHint: false, idempotentHint: true, openWorldHint: false },
854
943
  }, async ({ id, ...body }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keepsake-mcp",
3
- "version": "1.15.1",
3
+ "version": "1.17.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": {