@doist/todoist-mcp 12.2.1 → 12.2.2

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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { f as s, s as a, l as e, m as t, a as o, u as d, r, d as i, b as n, c, e as l, h as m, i as p, j as f, k, n as T, o as u, p as g, q as j, t as v, v as h, w as P, x as b, y as A, z as S, A as y, B as C, C as F, D as x, E, F as L, G as O, H as w, I as H, J as I, K as M, L as q, M as z, N as B } from "./mcp-server-DjKAKoIG.js";
2
- import { O as J, g as K } from "./mcp-server-DjKAKoIG.js";
3
- import { r as U, v as V } from "./require-valid-todoist-token-BSR4SNcV.js";
1
+ import { f as s, s as a, l as e, m as t, a as o, u as d, r, d as i, b as n, c, e as l, h as m, i as p, j as f, k, n as T, o as u, p as g, q as j, t as v, v as h, w as P, x as b, y as A, z as S, A as y, B as C, C as F, D as x, E, F as L, G as O, H as w, I as H, J as I, K as M, L as q, M as z, N as B } from "./mcp-server-DC5QFthT.js";
2
+ import { O as J, g as K } from "./mcp-server-DC5QFthT.js";
3
+ import { r as U, v as V } from "./require-valid-todoist-token-B3TJXi5X.js";
4
4
  const N = {
5
5
  // Task management tools
6
6
  addTasks: B,
package/dist/main-http.js CHANGED
@@ -3,8 +3,8 @@ import { isIP as p } from "node:net";
3
3
  import O from "dotenv";
4
4
  import { StreamableHTTPServerTransport as S } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
5
5
  import m from "express";
6
- import { g as v } from "./mcp-server-DjKAKoIG.js";
7
- import { r as w } from "./require-valid-todoist-token-BSR4SNcV.js";
6
+ import { g as v } from "./mcp-server-DC5QFthT.js";
7
+ import { r as w } from "./require-valid-todoist-token-B3TJXi5X.js";
8
8
  function f(t) {
9
9
  return t.startsWith("[") && t.endsWith("]") ? t.slice(1, -1) : t;
10
10
  }
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { StdioServerTransport as s } from "@modelcontextprotocol/sdk/server/stdio.js";
3
3
  import c from "dotenv";
4
- import { g as i } from "./mcp-server-DjKAKoIG.js";
4
+ import { g as i } from "./mcp-server-DC5QFthT.js";
5
5
  function p() {
6
6
  const e = process.env.TODOIST_BASE_URL, r = process.env.TODOIST_API_KEY;
7
7
  if (!r)
@@ -126,7 +126,7 @@ function xe(e) {
126
126
  if (t?.[1])
127
127
  return O(t[1]);
128
128
  }
129
- function q(e) {
129
+ function Y(e) {
130
130
  const t = T(e);
131
131
  if (t)
132
132
  return R(t);
@@ -257,7 +257,7 @@ function Fs(e) {
257
257
  if (t)
258
258
  return t;
259
259
  const { statusCode: r } = e, o = e.fieldHints.length > 0;
260
- return r === 401 || r === 403 ? "Verify your API token and access permissions, then retry." : r === 404 ? "Confirm the referenced IDs exist and are accessible, then retry." : r === 429 ? "Rate limit reached. Wait briefly and retry." : r !== void 0 && r >= 500 ? "Todoist API may be temporarily unavailable. Retry shortly." : o ? "Fix the field hints above and retry." : r === 400 || r === 422 ? "Check parameter values and formats, then retry." : "Check the request parameters and retry.";
260
+ return r === 401 ? "Authentication failed. Verify your API token, then retry." : r === 403 ? "Access denied. Retrying the same request will not help. If it's a scope/access problem (for example, insufficient token scope), use a token or account with the required access. Otherwise, change the request or target instead." : r === 404 ? "Confirm the referenced IDs exist and are accessible, then retry." : r === 429 ? "Rate limit reached. Wait briefly and retry." : r !== void 0 && r >= 500 ? "Todoist API may be temporarily unavailable. Retry shortly." : o ? "Fix the field hints above and retry." : r === 400 || r === 422 ? "Check parameter values and formats, then retry." : "Check the request parameters and retry.";
261
261
  }
262
262
  function _t(e) {
263
263
  const t = K(e) ? e : void 0, r = e instanceof Error && K(e.cause) ? e.cause : void 0, o = He(t?.response, r?.response), n = He(
@@ -296,17 +296,17 @@ function _t(e) {
296
296
  ), l = [
297
297
  T(n?.error),
298
298
  T(n?.message),
299
- q(n?.message),
299
+ Y(n?.message),
300
300
  T(t?.message),
301
301
  T(r?.message),
302
302
  e instanceof Error ? e.message : T(e)
303
303
  ].filter((m) => !!m), d = l.find((m) => !We(m)) || l[0], u = N(
304
- q(n?.errorExtra),
305
- q(n?.error_extra),
306
- q(n?.details),
307
- q(n?.errorDetails),
308
- q(n?.errors),
309
- q(t?.details)
304
+ Y(n?.errorExtra),
305
+ Y(n?.error_extra),
306
+ Y(n?.details),
307
+ Y(n?.errorDetails),
308
+ Y(n?.errors),
309
+ Y(t?.details)
310
310
  ), p = _s(n);
311
311
  return a !== void 0 || Ns(n) || c !== void 0 || i !== void 0 || (d ? We(d) : !1) ? {
312
312
  statusCode: a,
@@ -345,17 +345,17 @@ function Ws(e) {
345
345
  const t = _t(e);
346
346
  return t ? Hs(t) : Nt(e);
347
347
  }
348
- const Bs = "12.2.1", zs = {
348
+ const Bs = "12.2.2", qs = {
349
349
  version: Bs
350
- }, Ys = "todoist-mcp", Ke = zs.version, Lt = new Ts(), ut = ws(import.meta.url);
350
+ }, zs = "todoist-mcp", Ke = qs.version, Lt = new Ts(), ut = ws(import.meta.url);
351
351
  let ke;
352
- const qs = async () => {
352
+ const Ys = async () => {
353
353
  const e = ut.resolve("@doist/todoist-sdk"), t = _e(At(e), "transport", "http-dispatcher.js");
354
354
  return ut(t);
355
355
  };
356
- let Gs = qs;
356
+ let Gs = Ys;
357
357
  function Ks() {
358
- return `${Ys}/${Ke}`;
358
+ return `${zs}/${Ke}`;
359
359
  }
360
360
  function Mt(e) {
361
361
  return e.trim().toLowerCase();
@@ -524,16 +524,16 @@ async function _(e, t = {}) {
524
524
  }
525
525
  throw a;
526
526
  }
527
- function ze(e) {
527
+ function qe(e) {
528
528
  if (e == null)
529
529
  return e;
530
530
  if (Array.isArray(e))
531
- return e.map((t) => ze(t));
531
+ return e.map((t) => qe(t));
532
532
  if (typeof e == "object") {
533
533
  const t = {};
534
534
  for (const [r, o] of Object.entries(e))
535
535
  if (o !== null) {
536
- const n = ze(o);
536
+ const n = qe(o);
537
537
  if (n !== null && typeof n == "object" && !Array.isArray(n) && Object.keys(n).length === 0)
538
538
  continue;
539
539
  t[r] = n;
@@ -602,7 +602,7 @@ const b = {
602
602
  // OpenAI MCP tools
603
603
  SEARCH: "search",
604
604
  FETCH: "fetch"
605
- }, zc = {
605
+ }, qc = {
606
606
  /**
607
607
  * Strips email addresses from tool outputs that expose user data.
608
608
  * Affects: find-project-collaborators, find-completed-tasks
@@ -614,7 +614,7 @@ function mr({
614
614
  structuredContent: t,
615
615
  contentItems: r
616
616
  }) {
617
- const o = ze(t), n = {}, a = [];
617
+ const o = qe(t), n = {}, a = [];
618
618
  return r && a.push(...r), !hr && t && a.push({
619
619
  type: "text",
620
620
  text: JSON.stringify(o)
@@ -642,15 +642,15 @@ const kr = [
642
642
  b.FIND_PROJECT_COLLABORATORS,
643
643
  b.FIND_COMPLETED_TASKS
644
644
  ];
645
- function Ye(e) {
645
+ function ze(e) {
646
646
  if (e == null)
647
647
  return e;
648
648
  if (Array.isArray(e))
649
- return e.map((t) => Ye(t));
649
+ return e.map((t) => ze(t));
650
650
  if (typeof e == "object") {
651
651
  const t = {};
652
652
  for (const [r, o] of Object.entries(e))
653
- r !== "email" && (t[r] = Ye(o));
653
+ r !== "email" && (t[r] = ze(o));
654
654
  return t;
655
655
  }
656
656
  return e;
@@ -673,7 +673,7 @@ function k({
673
673
  () => e.execute(c, r)
674
674
  )
675
675
  );
676
- return n && (d && (d = Tr(d)), u && (u = Ye(u))), mr({ textContent: d, structuredContent: u, contentItems: p });
676
+ return n && (d && (d = Tr(d)), u && (u = ze(u))), mr({ textContent: d, structuredContent: u, contentItems: p });
677
677
  } catch (d) {
678
678
  return console.error(`Error executing tool ${e.name}:`, { args: c, error: d }), fr(Ws(d));
679
679
  }
@@ -1079,7 +1079,7 @@ async function Xe(e, t) {
1079
1079
  function ce(e, t) {
1080
1080
  return t.length === 0 ? e : e.length === 0 ? t : `${e} & ${t}`;
1081
1081
  }
1082
- function zt({
1082
+ function qt({
1083
1083
  resolvedAssigneeId: e,
1084
1084
  assigneeEmail: t,
1085
1085
  responsibleUserFiltering: r = "unassignedOrMe"
@@ -1122,14 +1122,14 @@ async function L(e) {
1122
1122
  function Ze(e) {
1123
1123
  return /(?<!\\)(?:\\\\)*\*/.test(e) ? e : `*${e.replaceAll(/\\(?!\*)/g, "\\\\")}*`;
1124
1124
  }
1125
- async function Yt(e, t) {
1125
+ async function zt(e, t) {
1126
1126
  return L({
1127
1127
  apiMethod: e.searchProjects.bind(e),
1128
1128
  args: { query: Ze(t) },
1129
1129
  limit: I.PROJECTS_MAX
1130
1130
  });
1131
1131
  }
1132
- async function qt(e) {
1132
+ async function Yt(e) {
1133
1133
  return L({
1134
1134
  apiMethod: e.getProjects.bind(e),
1135
1135
  args: {},
@@ -1412,7 +1412,7 @@ const Br = s.object({
1412
1412
  postedAt: s.string().describe("When the comment was posted (ISO 8601 format)."),
1413
1413
  postedUid: s.string().optional().describe("The UID of the user who posted this comment."),
1414
1414
  fileAttachment: Br.optional().describe("File attachment information, if any.")
1415
- }), zr = s.object({
1415
+ }), qr = s.object({
1416
1416
  id: s.string().optional().describe("The unique ID of the activity event."),
1417
1417
  objectType: s.string().describe("The type of object this event relates to (task, project, etc)."),
1418
1418
  objectId: s.string().describe("The ID of the object this event relates to."),
@@ -1422,7 +1422,7 @@ const Br = s.object({
1422
1422
  parentItemId: s.string().optional().describe("The ID of the parent item."),
1423
1423
  initiatorId: s.string().optional().describe("The ID of the user who initiated this event."),
1424
1424
  extraData: s.record(s.string(), s.unknown()).optional().describe("Additional event data.")
1425
- }), Yr = s.object({
1425
+ }), zr = s.object({
1426
1426
  id: s.string().describe("The unique ID of the user."),
1427
1427
  name: s.string().describe("The full name of the user."),
1428
1428
  email: s.string().describe("The email address of the user.")
@@ -1432,7 +1432,7 @@ const Br = s.object({
1432
1432
  color: he,
1433
1433
  order: s.number().optional().catch(void 0).describe("The display order of the label."),
1434
1434
  isFavorite: s.boolean().describe("Whether the label is marked as favorite.")
1435
- }), qr = s.object({
1435
+ }), Yr = s.object({
1436
1436
  isRecurring: s.boolean().describe("Whether this is a recurring reminder."),
1437
1437
  string: s.string().describe("Human-readable due string."),
1438
1438
  date: s.string().describe("Due date in ISO format."),
@@ -1443,7 +1443,7 @@ const Br = s.object({
1443
1443
  taskId: s.string().describe("The task ID this reminder belongs to."),
1444
1444
  type: s.enum(Is).describe("The type of reminder: relative, absolute, or location."),
1445
1445
  minuteOffset: s.number().optional().describe("Minutes before due time to trigger (relative reminders only)."),
1446
- due: qr.optional().describe(
1446
+ due: Yr.optional().describe(
1447
1447
  "Due date info (absolute and sometimes relative reminders)."
1448
1448
  ),
1449
1449
  name: s.string().optional().describe("Location name (location reminders only)."),
@@ -1734,7 +1734,7 @@ function Se(e, t = 5) {
1734
1734
  }
1735
1735
  return o;
1736
1736
  }
1737
- function z({
1737
+ function q({
1738
1738
  subject: e,
1739
1739
  count: t,
1740
1740
  limit: r,
@@ -2481,7 +2481,7 @@ const Bo = {
2481
2481
  projectId: s.string().min(1).describe(
2482
2482
  "The ID of the project to analyze. This triggers a new health analysis which may take some time to complete."
2483
2483
  )
2484
- }, zo = {
2484
+ }, qo = {
2485
2485
  projectId: s.string().describe("The project ID."),
2486
2486
  health: s.object({
2487
2487
  status: s.enum(Ge).describe("The health status after triggering analysis."),
@@ -2489,11 +2489,11 @@ const Bo = {
2489
2489
  updateInProgress: s.boolean().describe("Whether an analysis update is currently in progress.")
2490
2490
  }).describe("The health response returned after triggering analysis."),
2491
2491
  message: s.string().describe("A human-readable message about the analysis status.")
2492
- }, Yo = {
2492
+ }, zo = {
2493
2493
  name: b.ANALYZE_PROJECT_HEALTH,
2494
2494
  description: "Trigger a new health analysis for a project. Use this when the health data is stale or you want a fresh assessment. The analysis may take time to complete — use get-project-health afterward to see updated results.",
2495
2495
  parameters: Bo,
2496
- outputSchema: zo,
2496
+ outputSchema: qo,
2497
2497
  annotations: {
2498
2498
  readOnlyHint: !1,
2499
2499
  destructiveHint: !1,
@@ -2516,7 +2516,7 @@ ${n}`,
2516
2516
  }
2517
2517
  };
2518
2518
  }
2519
- }, qo = {
2519
+ }, Yo = {
2520
2520
  ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to complete.")
2521
2521
  }, Go = {
2522
2522
  completed: s.array(s.string()).describe("The IDs of successfully completed tasks."),
@@ -2527,7 +2527,7 @@ ${n}`,
2527
2527
  }, Ko = {
2528
2528
  name: b.COMPLETE_TASKS,
2529
2529
  description: "Complete one or more tasks by their IDs.",
2530
- parameters: qo,
2530
+ parameters: Yo,
2531
2531
  outputSchema: Go,
2532
2532
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
2533
2533
  async execute(e, t) {
@@ -2691,7 +2691,7 @@ async function sn(e, t) {
2691
2691
  async function rn(e, t) {
2692
2692
  if (!W(t))
2693
2693
  return { childCount: 0, children: [] };
2694
- const r = await qt(e), o = /* @__PURE__ */ new Map();
2694
+ const r = await Yt(e), o = /* @__PURE__ */ new Map();
2695
2695
  for (const i of r) {
2696
2696
  if (!W(i) || !i.parentId) continue;
2697
2697
  const c = o.get(i.parentId) ?? [];
@@ -2895,7 +2895,7 @@ Favorite: Yes`), a = {
2895
2895
  limit: s.number().int().min(1).max(I.ACTIVITY_MAX).default(I.ACTIVITY_DEFAULT).describe("Maximum number of activity events to return."),
2896
2896
  cursor: s.string().optional().describe("Pagination cursor for retrieving the next page of results.")
2897
2897
  }, pn = {
2898
- events: s.array(zr).describe("The activity events."),
2898
+ events: s.array(qr).describe("The activity events."),
2899
2899
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
2900
2900
  totalCount: s.number().describe("The total number of events in this page."),
2901
2901
  hasMore: s.boolean().describe("Whether there are more results available."),
@@ -2940,7 +2940,7 @@ function mn({
2940
2940
  const a = [];
2941
2941
  t.objectId && a.push(`object ID: ${t.objectId}`), t.projectId && a.push(`project: ${t.projectId}`), t.taskId && a.push(`task: ${t.taskId}`), t.initiatorId && a.push(`initiator: ${t.initiatorId}`);
2942
2942
  const i = [];
2943
- return e.length === 0 && (i.push("No activity events match the specified filters"), i.push("Note: Activity logs only show recent events"), t.eventType && i.push(`Try removing the eventType filter (${t.eventType})`), t.objectType && i.push(`Try removing the objectType filter (${t.objectType})`), (t.objectId || t.projectId || t.taskId) && i.push("Verify the object ID is correct")), z({
2943
+ return e.length === 0 && (i.push("No activity events match the specified filters"), i.push("Note: Activity logs only show recent events"), t.eventType && i.push(`Try removing the eventType filter (${t.eventType})`), t.objectType && i.push(`Try removing the objectType filter (${t.objectType})`), (t.objectId || t.projectId || t.taskId) && i.push("Verify the object ID is correct")), q({
2944
2944
  subject: o,
2945
2945
  count: e.length,
2946
2946
  limit: t.limit,
@@ -3231,7 +3231,7 @@ function xn({
3231
3231
  i.push(`assigned to: ${l}`);
3232
3232
  }
3233
3233
  const c = [];
3234
- return e.length === 0 && (c.push("No tasks completed in this date range"), c.push("Try expanding the date range"), (t.projectId || t.sectionId || t.parentId) && c.push("Try removing project/section/parent filters"), t.getBy === "due" && c.push('Try switching to "completion" date instead')), z({
3234
+ return e.length === 0 && (c.push("No tasks completed in this date range"), c.push("Try expanding the date range"), (t.projectId || t.sectionId || t.parentId) && c.push("Try removing project/section/parent filters"), t.getBy === "due" && c.push('Try switching to "completion" date instead')), q({
3235
3235
  subject: a,
3236
3236
  count: e.length,
3237
3237
  limit: t.limit,
@@ -3300,7 +3300,7 @@ function Rn({
3300
3300
  const h = o.length > 0 ? `
3301
3301
  Shared labels (${o.length}): ${o.join(", ")}` : `
3302
3302
  No shared labels.`;
3303
- return z({
3303
+ return q({
3304
3304
  subject: n,
3305
3305
  count: e.length,
3306
3306
  limit: t.searchText ? void 0 : t.limit,
@@ -3318,7 +3318,7 @@ const { FIND_PROJECTS: ts, ADD_TASKS: ss, UPDATE_TASKS: rs } = b, _n = {
3318
3318
  "Search for a user by name or email (partial and case insensitive match). If omitted, all users are returned."
3319
3319
  )
3320
3320
  }, Un = {
3321
- collaborators: s.array(Yr).describe("The found users."),
3321
+ collaborators: s.array(zr).describe("The found users."),
3322
3322
  projectInfo: s.object({
3323
3323
  id: s.string().describe("The project ID."),
3324
3324
  name: s.string().describe("The project name."),
@@ -3480,7 +3480,7 @@ function ns({
3480
3480
  const d = [];
3481
3481
  e.length === 0 && r && (d.push(`No users match "${r}"`), d.push("Try a broader search term or check spelling"), o > 0 && d.push(`${o} users available without filter`));
3482
3482
  const u = [];
3483
- return e.length > 0 ? (u.push(`Use ${ss} with responsibleUser to assign new tasks`), u.push(`Use ${rs} with responsibleUser to reassign existing tasks`), u.push("Use user names, emails, or IDs for assignments")) : (u.push(`Use ${ts} to find other projects`), r && o > 0 && u.push("Try searching without filters to see all users")), z({
3483
+ return e.length > 0 ? (u.push(`Use ${ss} with responsibleUser to assign new tasks`), u.push(`Use ${rs} with responsibleUser to reassign existing tasks`), u.push("Use user names, emails, or IDs for assignments")) : (u.push(`Use ${ts} to find other projects`), r && o > 0 && u.push("Try searching without filters to see all users")), q({
3484
3484
  subject: i,
3485
3485
  count: e.length,
3486
3486
  filterHints: c,
@@ -3522,7 +3522,7 @@ const { ADD_PROJECTS: kt } = b, Fn = {
3522
3522
  let n, a = null;
3523
3523
  if (r || o === "all") {
3524
3524
  const c = Promise.resolve([]), [l, d] = await Promise.all([
3525
- o === "archived" ? c : r ? Yt(t, r) : qt(t),
3525
+ o === "archived" ? c : r ? zt(t, r) : Yt(t),
3526
3526
  o === "active" ? c : Pr(t)
3527
3527
  ]), u = r ? Rr(r) : null, p = u ? d.filter((h) => u.test(h.name)) : d;
3528
3528
  n = [...l, ...p];
@@ -3535,7 +3535,7 @@ const { ADD_PROJECTS: kt } = b, Fn = {
3535
3535
  }
3536
3536
  const i = n.map(J);
3537
3537
  return {
3538
- textContent: zn({ projects: i, args: e, nextCursor: a }),
3538
+ textContent: qn({ projects: i, args: e, nextCursor: a }),
3539
3539
  structuredContent: {
3540
3540
  projects: i,
3541
3541
  nextCursor: a ?? void 0,
@@ -3546,7 +3546,7 @@ const { ADD_PROJECTS: kt } = b, Fn = {
3546
3546
  };
3547
3547
  }
3548
3548
  };
3549
- function zn({
3549
+ function qn({
3550
3550
  projects: e,
3551
3551
  args: t,
3552
3552
  nextCursor: r
@@ -3556,7 +3556,7 @@ function zn({
3556
3556
  const i = 10, l = e.slice(0, i).map(mo).join(`
3557
3557
  `), d = e.length - i, u = d > 0 ? `${l}
3558
3558
  …and ${d} more` : l, p = [];
3559
- return e.length === 0 && (t.searchText ? (p.push("Try broader search terms"), p.push("Check spelling"), p.push("Remove searchText to see all projects")) : t.archivedStatus === "archived" ? (p.push("No archived projects"), p.push("Use archivedStatus: 'all' to also see active projects")) : t.archivedStatus === "all" ? (p.push("No projects created yet"), p.push(`Use ${kt} to create a project`)) : (p.push("No active projects"), p.push("Use archivedStatus: 'all' to include archived projects"), p.push(`Use ${kt} to create a project`))), z({
3559
+ return e.length === 0 && (t.searchText ? (p.push("Try broader search terms"), p.push("Check spelling"), p.push("Remove searchText to see all projects")) : t.archivedStatus === "archived" ? (p.push("No archived projects"), p.push("Use archivedStatus: 'all' to also see active projects")) : t.archivedStatus === "all" ? (p.push("No projects created yet"), p.push(`Use ${kt} to create a project`)) : (p.push("No active projects"), p.push("Use archivedStatus: 'all' to include archived projects"), p.push(`Use ${kt} to create a project`))), q({
3560
3560
  subject: n,
3561
3561
  count: e.length,
3562
3562
  limit: t.searchText || t.archivedStatus === "all" ? void 0 : t.limit,
@@ -3566,13 +3566,13 @@ function zn({
3566
3566
  zeroReasonHints: p
3567
3567
  });
3568
3568
  }
3569
- const Yn = {
3569
+ const zn = {
3570
3570
  taskId: s.string().optional().describe(
3571
3571
  "Find all reminders for a specific task. Returns both time-based and location reminders."
3572
3572
  ),
3573
3573
  reminderId: s.string().optional().describe("Get a specific time-based reminder (relative or absolute) by its ID."),
3574
3574
  locationReminderId: s.string().optional().describe("Get a specific location reminder by its ID.")
3575
- }, qn = {
3575
+ }, Yn = {
3576
3576
  reminders: s.array(et).describe("The found reminders (time-based and location)."),
3577
3577
  searchType: s.string().describe('The search type used: "task", "reminder", or "location_reminder".'),
3578
3578
  searchId: s.string().describe("The ID used for the search."),
@@ -3580,8 +3580,8 @@ const Yn = {
3580
3580
  }, Gn = {
3581
3581
  name: b.FIND_REMINDERS,
3582
3582
  description: "Find reminders by task ID (returns all reminder types), or get a specific reminder by its ID. Use reminderId for time-based reminders and locationReminderId for location reminders.",
3583
- parameters: Yn,
3584
- outputSchema: qn,
3583
+ parameters: zn,
3584
+ outputSchema: Yn,
3585
3585
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3586
3586
  async execute(e, t) {
3587
3587
  const { taskId: r, reminderId: o, locationReminderId: n } = e, a = [r, o, n].filter(Boolean);
@@ -3703,7 +3703,7 @@ function Qn({
3703
3703
  r ? (o.push("Try broader search terms"), o.push("Check spelling"), o.push("Remove searchText to see all sections")) : (o.push("Project has no sections yet"), o.push(`Use ${Vn} to create sections`));
3704
3704
  const n = r ? `Sections in project ${t} matching "${r}"` : `Sections in project ${t}`, a = e.length > 0 ? e.map((i) => ` ${i.name} • id=${i.id}`).join(`
3705
3705
  `) : void 0;
3706
- return z({
3706
+ return q({
3707
3707
  subject: n,
3708
3708
  count: e.length,
3709
3709
  previewLines: a,
@@ -3765,7 +3765,7 @@ const ea = {
3765
3765
  }
3766
3766
  const i = it(e.labels, e.labelsOperator);
3767
3767
  i.length > 0 && (a = ce(a, `(${i})`));
3768
- const c = zt({
3768
+ const c = qt({
3769
3769
  resolvedAssigneeId: o,
3770
3770
  assigneeEmail: n,
3771
3771
  responsibleUserFiltering: e.responsibleUserFiltering
@@ -3829,7 +3829,7 @@ function ra({
3829
3829
  i.push(`Great job! No tasks for today${c}`);
3830
3830
  } else
3831
3831
  i.push("Expand date range with larger 'daysCount'"), i.push("Check today's tasks with startDate='today'");
3832
- return z({
3832
+ return q({
3833
3833
  subject: a,
3834
3834
  count: e.length,
3835
3835
  limit: t.limit,
@@ -3972,7 +3972,7 @@ const aa = new na(), { FIND_COMPLETED_TASKS: Tt, ADD_TASKS: wt } = b, ia = {
3972
3972
  cursor: d ?? null
3973
3973
  };
3974
3974
  o && (D.projectId = await V({ projectId: o, user: f })), n && (D.sectionId = n), a && (D.parentId = a);
3975
- const { results: fe, nextCursor: Y } = await t.getTasks(D), De = fe.map(U);
3975
+ const { results: fe, nextCursor: z } = await t.getTasks(D), De = fe.map(U);
3976
3976
  let M = r ? De.filter(
3977
3977
  (te) => te.content.toLowerCase().includes(r.toLowerCase()) || te.description?.toLowerCase().includes(r.toLowerCase())
3978
3978
  ) : De;
@@ -3989,15 +3989,15 @@ const aa = new na(), { FIND_COMPLETED_TASKS: Tt, ADD_TASKS: wt } = b, ia = {
3989
3989
  textContent: Oe({
3990
3990
  tasks: M,
3991
3991
  args: e,
3992
- nextCursor: Y,
3992
+ nextCursor: z,
3993
3993
  isContainerSearch: !0,
3994
3994
  assigneeEmail: y
3995
3995
  }),
3996
3996
  structuredContent: {
3997
3997
  tasks: M,
3998
- nextCursor: Y ?? void 0,
3998
+ nextCursor: z ?? void 0,
3999
3999
  totalCount: M.length,
4000
- hasMore: !!Y,
4000
+ hasMore: !!z,
4001
4001
  appliedFilters: e
4002
4002
  }
4003
4003
  };
@@ -4008,19 +4008,19 @@ const aa = new na(), { FIND_COMPLETED_TASKS: Tt, ADD_TASKS: wt } = b, ia = {
4008
4008
  lang: "en",
4009
4009
  limit: l,
4010
4010
  cursor: d ?? null
4011
- }), Y = D.map(U);
4011
+ }), z = D.map(U);
4012
4012
  return {
4013
4013
  textContent: Oe({
4014
- tasks: Y,
4014
+ tasks: z,
4015
4015
  args: e,
4016
4016
  nextCursor: fe,
4017
4017
  isContainerSearch: !1,
4018
4018
  assigneeEmail: y
4019
4019
  }),
4020
4020
  structuredContent: {
4021
- tasks: Y,
4021
+ tasks: z,
4022
4022
  nextCursor: fe ?? void 0,
4023
- totalCount: Y.length,
4023
+ totalCount: z.length,
4024
4024
  hasMore: !!fe,
4025
4025
  appliedFilters: e
4026
4026
  }
@@ -4030,7 +4030,7 @@ const aa = new na(), { FIND_COMPLETED_TASKS: Tt, ADD_TASKS: wt } = b, ia = {
4030
4030
  r && (v = ce(v, `search: ${r}`));
4031
4031
  const $ = it(u, p);
4032
4032
  if (v = ce(v, $), !(m && !i && !c)) {
4033
- const D = zt({
4033
+ const D = qt({
4034
4034
  resolvedAssigneeId: x,
4035
4035
  assigneeEmail: y,
4036
4036
  responsibleUserFiltering: c
@@ -4115,7 +4115,7 @@ function Oe({
4115
4115
  t.searchText && (c.push("Try broader search terms"), c.push("Verify spelling and try partial words"), t.responsibleUser || c.push(`Check completed tasks with ${Tt}`));
4116
4116
  }
4117
4117
  }
4118
- return z({
4118
+ return q({
4119
4119
  subject: a,
4120
4120
  count: e.length,
4121
4121
  limit: t.limit,
@@ -4239,11 +4239,11 @@ function vt(e) {
4239
4239
  }
4240
4240
  return r;
4241
4241
  }
4242
- function qe(e, t = "") {
4242
+ function Ye(e, t = "") {
4243
4243
  const r = [];
4244
4244
  for (const o of e) {
4245
4245
  const n = `id=${o.id}`, a = o.dueDate ? `; due=${o.dueDate}` : "", i = `; content=${o.content}`;
4246
- r.push(`${t}- ${n}${a}${i}`), o.children.length > 0 && r.push(...qe(o.children, `${t} `));
4246
+ r.push(`${t}- ${n}${a}${i}`), o.children.length > 0 && r.push(...Ye(o.children, `${t} `));
4247
4247
  }
4248
4248
  return r;
4249
4249
  }
@@ -4329,7 +4329,7 @@ async function ya(e, t) {
4329
4329
  if (i.length > 0) {
4330
4330
  c.push("");
4331
4331
  const u = vt(i);
4332
- c.push(...qe(u));
4332
+ c.push(...Ye(u));
4333
4333
  }
4334
4334
  for (const u of o) {
4335
4335
  c.push(""), c.push(`## ${u.name}`);
@@ -4337,7 +4337,7 @@ async function ya(e, t) {
4337
4337
  if (!p?.length)
4338
4338
  continue;
4339
4339
  const h = vt(p);
4340
- c.push(...qe(h));
4340
+ c.push(...Ye(h));
4341
4341
  }
4342
4342
  const l = c.join(`
4343
4343
  `), d = {
@@ -4816,9 +4816,9 @@ const Ba = {
4816
4816
  structuredContent: r.structuredContent
4817
4817
  };
4818
4818
  }
4819
- }, { FIND_TASKS: za, FIND_PROJECT_COLLABORATORS: jt, UPDATE_TASKS: Ya } = b, qa = 50, Ga = {
4819
+ }, { FIND_TASKS: qa, FIND_PROJECT_COLLABORATORS: jt, UPDATE_TASKS: za } = b, Ya = 50, Ga = {
4820
4820
  operation: s.enum(["assign", "unassign", "reassign"]).describe("The assignment operation to perform."),
4821
- taskIds: s.array(s.string()).min(1).max(qa).describe("The IDs of the tasks to operate on (max 50)."),
4821
+ taskIds: s.array(s.string()).min(1).max(Ya).describe("The IDs of the tasks to operate on (max 50)."),
4822
4822
  responsibleUser: s.string().optional().describe(
4823
4823
  'The user to assign tasks to. Can be "me" (assigns to current user), a user ID, name, or email. Required for assign and reassign operations.'
4824
4824
  ),
@@ -5069,8 +5069,8 @@ function Pe({
5069
5069
  `;
5070
5070
  }
5071
5071
  return !r && o.length > 0 ? (c += `**Next steps:**
5072
- `, c += `• Use ${za} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
5073
- `, c += `• Use ${Ya} for individual assignment changes
5072
+ `, c += `• Use ${qa} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
5073
+ `, c += `• Use ${za} for individual assignment changes
5074
5074
  `, n.length > 0 && (c += `• Check failed tasks and use ${jt} to verify collaborator access
5075
5075
  `)) : r ? (c += `**To execute:**
5076
5076
  `, c += `• Remove dryRun parameter and run again to execute changes
@@ -5322,7 +5322,7 @@ const li = {
5322
5322
  limit: I.TASKS_MAX,
5323
5323
  cursor: void 0
5324
5324
  }),
5325
- Yt(t, r)
5325
+ zt(t, r)
5326
5326
  ]), a = [];
5327
5327
  for (const i of o.tasks)
5328
5328
  a.push({
@@ -5738,13 +5738,13 @@ const Bi = s.object({
5738
5738
  minuteOffset: s.number().int().min(0).optional().describe("New minute offset before task due time."),
5739
5739
  service: Ce.optional().describe('New delivery method: "email" or "push".'),
5740
5740
  isUrgent: $e
5741
- }), zi = s.object({
5741
+ }), qi = s.object({
5742
5742
  type: s.literal("absolute"),
5743
5743
  id: s.string().min(1).describe("The ID of the absolute reminder to update."),
5744
5744
  due: Jt.optional().describe("New due date/time for the reminder."),
5745
5745
  service: Ce.optional().describe('New delivery method: "email" or "push".'),
5746
5746
  isUrgent: $e
5747
- }), Yi = s.object({
5747
+ }), zi = s.object({
5748
5748
  type: s.literal("location"),
5749
5749
  id: s.string().min(1).describe("The ID of the location reminder to update."),
5750
5750
  name: s.string().optional().describe("New location name."),
@@ -5754,12 +5754,12 @@ const Bi = s.object({
5754
5754
  'New trigger condition: "on_enter" or "on_leave".'
5755
5755
  ),
5756
5756
  radius: s.number().int().optional().describe("New radius in meters.")
5757
- }), qi = s.discriminatedUnion("type", [
5757
+ }), Yi = s.discriminatedUnion("type", [
5758
5758
  Bi,
5759
- zi,
5760
- Yi
5759
+ qi,
5760
+ zi
5761
5761
  ]), Gi = {
5762
- reminders: s.array(qi).min(1).max(we).describe(
5762
+ reminders: s.array(Yi).min(1).max(we).describe(
5763
5763
  `Array of reminders to update (max ${we}). Each must include the reminder type and ID. Only include fields that need to change.`
5764
5764
  )
5765
5765
  }, Ki = {
@@ -6386,7 +6386,7 @@ You have access to comprehensive Todoist management tools for personal productiv
6386
6386
 
6387
6387
  Always provide clear, actionable task titles and descriptions. Use the overview tools to give users context about their workload and project status.
6388
6388
  `;
6389
- function Yc({
6389
+ function zc({
6390
6390
  todoistApiKey: e,
6391
6391
  baseUrl: t,
6392
6392
  features: r = []
@@ -6410,7 +6410,7 @@ function Yc({
6410
6410
  };
6411
6411
  Ps(o);
6412
6412
  const i = { server: o, client: n, features: r };
6413
- return k({ tool: Mo, ...i }), k({ tool: Ko, ...i }), k({ tool: fi, ...i }), k({ tool: ac, ...i }), k({ tool: ci, ...i }), k({ tool: da, ...i }), k({ tool: a, ...i }), k({ tool: An, ...i }), k({ tool: wo, ...i }), k({ tool: Fi, ...i }), k({ tool: Bn, ...i }), k({ tool: Za, ...i }), k({ tool: ti, ...i }), k({ tool: Ro, ...i }), k({ tool: Qi, ...i }), k({ tool: Zn, ...i }), k({ tool: Jr, ...i }), k({ tool: Tn, ...i }), k({ tool: Ti, ...i }), k({ tool: Ao, ...i }), k({ tool: Gn, ...i }), k({ tool: Vi, ...i }), k({ tool: xc, ...i }), k({ tool: lo, ...i }), k({ tool: Ri, ...i }), k({ tool: Pn, ...i }), k({ tool: eo, ...i }), k({ tool: no, ...i }), k({ tool: Si, ...i }), k({ tool: hn, ...i }), k({ tool: va, ...i }), k({ tool: Ra, ...i }), k({ tool: $a, ...i }), k({ tool: Yo, ...i }), k({ tool: La, ...i }), k({ tool: ka, ...i }), k({ tool: Zo, ...i }), k({ tool: an, ...i }), k({ tool: oi, ...i }), k({ tool: wc, ...i }), k({ tool: Nn, ...i }), k({ tool: Va, ...i }), k({ tool: Ba, ...i }), k({ tool: pi, ...i }), k({ tool: ln, ...i }), o.registerPrompt(
6413
+ return k({ tool: Mo, ...i }), k({ tool: Ko, ...i }), k({ tool: fi, ...i }), k({ tool: ac, ...i }), k({ tool: ci, ...i }), k({ tool: da, ...i }), k({ tool: a, ...i }), k({ tool: An, ...i }), k({ tool: wo, ...i }), k({ tool: Fi, ...i }), k({ tool: Bn, ...i }), k({ tool: Za, ...i }), k({ tool: ti, ...i }), k({ tool: Ro, ...i }), k({ tool: Qi, ...i }), k({ tool: Zn, ...i }), k({ tool: Jr, ...i }), k({ tool: Tn, ...i }), k({ tool: Ti, ...i }), k({ tool: Ao, ...i }), k({ tool: Gn, ...i }), k({ tool: Vi, ...i }), k({ tool: xc, ...i }), k({ tool: lo, ...i }), k({ tool: Ri, ...i }), k({ tool: Pn, ...i }), k({ tool: eo, ...i }), k({ tool: no, ...i }), k({ tool: Si, ...i }), k({ tool: hn, ...i }), k({ tool: va, ...i }), k({ tool: Ra, ...i }), k({ tool: $a, ...i }), k({ tool: zo, ...i }), k({ tool: La, ...i }), k({ tool: ka, ...i }), k({ tool: Zo, ...i }), k({ tool: an, ...i }), k({ tool: oi, ...i }), k({ tool: wc, ...i }), k({ tool: Nn, ...i }), k({ tool: Va, ...i }), k({ tool: Ba, ...i }), k({ tool: pi, ...i }), k({ tool: ln, ...i }), o.registerPrompt(
6414
6414
  be.name,
6415
6415
  {
6416
6416
  title: be.title,
@@ -6435,7 +6435,7 @@ export {
6435
6435
  fi as L,
6436
6436
  Ko as M,
6437
6437
  Mo as N,
6438
- zc as O,
6438
+ qc as O,
6439
6439
  or as P,
6440
6440
  Vs as Q,
6441
6441
  dr as R,
@@ -6443,9 +6443,9 @@ export {
6443
6443
  ka as b,
6444
6444
  La as c,
6445
6445
  Zo as d,
6446
- Yo as e,
6446
+ zo as e,
6447
6447
  ln as f,
6448
- Yc as g,
6448
+ zc as g,
6449
6449
  $a as h,
6450
6450
  Ra as i,
6451
6451
  va as j,
@@ -1,4 +1,4 @@
1
- import { P as A, Q as v, R as T } from "./mcp-server-DjKAKoIG.js";
1
+ import { P as A, Q as v, R as T } from "./mcp-server-DC5QFthT.js";
2
2
  const y = /* @__PURE__ */ new Set([401, 403]);
3
3
  function C(e) {
4
4
  const t = T(e);
@@ -1 +1 @@
1
- {"version":3,"file":"tool-execution-error.d.ts","sourceRoot":"","sources":["../src/tool-execution-error.ts"],"names":[],"mappings":"AAqfA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAc3D;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAW/D"}
1
+ {"version":3,"file":"tool-execution-error.d.ts","sourceRoot":"","sources":["../src/tool-execution-error.ts"],"names":[],"mappings":"AA4fA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAc3D;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAW/D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doist/todoist-mcp",
3
- "version": "12.2.1",
3
+ "version": "12.2.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",