@doist/todoist-mcp 13.6.3 → 13.6.4

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,15 +1,15 @@
1
- import { ResourceTemplate as Vs, McpServer as Js } from "@modelcontextprotocol/server";
1
+ import { ResourceTemplate as Js, McpServer as Xs } from "@modelcontextprotocol/server";
2
2
  import { createHash as Xt, randomUUID as Me } from "node:crypto";
3
- import { readFileSync as Xs } from "node:fs";
3
+ import { readFileSync as Qs } from "node:fs";
4
4
  import { dirname as Qt, join as Fe } from "node:path";
5
- import { fileURLToPath as Qs } from "node:url";
5
+ import { fileURLToPath as Zs } from "node:url";
6
6
  import { RESOURCE_MIME_TYPE as He } from "@modelcontextprotocol/ext-apps/server";
7
- import ae, { ZodError as Zs, z as s } from "zod";
8
- import { AsyncLocalStorage as eo } from "node:async_hooks";
9
- import { createRequire as to } from "node:module";
10
- import { TodoistApi as so, isWorkspaceProject as je, isPersonalProject as Y, colors as We, LOCATION_TRIGGERS as Zt, REMINDER_TYPES as oo, createCommand as he, REMINDER_DELIVERY_SERVICES as ro, HEALTH_STATUSES as ot, getTaskUrl as es, getProjectUrl as ts, ACTIVITY_EVENT_TYPES as no, ACTIVITY_OBJECT_TYPES as io, escapeFilterToken as ss, parseTodoistUrl as ao, WORKSPACE_ROLES as co, WORKSPACE_PLANS as lo } from "@doist/todoist-sdk";
7
+ import ae, { ZodError as eo, z as s } from "zod";
8
+ import { AsyncLocalStorage as to } from "node:async_hooks";
9
+ import { createRequire as so } from "node:module";
10
+ import { TodoistApi as oo, isWorkspaceProject as je, isPersonalProject as Y, colors as We, LOCATION_TRIGGERS as Zt, REMINDER_TYPES as ro, createCommand as he, REMINDER_DELIVERY_SERVICES as no, HEALTH_STATUSES as ot, getTaskUrl as es, getProjectUrl as ts, ACTIVITY_EVENT_TYPES as io, ACTIVITY_OBJECT_TYPES as ao, escapeFilterToken as ss, parseTodoistUrl as co, WORKSPACE_ROLES as lo, WORKSPACE_PLANS as uo } from "@doist/todoist-sdk";
11
11
  import { addDays as Be, formatISO as wt } from "date-fns";
12
- const rt = 3600 * 1e3, uo = 365 * 24 * rt, j = {
12
+ const rt = 3600 * 1e3, po = 365 * 24 * rt, j = {
13
13
  /** Default limit for task listings */
14
14
  TASKS_DEFAULT: 10,
15
15
  /** Maximum limit for task search and list operations */
@@ -45,7 +45,7 @@ const rt = 3600 * 1e3, uo = 365 * 24 * rt, j = {
45
45
  }, ke = {
46
46
  /** Maximum number of failures to show in detailed error messages */
47
47
  MAX_FAILURES_SHOWN: 3
48
- }, po = {
48
+ }, ho = {
49
49
  /** Maximum number of failed items named in one log line */
50
50
  MAX_FAILURES_LOGGED: 5
51
51
  }, os = {
@@ -74,26 +74,26 @@ const rt = 3600 * 1e3, uo = 365 * 24 * rt, j = {
74
74
  * queue (serialised moves to 100 distinct destinations is roughly 15s).
75
75
  */
76
76
  QUEUE_WAIT_MS: 3e4
77
- }, vt = Qt(Qs(import.meta.url)), ho = [
77
+ }, vt = Qt(Zs(import.meta.url)), mo = [
78
78
  Fe(vt, "task-list", "index.html"),
79
79
  Fe(vt, "mcp-apps", "index.html")
80
- ], mo = `<!doctype html>
80
+ ], fo = `<!doctype html>
81
81
  <html>
82
82
  <body>
83
83
  <p>Task list app is missing. Run "npm run build" to generate it.</p>
84
84
  </body>
85
85
  </html>`;
86
- function fo() {
86
+ function bo() {
87
87
  const e = [];
88
- for (const t of ho)
88
+ for (const t of mo)
89
89
  try {
90
- return Xs(t, "utf-8");
90
+ return Qs(t, "utf-8");
91
91
  } catch (o) {
92
92
  e.push(o);
93
93
  }
94
- return console.error("Failed to load task list app HTML from any known path:", e), mo;
94
+ return console.error("Failed to load task list app HTML from any known path:", e), fo;
95
95
  }
96
- const rs = fo(), bo = Xt("sha256").update(rs).digest("hex").slice(0, 12), Ke = `ui://todoist/task-list@${bo}`, go = "ui://todoist/task-list@{hash}", Ye = "Interactive task list widget", yo = "https://ai.todoist.net", Ge = {
96
+ const rs = bo(), go = Xt("sha256").update(rs).digest("hex").slice(0, 12), Ke = `ui://todoist/task-list@${go}`, yo = "ui://todoist/task-list@{hash}", Ye = "Interactive task list widget", To = "https://ai.todoist.net", Ge = {
97
97
  ui: {
98
98
  prefersBorder: !0,
99
99
  csp: {
@@ -108,8 +108,8 @@ const rs = fo(), bo = Xt("sha256").update(rs).digest("hex").slice(0, 12), Ke = `
108
108
  connect_domains: [],
109
109
  resource_domains: []
110
110
  },
111
- "openai/widgetDomain": yo
112
- }, To = { ttlMs: uo, cacheScope: "public" }, ko = { ttlMs: rt, cacheScope: "private" };
111
+ "openai/widgetDomain": To
112
+ }, ko = { ttlMs: po, cacheScope: "public" }, wo = { ttlMs: rt, cacheScope: "private" };
113
113
  function It(e) {
114
114
  return {
115
115
  contents: [
@@ -122,7 +122,7 @@ function It(e) {
122
122
  ]
123
123
  };
124
124
  }
125
- function wo(e) {
125
+ function vo(e) {
126
126
  e.registerResource(
127
127
  "todoist-task-list",
128
128
  Ke,
@@ -130,17 +130,17 @@ function wo(e) {
130
130
  description: Ye,
131
131
  mimeType: He,
132
132
  _meta: Ge,
133
- cacheHint: To
133
+ cacheHint: ko
134
134
  },
135
135
  async () => It(Ke)
136
136
  ), e.registerResource(
137
137
  "todoist-task-list-hash-fallback",
138
- new Vs(go, { list: void 0 }),
138
+ new Js(yo, { list: void 0 }),
139
139
  {
140
140
  description: `${Ye} compatibility fallback`,
141
141
  mimeType: He,
142
142
  _meta: Ge,
143
- cacheHint: ko
143
+ cacheHint: wo
144
144
  },
145
145
  async (t) => It(t.toString())
146
146
  );
@@ -172,14 +172,14 @@ function ce(e) {
172
172
  const t = _(e);
173
173
  return t !== void 0 ? t : v(e);
174
174
  }
175
- function vo(e) {
175
+ function Io(e) {
176
176
  return e.replace(/\b(Bearer)\s+[A-Za-z0-9._~+/=-]+/gi, "$1 [REDACTED]").replace(
177
177
  /\b(token|api[_-]?key|authorization)\s*[:=]\s*["']?[A-Za-z0-9._~+/=-]{6,}["']?/gi,
178
178
  "$1: [REDACTED]"
179
179
  ).replace(/([?&](?:token|api[_-]?key|authorization)=)[^&\s]+/gi, "$1[REDACTED]").replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g, "[REDACTED]");
180
180
  }
181
181
  function L(e, t = 220) {
182
- const o = vo(e).replace(/\s+/g, " ").trim();
182
+ const o = Io(e).replace(/\s+/g, " ").trim();
183
183
  return o.length <= t ? o : `${o.slice(0, t - 3)}...`;
184
184
  }
185
185
  function Ve(e) {
@@ -220,7 +220,7 @@ function X(e) {
220
220
  }
221
221
  return r.length > 0 ? L(r.join("; ")) : void 0;
222
222
  }
223
- function Io(e) {
223
+ function So(e) {
224
224
  if (!e)
225
225
  return [];
226
226
  const t = /* @__PURE__ */ new Set(), o = (a) => {
@@ -283,7 +283,7 @@ function Io(e) {
283
283
  }
284
284
  return Array.from(t).slice(0, 3);
285
285
  }
286
- const So = [
286
+ const Co = [
287
287
  "error",
288
288
  "error_code",
289
289
  "error_tag",
@@ -294,14 +294,14 @@ const So = [
294
294
  "httpCode",
295
295
  "errorExtra"
296
296
  ];
297
- function Co(e) {
298
- return e ? So.some((t) => e[t] !== void 0) : !1;
297
+ function jo(e) {
298
+ return e ? Co.some((t) => e[t] !== void 0) : !1;
299
299
  }
300
300
  const Je = {
301
301
  MAX_ITEMS_LIMIT_REACHED: "This project has reached the maximum number of active tasks per project (subtasks count toward it; completed tasks do not). The cap is the same on every Todoist plan — upgrading will not raise it — and it is not an authentication or permission problem. Complete, delete, or move existing tasks out of the project, or add the task to a different project, then retry.",
302
302
  USER_CANNOT_VIEW_TEMPLATE: "This template exists but belongs to another account. Personal templates are private to whoever saved them, and a link to one cannot be used by anyone else. Use a public gallery template instead, or ask the owner to export it with export-project-template and share the CSV."
303
303
  };
304
- function jo(...e) {
304
+ function $o(...e) {
305
305
  for (const t of e) {
306
306
  if (!t)
307
307
  continue;
@@ -312,16 +312,16 @@ function jo(...e) {
312
312
  return Je[r];
313
313
  }
314
314
  }
315
- function $o(e) {
315
+ function Ao(e) {
316
316
  if (e.tag) {
317
317
  const t = Je[e.tag.toUpperCase()];
318
318
  if (t)
319
319
  return t;
320
320
  }
321
- return jo(...e.rawText ?? [], e.message, e.details);
321
+ return $o(...e.rawText ?? [], e.message, e.details);
322
322
  }
323
323
  function Do(e) {
324
- const t = $o(e);
324
+ const t = Ao(e);
325
325
  if (t)
326
326
  return t;
327
327
  const { statusCode: o } = e, r = e.fieldHints.length > 0;
@@ -375,8 +375,8 @@ function nt(e) {
375
375
  X(n?.errorDetails),
376
376
  X(n?.errors),
377
377
  X(t?.details)
378
- ), p = Io(n);
379
- return i !== void 0 || Co(n) || c !== void 0 || a !== void 0 || (u ? Ve(u) : !1) ? {
378
+ ), p = So(n);
379
+ return i !== void 0 || jo(n) || c !== void 0 || a !== void 0 || (u ? Ve(u) : !1) ? {
380
380
  statusCode: i,
381
381
  code: a,
382
382
  tag: c ? L(c, 80) : void 0,
@@ -390,7 +390,7 @@ function ns(e) {
390
390
  const t = [];
391
391
  return e.statusCode !== void 0 && t.push(`HTTP ${e.statusCode}`), e.code !== void 0 && t.push(`code ${e.code}`), e.tag && t.push(`tag ${e.tag}`), t;
392
392
  }
393
- function Ao(e) {
393
+ function xo(e) {
394
394
  const t = ns(e), o = [
395
395
  t.length > 0 ? `Todoist API request failed (${t.join(", ")}).` : "Todoist API request failed."
396
396
  ];
@@ -400,7 +400,7 @@ function Ao(e) {
400
400
  function is(e) {
401
401
  return e instanceof Error ? L(e.message) : typeof e == "string" ? L(e) : "An unknown error occurred";
402
402
  }
403
- class De extends Error {
403
+ class Ae extends Error {
404
404
  constructor(t) {
405
405
  super(t), this.name = "DueStringParseError";
406
406
  }
@@ -411,7 +411,7 @@ class as extends Error {
411
411
  }
412
412
  }
413
413
  function N(e) {
414
- if (e instanceof De)
414
+ if (e instanceof Ae)
415
415
  return e.message;
416
416
  const t = nt(e);
417
417
  if (!t)
@@ -419,7 +419,7 @@ function N(e) {
419
419
  const o = ns(t), r = t.message && !(o.length > 0 && Ve(t.message)) ? t.message : "Todoist API request failed";
420
420
  return o.length > 0 ? `${r} (${o.join(", ")})` : r;
421
421
  }
422
- function xo(e, {
422
+ function Eo(e, {
423
423
  taskContent: t,
424
424
  dueString: o,
425
425
  deadlineDate: r
@@ -432,14 +432,14 @@ function xo(e, {
432
432
  const d = o.trim().replace(/^recurring(?:\s+|$)/i, "").trim();
433
433
  return d !== o.trim() && d ? `Task "${t}" wasn't created because \`dueString\` could not be parsed. Use Todoist recurrence syntax, for example \`${d}\`; don't prefix it with \`recurring\`. Change only \`dueString\` and retry.` : d !== o.trim() ? `Task "${t}" wasn't created because \`dueString\` could not be parsed. Use a complete Todoist recurrence expression; \`recurring\` alone is not valid. Change only \`dueString\` and retry.` : `Task "${t}" wasn't created because \`dueString\` could not be parsed. Change only \`dueString\` and retry.`;
434
434
  }
435
- function Eo(e) {
436
- if (e instanceof Zs || e instanceof De || e instanceof as)
435
+ function Oo(e) {
436
+ if (e instanceof eo || e instanceof Ae || e instanceof as)
437
437
  return e.message;
438
438
  const t = nt(e);
439
- return t ? Ao(t) : is(e);
439
+ return t ? xo(t) : is(e);
440
440
  }
441
- const Oo = "13.6.3", _o = {
442
- version: Oo
441
+ const _o = "13.6.4", Po = {
442
+ version: _o
443
443
  };
444
444
  function St(e, { queueTimeoutMs: t = ze.QUEUE_WAIT_MS } = {}) {
445
445
  if (!Number.isInteger(e) || e < 1)
@@ -489,36 +489,36 @@ function it() {
489
489
  writes: St(ze.WRITES)
490
490
  };
491
491
  }
492
- const Po = 1e4, Uo = 5 * 6e4, W = /* @__PURE__ */ new Map();
493
- let Ro = Po;
492
+ const Uo = 1e4, Ro = 5 * 6e4, W = /* @__PURE__ */ new Map();
493
+ let Lo = Uo;
494
494
  const cs = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new Map();
495
495
  let Ct, jt;
496
- function Lo() {
496
+ function No() {
497
497
  return Ct ??= it(), Ct;
498
498
  }
499
499
  function $t() {
500
500
  return jt ??= it(), jt;
501
501
  }
502
- function No(e) {
502
+ function Mo(e) {
503
503
  return Xt("sha256").update(e).digest("hex");
504
504
  }
505
- function Mo({ moves: e, writes: t }) {
505
+ function Fo({ moves: e, writes: t }) {
506
506
  return e.isIdle() && t.isIdle();
507
507
  }
508
508
  function ds(e) {
509
- return e.leases === 0 && Mo(e.limiters);
509
+ return e.leases === 0 && Fo(e.limiters);
510
510
  }
511
- function Fo(e, t, o) {
511
+ function Ho(e, t, o) {
512
512
  W.delete(e), t.lastUsedAt = o, W.set(e, t);
513
513
  }
514
- function Ho(e) {
514
+ function Wo(e) {
515
515
  for (const [t, o] of W) {
516
- if (e - o.lastUsedAt < Uo)
516
+ if (e - o.lastUsedAt < Ro)
517
517
  break;
518
518
  ds(o) && W.delete(t);
519
519
  }
520
520
  }
521
- function Wo() {
521
+ function Bo() {
522
522
  for (const [e, t] of W)
523
523
  if (ds(t))
524
524
  return W.delete(e), !0;
@@ -529,18 +529,18 @@ function ls(e, t) {
529
529
  return;
530
530
  const o = W.get(e);
531
531
  if (o)
532
- return Fo(e, o, t), o;
533
- if (Ho(t), W.size >= Ro && !Wo())
532
+ return Ho(e, o, t), o;
533
+ if (Wo(t), W.size >= Lo && !Bo())
534
534
  return;
535
535
  const r = { limiters: it(), lastUsedAt: t, leases: 0 };
536
536
  return W.set(e, r), r;
537
537
  }
538
- function Bo(e) {
538
+ function zo(e) {
539
539
  const t = Q.get(e);
540
540
  if (t !== void 0)
541
541
  return Q.set(e, t + 1), {
542
542
  limiters: $t(),
543
- release: () => Dt(e)
543
+ release: () => At(e)
544
544
  };
545
545
  const o = ls(e, Date.now());
546
546
  return o ? (o.leases++, {
@@ -550,10 +550,10 @@ function Bo(e) {
550
550
  }
551
551
  }) : (Q.set(e, 1), {
552
552
  limiters: $t(),
553
- release: () => Dt(e)
553
+ release: () => At(e)
554
554
  });
555
555
  }
556
- function Dt(e) {
556
+ function At(e) {
557
557
  const t = Q.get(e);
558
558
  if (t === void 0 || t <= 1) {
559
559
  Q.delete(e);
@@ -561,51 +561,51 @@ function Dt(e) {
561
561
  }
562
562
  Q.set(e, t - 1);
563
563
  }
564
- function zo(e, t) {
565
- const o = No(t);
564
+ function Ko(e, t) {
565
+ const o = Mo(t);
566
566
  cs.set(e, o);
567
567
  }
568
568
  function us(e, t) {
569
569
  const o = cs.get(e);
570
570
  return o ? (ls(o, Date.now()), async (r) => {
571
- const n = Bo(o);
571
+ const n = zo(o);
572
572
  try {
573
573
  return await n.limiters[t](r);
574
574
  } finally {
575
575
  n.release();
576
576
  }
577
- }) : Lo()[t];
577
+ }) : No()[t];
578
578
  }
579
- function Ko(e) {
579
+ function Yo(e) {
580
580
  return us(e, "moves");
581
581
  }
582
- function Yo(e) {
582
+ function Go(e) {
583
583
  return us(e, "writes");
584
584
  }
585
- const Go = "todoist-mcp", at = _o.version, ps = new eo(), At = to(import.meta.url);
585
+ const qo = "todoist-mcp", at = Po.version, ps = new to(), Dt = so(import.meta.url);
586
586
  let Ce;
587
- const qo = async () => {
588
- const e = At.resolve("@doist/todoist-sdk"), t = Fe(Qt(e), "transport", "http-dispatcher.js");
589
- return At(t);
587
+ const Vo = async () => {
588
+ const e = Dt.resolve("@doist/todoist-sdk"), t = Fe(Qt(e), "transport", "http-dispatcher.js");
589
+ return Dt(t);
590
590
  };
591
- let Vo = qo;
592
- function Jo() {
593
- return `${Go}/${at}`;
591
+ let Jo = Vo;
592
+ function Xo() {
593
+ return `${qo}/${at}`;
594
594
  }
595
595
  function hs(e) {
596
596
  return e.trim().toLowerCase();
597
597
  }
598
- function Xo(e, t) {
598
+ function Qo(e, t) {
599
599
  return ps.run(hs(e), t);
600
600
  }
601
- function Qo({
601
+ function Zo({
602
602
  label: e,
603
603
  platform: t = "mcp",
604
604
  sessionId: o = Me()
605
605
  } = {}) {
606
606
  const r = e ? hs(e) : ps.getStore();
607
607
  return {
608
- "User-Agent": Jo(),
608
+ "User-Agent": Xo(),
609
609
  "doist-platform": t,
610
610
  "doist-version": at,
611
611
  "request-id": Me(),
@@ -613,16 +613,16 @@ function Qo({
613
613
  "mcp-tool": r ?? "unknown"
614
614
  };
615
615
  }
616
- function Zo(e, t) {
616
+ function er(e, t) {
617
617
  const o = new Headers(e);
618
- for (const [r, n] of Object.entries(Qo(t)))
618
+ for (const [r, n] of Object.entries(Zo(t)))
619
619
  o.set(r, n);
620
620
  return Object.fromEntries(o.entries());
621
621
  }
622
622
  function xt() {
623
623
  return new DOMException("The operation was aborted due to timeout", "TimeoutError");
624
624
  }
625
- function er(e, t) {
625
+ function tr(e, t) {
626
626
  if (!e && t === void 0)
627
627
  return {
628
628
  signal: void 0,
@@ -660,22 +660,22 @@ function er(e, t) {
660
660
  }
661
661
  };
662
662
  }
663
- async function tr() {
664
- if (sr())
665
- return Ce || (Ce = Vo().then((e) => e.getDefaultTransport()).catch((e) => {
663
+ async function sr() {
664
+ if (or())
665
+ return Ce || (Ce = Jo().then((e) => e.getDefaultTransport()).catch((e) => {
666
666
  throw Ce = void 0, e;
667
667
  })), Ce;
668
668
  }
669
- function sr() {
669
+ function or() {
670
670
  return typeof process < "u" && !!process.versions?.node;
671
671
  }
672
- async function or(e, t) {
672
+ async function rr(e, t) {
673
673
  if ("dispatcher" in t)
674
674
  return e;
675
- const o = await tr();
675
+ const o = await sr();
676
676
  return o ? (t.dispatcher = o.dispatcher, o.fetch ?? e) : e;
677
677
  }
678
- function rr(e) {
678
+ function nr(e) {
679
679
  return {
680
680
  ok: e.ok,
681
681
  status: e.status,
@@ -686,34 +686,34 @@ function rr(e) {
686
686
  arrayBuffer: () => e.arrayBuffer()
687
687
  };
688
688
  }
689
- function nr(e = globalThis.fetch, t = {}) {
689
+ function ir(e = globalThis.fetch, t = {}) {
690
690
  const o = e === globalThis.fetch, { enabled: r = !0, platform: n = "mcp", sessionId: i = Me() } = t;
691
691
  return async (a, c = {}) => {
692
- const { timeout: d, headers: u, signal: l, ...p } = c, { signal: h, cleanup: m } = er(l, d);
692
+ const { timeout: d, headers: u, signal: l, ...p } = c, { signal: h, cleanup: m } = tr(l, d);
693
693
  try {
694
694
  const y = {
695
695
  ...p,
696
696
  signal: h,
697
- ...r ? { headers: Zo(u, { platform: n, sessionId: i }) } : u !== void 0 ? { headers: u } : {}
698
- }, T = await (o ? await or(e, y) : e)(a, y);
699
- return rr(T);
697
+ ...r ? { headers: er(u, { platform: n, sessionId: i }) } : u !== void 0 ? { headers: u } : {}
698
+ }, T = await (o ? await rr(e, y) : e)(a, y);
699
+ return nr(T);
700
700
  } finally {
701
701
  m();
702
702
  }
703
703
  };
704
704
  }
705
- function ir(e, {
705
+ function ar(e, {
706
706
  baseUrl: t,
707
707
  tracking: o
708
708
  } = {}) {
709
- const r = new so(e, {
710
- customFetch: nr(globalThis.fetch, o),
709
+ const r = new oo(e, {
710
+ customFetch: ir(globalThis.fetch, o),
711
711
  ...t ? { baseUrl: t } : {}
712
712
  });
713
- return zo(r, e), r;
713
+ return Ko(r, e), r;
714
714
  }
715
- const ar = 2, cr = 500, dr = 2e3, lr = 50, ur = /* @__PURE__ */ new Set([502, 503, 504]);
716
- function pr(e) {
715
+ const cr = 2, dr = 500, lr = 2e3, ur = 50, pr = /* @__PURE__ */ new Set([502, 503, 504]);
716
+ function hr(e) {
717
717
  if (e == null || typeof e != "object")
718
718
  return;
719
719
  const t = e;
@@ -729,32 +729,32 @@ function pr(e) {
729
729
  return Number(o[1]);
730
730
  }
731
731
  }
732
- function hr(e) {
733
- const t = pr(e);
734
- return t !== void 0 && ur.has(t);
732
+ function mr(e) {
733
+ const t = hr(e);
734
+ return t !== void 0 && pr.has(t);
735
735
  }
736
- function mr({
736
+ function fr({
737
737
  attempt: e,
738
738
  baseDelayMs: t,
739
739
  maxDelayMs: o,
740
740
  random: r = Math.random
741
741
  }) {
742
742
  const n = Math.min(t * 2 ** e, o), i = Math.round(r() * n);
743
- return Math.min(n, Math.max(lr, i));
743
+ return Math.min(n, Math.max(ur, i));
744
744
  }
745
- function fr(e) {
745
+ function br(e) {
746
746
  return new Promise((t) => setTimeout(t, e));
747
747
  }
748
748
  async function P(e, t = {}) {
749
- const o = t.maxRetries ?? ar, r = t.baseDelayMs ?? cr, n = t.maxDelayMs ?? dr, i = t.random;
749
+ const o = t.maxRetries ?? cr, r = t.baseDelayMs ?? dr, n = t.maxDelayMs ?? lr, i = t.random;
750
750
  let a;
751
751
  for (let c = 0; c <= o; c++)
752
752
  try {
753
753
  return await e();
754
754
  } catch (d) {
755
- if (a = d, c < o && hr(d)) {
756
- const u = mr({ attempt: c, baseDelayMs: r, maxDelayMs: n, random: i });
757
- await fr(u);
755
+ if (a = d, c < o && mr(d)) {
756
+ const u = fr({ attempt: c, baseDelayMs: r, maxDelayMs: n, random: i });
757
+ await br(u);
758
758
  continue;
759
759
  }
760
760
  throw d;
@@ -842,13 +842,13 @@ const g = {
842
842
  // OpenAI MCP tools
843
843
  SEARCH: "search",
844
844
  FETCH: "fetch"
845
- }, Al = {
845
+ }, Dl = {
846
846
  /**
847
847
  * Strips email addresses from tool outputs that expose user data.
848
848
  * Affects: find-project-collaborators, find-completed-tasks
849
849
  */
850
850
  STRIP_EMAILS: "strip_emails"
851
- }, br = process.env.USE_STRUCTURED_CONTENT === "true" || process.env.NODE_ENV === "test", Et = /* @__PURE__ */ new WeakMap();
851
+ }, gr = process.env.USE_STRUCTURED_CONTENT === "true" || process.env.NODE_ENV === "test", Et = /* @__PURE__ */ new WeakMap();
852
852
  function Ot(e, t) {
853
853
  const o = s.toJSONSchema(e, { target: "draft-2020-12", io: t }), r = e["~standard"];
854
854
  return {
@@ -861,7 +861,7 @@ function Ot(e, t) {
861
861
  }
862
862
  };
863
863
  }
864
- function gr(e) {
864
+ function yr(e) {
865
865
  const t = Et.get(e);
866
866
  if (t)
867
867
  return t;
@@ -871,48 +871,48 @@ function gr(e) {
871
871
  };
872
872
  return Et.set(e, o), o;
873
873
  }
874
- function yr({
874
+ function Tr({
875
875
  textContent: e,
876
876
  structuredContent: t,
877
877
  contentItems: o
878
878
  }) {
879
879
  const r = Xe(t), n = {}, i = [];
880
- return o && i.push(...o), !br && t && i.push({
880
+ return o && i.push(...o), !gr && t && i.push({
881
881
  type: "text",
882
882
  text: JSON.stringify(r)
883
883
  }), e && i.push({ type: "text", text: e }), i.length > 0 && (n.content = i), t && (n.structuredContent = r), n;
884
884
  }
885
- function Tr(e) {
885
+ function kr(e) {
886
886
  return {
887
887
  content: [{ type: "text", text: e }],
888
888
  isError: !0
889
889
  };
890
890
  }
891
- const kr = /* @__PURE__ */ new Set(["file"]);
892
- function wr(e) {
891
+ const wr = /* @__PURE__ */ new Set(["file"]);
892
+ function vr(e) {
893
893
  return !e || typeof e != "object" || Array.isArray(e) ? e : Object.fromEntries(
894
894
  Object.entries(e).map(
895
- ([t, o]) => kr.has(t) && o !== void 0 ? [t, "[redacted]"] : [t, o]
895
+ ([t, o]) => wr.has(t) && o !== void 0 ? [t, "[redacted]"] : [t, o]
896
896
  )
897
897
  );
898
898
  }
899
- function vr(e) {
899
+ function Ir(e) {
900
900
  return { ...{
901
- title: `Todoist: ${Ir(e.name)}`,
901
+ title: `Todoist: ${Sr(e.name)}`,
902
902
  openWorldHint: !1
903
903
  }, ...e.annotations };
904
904
  }
905
- function Ir(e) {
905
+ function Sr(e) {
906
906
  return e.split("-").filter(Boolean).map((t) => `${t.charAt(0).toUpperCase()}${t.slice(1)}`).join(" ");
907
907
  }
908
- function Sr(e) {
908
+ function Cr(e) {
909
909
  return e ? typeof e["ui/resourceUri"] == "string" ? !0 : typeof e.ui == "object" && e.ui !== null : !1;
910
910
  }
911
- function Cr(e) {
911
+ function jr(e) {
912
912
  const t = typeof e.ui == "object" && e.ui !== null ? e.ui : void 0, o = t?.resourceUri, r = e["ui/resourceUri"];
913
913
  return typeof o == "string" && typeof r != "string" ? { ...e, "ui/resourceUri": o } : typeof r == "string" && typeof o != "string" ? { ...e, ui: { ...t, resourceUri: r } } : e;
914
914
  }
915
- const jr = [
915
+ const $r = [
916
916
  g.FIND_PROJECT_COLLABORATORS,
917
917
  g.FIND_COMPLETED_TASKS
918
918
  ];
@@ -929,7 +929,7 @@ function Qe(e) {
929
929
  }
930
930
  return e;
931
931
  }
932
- function $r(e) {
932
+ function Ar(e) {
933
933
  const t = /\s*\([^)]*@[^)]+\)/g, o = /\S+@\S+\.\S+/g;
934
934
  return e.replace(t, "").replace(o, "[email hidden]");
935
935
  }
@@ -939,26 +939,26 @@ function Dr({
939
939
  client: o,
940
940
  features: r = []
941
941
  }) {
942
- const n = r.some((l) => l.name === "strip_emails") && jr.includes(e.name), i = e.execute, { input: a, output: c } = gr(e), d = async (l, p) => {
942
+ const n = r.some((l) => l.name === "strip_emails") && $r.includes(e.name), i = e.execute, { input: a, output: c } = yr(e), d = async (l, p) => {
943
943
  try {
944
- let { textContent: h, structuredContent: m, contentItems: y } = await Xo(
944
+ let { textContent: h, structuredContent: m, contentItems: y } = await Qo(
945
945
  e.name,
946
946
  () => P(() => i(l, o))
947
947
  );
948
- return n && (h && (h = $r(h)), m && (m = Qe(m))), yr({ textContent: h, structuredContent: m, contentItems: y });
948
+ return n && (h && (h = Ar(h)), m && (m = Qe(m))), Tr({ textContent: h, structuredContent: m, contentItems: y });
949
949
  } catch (h) {
950
- return console.error(`Error executing tool ${e.name}:`, { args: wr(l), error: h }), Tr(Eo(h));
950
+ return console.error(`Error executing tool ${e.name}:`, { args: vr(l), error: h }), kr(Oo(h));
951
951
  }
952
952
  }, u = {
953
953
  description: e.description,
954
954
  inputSchema: a,
955
955
  ...c ? { outputSchema: c } : {},
956
- annotations: vr(e),
957
- ...e._meta ? { _meta: Sr(e._meta) ? Cr(e._meta) : e._meta } : {}
956
+ annotations: Ir(e),
957
+ ...e._meta ? { _meta: Cr(e._meta) ? jr(e._meta) : e._meta } : {}
958
958
  };
959
959
  t.registerTool(e.name, u, d);
960
960
  }
961
- const Ar = s.object({
961
+ const xr = s.object({
962
962
  period: s.enum(["today", "7d", "14d", "30d", "this-week", "this-month"]).default("7d").describe(
963
963
  'Time period for the analysis. "today" analyzes the current day, "7d"/"14d"/"30d" analyze the last N days, "this-week" and "this-month" analyze the current week or month.'
964
964
  ),
@@ -967,7 +967,7 @@ const Ar = s.object({
967
967
  ),
968
968
  projectId: s.string().optional().describe("Optional project ID to scope the analysis to a specific project.")
969
969
  });
970
- function xr(e, t = /* @__PURE__ */ new Date()) {
970
+ function Er(e, t = /* @__PURE__ */ new Date()) {
971
971
  const o = (n) => n.toISOString().slice(0, 10), r = o(t);
972
972
  switch (e) {
973
973
  case "today":
@@ -1014,7 +1014,7 @@ function xr(e, t = /* @__PURE__ */ new Date()) {
1014
1014
  }
1015
1015
  }
1016
1016
  }
1017
- function Er(e) {
1017
+ function Or(e) {
1018
1018
  const t = {
1019
1019
  goals: `### Goal Tracking
1020
1020
  - Compare tasks completed today vs the daily goal
@@ -1045,8 +1045,8 @@ function Er(e) {
1045
1045
 
1046
1046
  `) : t[e] ?? "";
1047
1047
  }
1048
- function Or(e) {
1049
- const { since: t, until: o, periodDescription: r } = xr(e.period), n = e.projectId ? `
1048
+ function _r(e) {
1049
+ const { since: t, until: o, periodDescription: r } = Er(e.period), n = e.projectId ? `
1050
1050
  Scope this analysis to project ID: ${e.projectId}. Pass this projectId when calling find-completed-tasks and get-overview.` : "";
1051
1051
  return `Analyze my Todoist productivity for ${r} (${t} to ${o}).${n}
1052
1052
 
@@ -1067,7 +1067,7 @@ ${e.focus === "overall" || e.focus === "projects" ? `4. **get-overview** — Get
1067
1067
 
1068
1068
  Using the collected data, produce an analysis covering the following sections:
1069
1069
 
1070
- ${Er(e.focus)}
1070
+ ${Or(e.focus)}
1071
1071
 
1072
1072
  ### Step 3: Format
1073
1073
 
@@ -1077,14 +1077,14 @@ Present the analysis as a clear, well-structured markdown report with:
1077
1077
  - Specific numbers and comparisons (not vague statements)
1078
1078
  - Actionable takeaways highlighted clearly`;
1079
1079
  }
1080
- function _r(e) {
1080
+ function Pr(e) {
1081
1081
  return {
1082
1082
  messages: [
1083
1083
  {
1084
1084
  role: "user",
1085
1085
  content: {
1086
1086
  type: "text",
1087
- text: Or(e)
1087
+ text: _r(e)
1088
1088
  }
1089
1089
  }
1090
1090
  ]
@@ -1094,8 +1094,8 @@ const ye = {
1094
1094
  name: "productivity-analysis",
1095
1095
  title: "Productivity Analysis",
1096
1096
  description: "Analyze your Todoist productivity with insights on completion trends, goal streaks, project distribution, and actionable recommendations. Gathers data from multiple tools and synthesizes a comprehensive report.",
1097
- argsSchema: Ar,
1098
- callback: _r
1097
+ argsSchema: xr,
1098
+ callback: Pr
1099
1099
  }, ms = 'The duration of the task. Use format: "2h" (hours), "90m" (minutes), "2h30m" (combined), "1.5h" (decimal hours), or "3d" (whole days; days cannot be combined with hours or minutes). Todoist apps only display durations under 24 hours: a longer or day-based duration is stored and reported by this server, but the apps show the task as having no duration.', fs = 'Use format like "2h", "30m", "2h30m", "1.5h", or "3d"';
1100
1100
  class x extends Error {
1101
1101
  constructor(t, o) {
@@ -1110,19 +1110,19 @@ function bs(e) {
1110
1110
  throw new x(e, "Duration must be a non-empty string");
1111
1111
  const o = t.match(/^(\d+(?:\.\d+)?)d$/)?.[1];
1112
1112
  if (o !== void 0)
1113
- return { amount: Ur(e, o), unit: "day" };
1114
- if (Pr(t))
1113
+ return { amount: Rr(e, o), unit: "day" };
1114
+ if (Ur(t))
1115
1115
  throw new x(
1116
1116
  e,
1117
1117
  `${fs} (days cannot be combined with hours or minutes)`
1118
1118
  );
1119
- return { amount: Rr(e, t), unit: "minute" };
1119
+ return { amount: Lr(e, t), unit: "minute" };
1120
1120
  }
1121
- function Pr(e) {
1121
+ function Ur(e) {
1122
1122
  return /^(?:\d+(?:\.\d+)?[dhm])+$/.test(e) && /d/.test(e) && /[hm]/.test(e);
1123
1123
  }
1124
1124
  const Ze = "Duration is too large";
1125
- function Ur(e, t) {
1125
+ function Rr(e, t) {
1126
1126
  const o = Number.parseFloat(t);
1127
1127
  if (Number.isNaN(o) || o < 0)
1128
1128
  throw new x(e, "Days must be a positive number");
@@ -1134,7 +1134,7 @@ function Ur(e, t) {
1134
1134
  throw new x(e, "Duration must be at least 1 day");
1135
1135
  return o;
1136
1136
  }
1137
- function Rr(e, t) {
1137
+ function Lr(e, t) {
1138
1138
  const o = t.match(/^(?:(\d+(?:\.\d+)?)h)?(?:(\d+(?:\.\d+)?)m)?$/);
1139
1139
  if (!o || !o[1] && !o[2])
1140
1140
  throw new x(e, fs);
@@ -1165,21 +1165,21 @@ function Rr(e, t) {
1165
1165
  throw new x(e, "Duration must be greater than 0 minutes");
1166
1166
  return r;
1167
1167
  }
1168
- function Lr(e, t = "minute") {
1168
+ function Nr(e, t = "minute") {
1169
1169
  if (t === "day")
1170
1170
  return `${e}d`;
1171
1171
  if (e <= 0) return "0m";
1172
1172
  const o = Math.floor(e / 60), r = e % 60;
1173
1173
  return o === 0 ? `${r}m` : r === 0 ? `${o}h` : `${o}h${r}m`;
1174
1174
  }
1175
- const Nr = ["p1", "p2", "p3", "p4"], ct = 'Task priority as a string: "p1" (highest), "p2" (high), "p3" (medium), or "p4" (lowest/default). Integers like 1, 2, 3, or 4 are not accepted.', dt = s.enum(Nr).describe(ct);
1175
+ const Mr = ["p1", "p2", "p3", "p4"], ct = 'Task priority as a string: "p1" (highest), "p2" (high), "p3" (medium), or "p4" (lowest/default). Integers like 1, 2, 3, or 4 are not accepted.', dt = s.enum(Mr).describe(ct);
1176
1176
  function gs(e) {
1177
1177
  return { p1: 4, p2: 3, p3: 2, p4: 1 }[e];
1178
1178
  }
1179
- function Mr(e) {
1179
+ function Fr(e) {
1180
1180
  return { 4: "p1", 3: "p2", 2: "p3", 1: "p4" }[e];
1181
1181
  }
1182
- const ys = 300 * 1e3, Fr = 1e4, Hr = 1e3;
1182
+ const ys = 300 * 1e3, Hr = 1e4, Wr = 1e3;
1183
1183
  class Ts {
1184
1184
  constructor(t, o) {
1185
1185
  this.maxEntries = t, this.ttl = o, this.entries = /* @__PURE__ */ new Map();
@@ -1214,13 +1214,13 @@ class Ts {
1214
1214
  }
1215
1215
  }
1216
1216
  const Re = new Ts(
1217
- Fr,
1217
+ Hr,
1218
1218
  ys
1219
1219
  ), de = new Ts(
1220
- Hr,
1220
+ Wr,
1221
1221
  ys
1222
1222
  ), ks = "me";
1223
- class Wr {
1223
+ class Br {
1224
1224
  /**
1225
1225
  * Resolve a user name or ID to a user ID by looking up collaborators across all shared projects.
1226
1226
  * Supports exact name matches, partial matches, email matches, and the "me" keyword.
@@ -1355,11 +1355,11 @@ class Wr {
1355
1355
  Re.clear(), de.clear();
1356
1356
  }
1357
1357
  }
1358
- const H = new Wr();
1359
- async function Br(e, t) {
1358
+ const H = new Br();
1359
+ async function zr(e, t) {
1360
1360
  return H.resolveUser(e, t);
1361
1361
  }
1362
- async function zr(e, t) {
1362
+ async function Kr(e, t) {
1363
1363
  const o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), n = [], i = [];
1364
1364
  for (const a of t) {
1365
1365
  const c = a.trim().toLowerCase();
@@ -1384,7 +1384,7 @@ const ws = ["assigned", "unassignedOrMe", "all"];
1384
1384
  async function lt(e, t) {
1385
1385
  if (!t)
1386
1386
  return;
1387
- const o = await Br(e, t);
1387
+ const o = await zr(e, t);
1388
1388
  if (!o)
1389
1389
  throw new Error(
1390
1390
  `Could not find user: "${t}". Make sure the user is a collaborator on a shared project.`
@@ -1403,7 +1403,7 @@ function et({
1403
1403
  const n = !!(e && t) && e === o;
1404
1404
  return e && t && !n ? `assigned to: ${t}` : n || r === "unassignedOrMe" ? "!assigned to: others" : r === "assigned" ? "assigned to: others" : "";
1405
1405
  }
1406
- function Kr({
1406
+ function Yr({
1407
1407
  tasks: e,
1408
1408
  resolvedAssigneeId: t,
1409
1409
  currentUserId: o,
@@ -1454,14 +1454,14 @@ async function Is(e) {
1454
1454
  limit: j.PROJECTS_MAX
1455
1455
  });
1456
1456
  }
1457
- async function Yr(e) {
1457
+ async function Gr(e) {
1458
1458
  return z({
1459
1459
  apiMethod: e.getArchivedProjects.bind(e),
1460
1460
  args: {},
1461
1461
  limit: j.PROJECTS_MAX
1462
1462
  });
1463
1463
  }
1464
- function Gr(e) {
1464
+ function qr(e) {
1465
1465
  const t = (i) => i.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&"), o = /(?<!\\)(?:\\\\)*\*/.test(e), r = [...e];
1466
1466
  let n = "";
1467
1467
  for (let i = 0; i < r.length; i++) {
@@ -1470,21 +1470,21 @@ function Gr(e) {
1470
1470
  }
1471
1471
  return new RegExp(o ? `^${n}$` : n, "iu");
1472
1472
  }
1473
- async function qr(e, t) {
1473
+ async function Vr(e, t) {
1474
1474
  return z({
1475
1475
  apiMethod: e.searchLabels.bind(e),
1476
1476
  args: { query: ut(t) },
1477
1477
  limit: j.LABELS_MAX
1478
1478
  });
1479
1479
  }
1480
- async function Vr(e) {
1480
+ async function Jr(e) {
1481
1481
  return z({
1482
1482
  apiMethod: e.getSharedLabels.bind(e),
1483
1483
  args: {},
1484
1484
  limit: j.LABELS_MAX
1485
1485
  });
1486
1486
  }
1487
- async function Jr(e, t, o) {
1487
+ async function Xr(e, t, o) {
1488
1488
  const r = ut(t);
1489
1489
  return z({
1490
1490
  apiMethod: e.searchSections.bind(e),
@@ -1500,12 +1500,12 @@ function U(e) {
1500
1500
  dueDate: e.due?.date,
1501
1501
  recurring: e.due?.isRecurring && e.due.string ? e.due.string : !1,
1502
1502
  deadlineDate: e.deadline?.date,
1503
- priority: Mr(e.priority) ?? "p4",
1503
+ priority: Fr(e.priority) ?? "p4",
1504
1504
  projectId: e.projectId,
1505
1505
  sectionId: e.sectionId ?? void 0,
1506
1506
  parentId: e.parentId ?? void 0,
1507
1507
  labels: e.labels,
1508
- duration: e.duration ? Lr(e.duration.amount, e.duration.unit) : void 0,
1508
+ duration: e.duration ? Nr(e.duration.amount, e.duration.unit) : void 0,
1509
1509
  responsibleUid: e.responsibleUid ?? void 0,
1510
1510
  assignedByUid: e.assignedByUid ?? void 0,
1511
1511
  // Only emitted when true: a deleted task is the exception, and every list
@@ -1558,7 +1558,7 @@ function ve(e) {
1558
1558
  } : void 0
1559
1559
  };
1560
1560
  }
1561
- function Xr(e) {
1561
+ function Qr(e) {
1562
1562
  return {
1563
1563
  id: e.id ?? void 0,
1564
1564
  objectType: e.objectType,
@@ -1571,7 +1571,7 @@ function Xr(e) {
1571
1571
  extraData: e.extraData ?? void 0
1572
1572
  };
1573
1573
  }
1574
- const Qr = ae.object({
1574
+ const Zr = ae.object({
1575
1575
  httpStatusCode: ae.number(),
1576
1576
  responseData: ae.object({
1577
1577
  error: ae.string(),
@@ -1579,7 +1579,7 @@ const Qr = ae.object({
1579
1579
  errorTag: ae.string()
1580
1580
  })
1581
1581
  });
1582
- function Ae(e) {
1582
+ function De(e) {
1583
1583
  const t = e?.trim();
1584
1584
  return t && t !== "0" ? e : void 0;
1585
1585
  }
@@ -1593,7 +1593,7 @@ async function pt({
1593
1593
  const { results: n, nextCursor: i } = await e.getTasksByFilter({ query: t, cursor: r, limit: o });
1594
1594
  return { tasks: n.map(U), nextCursor: i };
1595
1595
  } catch (n) {
1596
- const i = Qr.safeParse(n);
1596
+ const i = Zr.safeParse(n);
1597
1597
  if (!i.success)
1598
1598
  throw n;
1599
1599
  const { responseData: a } = i.data;
@@ -1649,11 +1649,11 @@ function Ss(e) {
1649
1649
  return { timeBasedCount: t, locationCount: o };
1650
1650
  }
1651
1651
  const Cs = "none";
1652
- function Zr(e) {
1652
+ function en(e) {
1653
1653
  return e.length === 1 && e[0]?.trim().toLowerCase() === Cs;
1654
1654
  }
1655
- async function en(e, t, o) {
1656
- const r = await tn(e, t);
1655
+ async function tn(e, t, o) {
1656
+ const r = await sn(e, t);
1657
1657
  if (r)
1658
1658
  return Pt(
1659
1659
  [...r.uidsToNotify ?? [], r.postedUid],
@@ -1664,7 +1664,7 @@ async function en(e, t, o) {
1664
1664
  const n = await e.getTask(t.taskId);
1665
1665
  return Pt([n.responsibleUid, n.assignedByUid, n.addedByUid], o);
1666
1666
  }
1667
- async function tn(e, t) {
1667
+ async function sn(e, t) {
1668
1668
  let o, r = null;
1669
1669
  do {
1670
1670
  const n = await e.getComments({
@@ -1684,12 +1684,12 @@ function Pt(e, t) {
1684
1684
  return [...o];
1685
1685
  }
1686
1686
  const xe = We.map((e) => e.key);
1687
- function sn(e) {
1687
+ function on(e) {
1688
1688
  if (typeof e != "string") return;
1689
1689
  const t = e.toLowerCase();
1690
1690
  return (We.find((r) => r.key === t) ?? We.find((r) => r.displayName.toLowerCase() === t))?.key;
1691
1691
  }
1692
- const on = `Color for the entity. Accepts a color key (e.g. "berry_red") or display name (e.g. "Berry Red"). Valid colors: ${xe.join(", ")}. Unrecognized colors are omitted and charcoal will be used as the default.`, fe = s.preprocess(sn, s.enum(xe).optional()).describe(on);
1692
+ const rn = `Color for the entity. Accepts a color key (e.g. "berry_red") or display name (e.g. "Berry Red"). Valid colors: ${xe.join(", ")}. Unrecognized colors are omitted and charcoal will be used as the default.`, fe = s.preprocess(on, s.enum(xe).optional()).describe(rn);
1693
1693
  s.enum(xe);
1694
1694
  const be = s.enum(xe).optional().catch(void 0), K = s.object({
1695
1695
  id: s.string(),
@@ -1734,7 +1734,7 @@ const be = s.enum(xe).optional().catch(void 0), K = s.object({
1734
1734
  function q({ id: e, name: t, sectionOrder: o, description: r }) {
1735
1735
  return { id: e, name: t, sectionOrder: o, description: r ?? void 0 };
1736
1736
  }
1737
- const rn = s.object({
1737
+ const nn = s.object({
1738
1738
  resourceType: s.string().describe("file, url, image, etc."),
1739
1739
  fileName: s.string().optional(),
1740
1740
  fileSize: s.number().optional().describe("Bytes."),
@@ -1755,8 +1755,8 @@ const rn = s.object({
1755
1755
  postedAt: s.string().describe("ISO 8601."),
1756
1756
  postedUid: s.string().optional(),
1757
1757
  notifiedUserIds: s.array(s.string()).optional().describe("Users notified about this comment. Absent when nobody was notified."),
1758
- fileAttachment: rn.optional()
1759
- }), nn = s.object({
1758
+ fileAttachment: nn.optional()
1759
+ }), an = s.object({
1760
1760
  id: s.string().optional(),
1761
1761
  objectType: s.string().describe("task, project, etc."),
1762
1762
  objectId: s.string(),
@@ -1766,7 +1766,7 @@ const rn = s.object({
1766
1766
  parentItemId: s.string().optional(),
1767
1767
  initiatorId: s.string().optional().describe("User who initiated the event."),
1768
1768
  extraData: s.record(s.string(), s.unknown()).optional()
1769
- }), an = s.object({
1769
+ }), cn = s.object({
1770
1770
  id: s.string(),
1771
1771
  name: s.string(),
1772
1772
  email: s.string()
@@ -1776,7 +1776,7 @@ const rn = s.object({
1776
1776
  color: be,
1777
1777
  order: s.number().optional().catch(void 0).describe("Display order."),
1778
1778
  isFavorite: s.boolean()
1779
- }), cn = s.object({
1779
+ }), dn = s.object({
1780
1780
  isRecurring: s.boolean(),
1781
1781
  string: s.string().describe("Human-readable due string."),
1782
1782
  date: s.string().describe("ISO 8601."),
@@ -1785,9 +1785,9 @@ const rn = s.object({
1785
1785
  }), ht = s.object({
1786
1786
  id: s.string(),
1787
1787
  taskId: s.string(),
1788
- type: s.enum(oo),
1788
+ type: s.enum(ro),
1789
1789
  minuteOffset: s.number().optional().describe("Minutes before due. Relative reminders only."),
1790
- due: cn.optional().describe("Absolute, and sometimes relative, reminders."),
1790
+ due: dn.optional().describe("Absolute, and sometimes relative, reminders."),
1791
1791
  name: s.string().optional().describe("Location name. Location reminders only."),
1792
1792
  locLat: s.string().optional().describe("Location reminders only."),
1793
1793
  locLong: s.string().optional().describe("Location reminders only."),
@@ -1798,7 +1798,7 @@ const rn = s.object({
1798
1798
  item: s.string().describe("Usually the ID of the item that failed."),
1799
1799
  error: s.string(),
1800
1800
  code: s.string().optional()
1801
- }), dn = s.object({
1801
+ }), ln = s.object({
1802
1802
  taskId: s.string().optional().describe("The ID of the task to comment on."),
1803
1803
  projectId: s.string().optional().describe(
1804
1804
  'The ID of the project to comment on. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
@@ -1807,18 +1807,24 @@ const rn = s.object({
1807
1807
  notifyUsers: s.array(s.string().min(1)).min(1).max(j.NOTIFY_USERS_MAX).optional().describe(
1808
1808
  `Who to notify about this comment — a user ID, email, full name, or "me" for each person. Set this whenever the comment mentions someone; the text of an @mention notifies nobody on its own. Omit to notify whoever the Todoist apps would (the task's assignee, assigner and creator on a first comment, or the previous comment's participants on a reply). Pass ["${Cs}"] to notify nobody.`
1809
1809
  )
1810
- }), ln = {
1811
- comments: s.array(dn).min(1).describe("The array of comments to add.")
1812
- }, un = {
1810
+ }), un = {
1811
+ comments: s.array(ln).min(1).describe("The array of comments to add.")
1812
+ }, pn = {
1813
1813
  comments: s.array(Ie).describe("The created comments."),
1814
1814
  totalCount: s.number().describe("The total number of comments created."),
1815
1815
  addedCommentIds: s.array(s.string()).describe("The IDs of the added comments.")
1816
- }, pn = {
1816
+ }, hn = {
1817
1817
  name: g.ADD_COMMENTS,
1818
1818
  description: "Add multiple comments to tasks or projects, optionally notifying collaborators. Each comment must specify either taskId or projectId.",
1819
- parameters: ln,
1820
- outputSchema: un,
1821
- annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1819
+ parameters: un,
1820
+ outputSchema: pn,
1821
+ // Open world: a comment notifies other people.
1822
+ annotations: {
1823
+ readOnlyHint: !1,
1824
+ destructiveHint: !1,
1825
+ idempotentHint: !1,
1826
+ openWorldHint: !0
1827
+ },
1822
1828
  async execute(e, t) {
1823
1829
  const { comments: o } = e;
1824
1830
  for (const [p, h] of o.entries()) {
@@ -1840,7 +1846,7 @@ const rn = s.object({
1840
1846
  });
1841
1847
  return p.taskId ? { taskId: p.taskId } : { projectId: h };
1842
1848
  })
1843
- ), c = await hn({
1849
+ ), c = await mn({
1844
1850
  comments: o,
1845
1851
  targets: a,
1846
1852
  client: t,
@@ -1858,7 +1864,7 @@ const rn = s.object({
1858
1864
  })
1859
1865
  )).map(ve);
1860
1866
  return {
1861
- textContent: mn({ comments: u }),
1867
+ textContent: fn({ comments: u }),
1862
1868
  structuredContent: {
1863
1869
  comments: u,
1864
1870
  totalCount: u.length,
@@ -1867,7 +1873,7 @@ const rn = s.object({
1867
1873
  };
1868
1874
  }
1869
1875
  };
1870
- async function hn({
1876
+ async function mn({
1871
1877
  comments: e,
1872
1878
  targets: t,
1873
1879
  client: o,
@@ -1877,15 +1883,15 @@ async function hn({
1877
1883
  return await Promise.all(
1878
1884
  e.map(async ({ notifyUsers: i }, a) => {
1879
1885
  if (i)
1880
- return Zr(i) ? [] : (await zr(o, i)).map((p) => p.userId);
1886
+ return en(i) ? [] : (await Kr(o, i)).map((p) => p.userId);
1881
1887
  const c = t[a];
1882
1888
  if (!c || !r) return [];
1883
- const d = c.taskId ? `task:${c.taskId}` : `project:${c.projectId}`, u = n.get(d) ?? en(o, c, r.id);
1889
+ const d = c.taskId ? `task:${c.taskId}` : `project:${c.projectId}`, u = n.get(d) ?? tn(o, c, r.id);
1884
1890
  return n.set(d, u), await u;
1885
1891
  })
1886
1892
  );
1887
1893
  }
1888
- function mn({ comments: e }) {
1894
+ function fn({ comments: e }) {
1889
1895
  const t = e.filter((c) => c.taskId).length, o = e.filter((c) => c.projectId).length, r = [];
1890
1896
  if (t > 0) {
1891
1897
  const c = t > 1 ? "comments" : "comment";
@@ -1907,7 +1913,7 @@ function R(e) {
1907
1913
  function js(e) {
1908
1914
  return e.description || void 0;
1909
1915
  }
1910
- const fn = {
1916
+ const bn = {
1911
1917
  search: s.string().optional().describe(
1912
1918
  "Search for a filter by name (partial and case insensitive match). If omitted, all filters are returned."
1913
1919
  )
@@ -1921,14 +1927,14 @@ const fn = {
1921
1927
  color: be,
1922
1928
  isFavorite: s.boolean().describe("Whether the filter is marked as favorite."),
1923
1929
  itemOrder: s.number().describe("The display order of the filter.")
1924
- }), bn = {
1930
+ }), gn = {
1925
1931
  filters: s.array(mt).describe("The found filters."),
1926
1932
  totalCount: s.number().describe("The total number of filters returned.")
1927
- }, gn = {
1933
+ }, yn = {
1928
1934
  name: g.FIND_FILTERS,
1929
1935
  description: 'List all personal filters or search for filters by name. Filters are saved custom views that use query syntax to organize tasks (e.g. "today & p1", "#Work & overdue").',
1930
- parameters: fn,
1931
- outputSchema: bn,
1936
+ parameters: bn,
1937
+ outputSchema: gn,
1932
1938
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
1933
1939
  async execute(e, t) {
1934
1940
  let r = ((await t.sync({ resourceTypes: ["filters"], syncToken: "*" })).filters ?? []).filter((a) => !a.isDeleted);
@@ -1947,7 +1953,7 @@ const fn = {
1947
1953
  itemOrder: a.itemOrder
1948
1954
  }));
1949
1955
  return {
1950
- textContent: yn({ filters: n, search: e.search }),
1956
+ textContent: Tn({ filters: n, search: e.search }),
1951
1957
  structuredContent: {
1952
1958
  filters: n,
1953
1959
  totalCount: n.length
@@ -1955,7 +1961,7 @@ const fn = {
1955
1961
  };
1956
1962
  }
1957
1963
  };
1958
- function yn({
1964
+ function Tn({
1959
1965
  filters: e,
1960
1966
  search: t
1961
1967
  }) {
@@ -1976,7 +1982,7 @@ ${n.map((i) => `- ${i}`).join(`
1976
1982
  return r.join(`
1977
1983
  `);
1978
1984
  }
1979
- const Tn = s.object({
1985
+ const kn = s.object({
1980
1986
  name: s.string().min(1).describe("The name of the filter."),
1981
1987
  query: s.string().min(1).describe(
1982
1988
  'The filter query string. Examples: "today & p1", "#Work & overdue", "@email & today", "(p1 | p2) & !assigned". Operators: | (OR), & (AND), ! (NOT), () grouping, , (multiple queries).'
@@ -1984,16 +1990,16 @@ const Tn = s.object({
1984
1990
  description: R("A markdown description explaining what the filter is for."),
1985
1991
  color: fe,
1986
1992
  isFavorite: s.boolean().optional().describe("Whether to mark the filter as a favorite. Defaults to false.")
1987
- }), kn = {
1988
- filters: s.array(Tn).min(1).describe("The array of filters to add.")
1989
- }, wn = {
1993
+ }), wn = {
1994
+ filters: s.array(kn).min(1).describe("The array of filters to add.")
1995
+ }, vn = {
1990
1996
  filters: s.array(mt).describe("The created filters."),
1991
1997
  totalCount: s.number().describe("The total number of filters created.")
1992
- }, vn = {
1998
+ }, In = {
1993
1999
  name: g.ADD_FILTERS,
1994
2000
  description: "Add one or more new personal filters. Filters are saved custom views using query syntax to organize tasks.",
1995
- parameters: kn,
1996
- outputSchema: wn,
2001
+ parameters: wn,
2002
+ outputSchema: vn,
1997
2003
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1998
2004
  async execute({ filters: e }, t) {
1999
2005
  const o = Date.now(), r = e.map((p, h) => `tempFilterAdd${h}${o}`), n = e.map((p, h) => he(
@@ -2033,26 +2039,26 @@ ${u}`,
2033
2039
  }
2034
2040
  };
2035
2041
  }
2036
- }, In = s.object({
2042
+ }, Sn = s.object({
2037
2043
  name: s.string().min(1).max(128).describe("The name of the label."),
2038
2044
  color: fe,
2039
2045
  order: s.number().int().optional().describe("The position of the label in the label list."),
2040
2046
  isFavorite: s.boolean().optional().describe("Whether the label is a favorite. Defaults to false.")
2041
- }), Sn = {
2042
- labels: s.array(In).min(1).describe("The array of labels to add.")
2043
- }, Cn = {
2047
+ }), Cn = {
2048
+ labels: s.array(Sn).min(1).describe("The array of labels to add.")
2049
+ }, jn = {
2044
2050
  labels: s.array(ge).describe("The created labels."),
2045
2051
  totalCount: s.number().describe("The total number of labels created.")
2046
- }, jn = {
2052
+ }, $n = {
2047
2053
  name: g.ADD_LABELS,
2048
2054
  description: "Add one or more new personal labels.",
2049
- parameters: Sn,
2050
- outputSchema: Cn,
2055
+ parameters: Cn,
2056
+ outputSchema: jn,
2051
2057
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2052
2058
  async execute({ labels: e }, t) {
2053
2059
  const o = await Promise.all(e.map((n) => t.addLabel(n)));
2054
2060
  return {
2055
- textContent: $n({ labels: o }),
2061
+ textContent: An({ labels: o }),
2056
2062
  structuredContent: {
2057
2063
  labels: o.map((n) => ge.parse(n)),
2058
2064
  totalCount: o.length
@@ -2060,7 +2066,7 @@ ${u}`,
2060
2066
  };
2061
2067
  }
2062
2068
  };
2063
- function $n({ labels: e }) {
2069
+ function An({ labels: e }) {
2064
2070
  const t = e.length, o = e.map((r) => `• ${r.name} (id=${r.id})`).join(`
2065
2071
  `);
2066
2072
  return `Added ${t} label${t === 1 ? "" : "s"}:
@@ -2070,7 +2076,7 @@ const Dn = "[redacted]";
2070
2076
  function re(e, t, o, r = {}) {
2071
2077
  if (o.length === 0)
2072
2078
  return;
2073
- const n = o.slice(0, po.MAX_FAILURES_LOGGED);
2079
+ const n = o.slice(0, ho.MAX_FAILURES_LOGGED);
2074
2080
  console.error(`${e}: items failed`, {
2075
2081
  failed: o.length,
2076
2082
  of: t,
@@ -2121,20 +2127,20 @@ function gt(e, t) {
2121
2127
  Failed (${t.length}) - address or drop these items:
2122
2128
  ${n}${i}`;
2123
2129
  }
2124
- function An(e) {
2130
+ function xn(e) {
2125
2131
  const t = e.content || e.title || "Untitled", o = e.dueDate ? ` • due ${e.dueDate}` : "", r = e.priority ? ` • ${e.priority.toUpperCase()}` : "", n = e.projectName ? ` • ${e.projectName}` : "", i = e.id ? ` • id=${e.id}` : "";
2126
2132
  return ` ${t}${o}${r}${n}${i}`;
2127
2133
  }
2128
- function xn(e) {
2134
+ function En(e) {
2129
2135
  const t = ` (${e.color})`, o = e.isFavorite ? " • ⭐" : "", r = ` • id=${e.id}`;
2130
2136
  return ` ${e.name}${t}${o}${r}`;
2131
2137
  }
2132
- function En(e) {
2138
+ function On(e) {
2133
2139
  const t = e.inboxProject ? " • Inbox" : "", o = e.isFavorite ? " • ⭐" : "", r = e.isShared ? " • Shared" : "", n = e.isArchived ? " • Archived" : "", i = e.viewStyle && e.viewStyle !== "list" ? ` • ${e.viewStyle}` : "", a = ` • id=${e.id}`;
2134
2140
  return ` ${e.name}${t}${o}${r}${n}${i}${a}`;
2135
2141
  }
2136
2142
  function Ee(e, t = 5) {
2137
- const r = e.slice(0, t).map(An).join(`
2143
+ const r = e.slice(0, t).map(xn).join(`
2138
2144
  `);
2139
2145
  if (e.length > t) {
2140
2146
  const n = e.length - t;
@@ -2164,17 +2170,17 @@ function $s(e, t) {
2164
2170
  ${o.map((n) => `- ${n}`).join(`
2165
2171
  `)}`;
2166
2172
  }
2167
- const On = 300 * 1e3;
2168
- function _n(e) {
2173
+ const _n = 300 * 1e3;
2174
+ function Pn(e) {
2169
2175
  return /^\d+$/.test(e);
2170
2176
  }
2171
- class Pn {
2177
+ class Un {
2172
2178
  constructor() {
2173
2179
  this.stateByClient = /* @__PURE__ */ new WeakMap();
2174
2180
  }
2175
2181
  async getWorkspaces(t) {
2176
2182
  let o = this.stateByClient.get(t);
2177
- if (o || (o = { cache: null, inFlightWorkspaces: null }, this.stateByClient.set(t, o)), o.cache && Date.now() - o.cache.timestamp < On)
2183
+ if (o || (o = { cache: null, inFlightWorkspaces: null }, this.stateByClient.set(t, o)), o.cache && Date.now() - o.cache.timestamp < _n)
2178
2184
  return o.cache.workspaces;
2179
2185
  if (o.inFlightWorkspaces)
2180
2186
  return o.inFlightWorkspaces;
@@ -2201,7 +2207,7 @@ class Pn {
2201
2207
  const n = await this.getWorkspaces(t), i = n.find((l) => l.id === r);
2202
2208
  if (i)
2203
2209
  return { workspaceId: i.id, workspaceName: i.name };
2204
- if (_n(r))
2210
+ if (Pn(r))
2205
2211
  return { workspaceId: r, workspaceName: r };
2206
2212
  const a = r.toLowerCase(), c = n.find((l) => l.name.toLowerCase() === a);
2207
2213
  if (c)
@@ -2229,7 +2235,7 @@ ${l}` + (d.length > 5 ? `
2229
2235
  this.stateByClient = /* @__PURE__ */ new WeakMap();
2230
2236
  }
2231
2237
  }
2232
- const Ds = new Pn(), Un = s.object({
2238
+ const As = new Un(), Rn = s.object({
2233
2239
  name: s.string().min(1).describe("The name of the project."),
2234
2240
  parentId: s.string().optional().describe("The ID of the parent project. If provided, creates this as a sub-project."),
2235
2241
  isFavorite: s.boolean().optional().describe("Whether the project is a favorite. Defaults to false."),
@@ -2239,9 +2245,9 @@ const Ds = new Pn(), Un = s.object({
2239
2245
  workspace: s.string().trim().min(1).optional().describe(
2240
2246
  "The workspace to create the project in. Accepts a workspace name or workspace ID. If not provided, creates a personal project. Use list-workspaces to see available workspaces."
2241
2247
  )
2242
- }), Rn = {
2243
- projects: s.array(Un).min(1).describe("The array of projects to add.")
2244
- }, Ln = {
2248
+ }), Ln = {
2249
+ projects: s.array(Rn).min(1).describe("The array of projects to add.")
2250
+ }, Nn = {
2245
2251
  projects: s.array(se).describe("The created projects."),
2246
2252
  totalCount: s.number().describe("The total number of projects created."),
2247
2253
  failures: s.array(oe).describe(
@@ -2250,11 +2256,11 @@ const Ds = new Pn(), Un = s.object({
2250
2256
  totalRequested: s.number().describe("The total number of projects requested."),
2251
2257
  successCount: s.number().describe("The number of successfully created projects."),
2252
2258
  failureCount: s.number().describe("The number of failed project creations.")
2253
- }, Nn = {
2259
+ }, Mn = {
2254
2260
  name: g.ADD_PROJECTS,
2255
2261
  description: "Add one or more new projects.",
2256
- parameters: Rn,
2257
- outputSchema: Ln,
2262
+ parameters: Ln,
2263
+ outputSchema: Nn,
2258
2264
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2259
2265
  async execute({ projects: e }, t) {
2260
2266
  const o = /* @__PURE__ */ new Map(), r = (u) => {
@@ -2262,7 +2268,7 @@ const Ds = new Pn(), Un = s.object({
2262
2268
  return Promise.resolve(void 0);
2263
2269
  let l = o.get(u);
2264
2270
  return l || (l = P(
2265
- () => Ds.resolveWorkspace(t, u)
2271
+ () => As.resolveWorkspace(t, u)
2266
2272
  ).then(({ workspaceId: p }) => p), o.set(u, l)), l;
2267
2273
  }, n = await Promise.allSettled(
2268
2274
  e.map(async ({ workspace: u, ...l }) => {
@@ -2280,7 +2286,7 @@ const Ds = new Pn(), Un = s.object({
2280
2286
  });
2281
2287
  const c = i.map(te);
2282
2288
  return re(g.ADD_PROJECTS, e.length, a, { redactItems: !0 }), {
2283
- textContent: Mn({ projects: i, failures: a }),
2289
+ textContent: Fn({ projects: i, failures: a }),
2284
2290
  structuredContent: {
2285
2291
  projects: c,
2286
2292
  totalCount: c.length,
@@ -2292,7 +2298,7 @@ const Ds = new Pn(), Un = s.object({
2292
2298
  };
2293
2299
  }
2294
2300
  };
2295
- function Mn({
2301
+ function Fn({
2296
2302
  projects: e,
2297
2303
  failures: t
2298
2304
  }) {
@@ -2301,12 +2307,12 @@ function Mn({
2301
2307
  ${r}` : "Added 0 projects";
2302
2308
  return gt(n, t);
2303
2309
  }
2304
- const $e = 25, Oe = s.enum(ro), As = s.object({
2310
+ const $e = 25, Oe = s.enum(no), Ds = s.object({
2305
2311
  date: s.string().optional().describe("Due date in YYYY-MM-DD format."),
2306
2312
  string: s.string().optional().describe('Natural language due string, e.g. "tomorrow at 3pm".'),
2307
2313
  timezone: s.string().optional().describe('Timezone for the reminder, e.g. "America/New_York".'),
2308
2314
  lang: s.string().optional().describe('Language for parsing the due string, e.g. "en".')
2309
- }), xs = s.enum(Zt), _e = s.boolean().optional().describe("Whether this is an urgent reminder. Applies to relative and absolute reminders."), Fn = s.object({
2315
+ }), xs = s.enum(Zt), _e = s.boolean().optional().describe("Whether this is an urgent reminder. Applies to relative and absolute reminders."), Hn = s.object({
2310
2316
  type: s.literal("relative"),
2311
2317
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
2312
2318
  minuteOffset: s.number().int().min(0).describe(
@@ -2316,15 +2322,15 @@ const $e = 25, Oe = s.enum(ro), As = s.object({
2316
2322
  'Delivery method: "email" or "push" notification. Defaults to push.'
2317
2323
  ),
2318
2324
  isUrgent: _e
2319
- }), Hn = s.object({
2325
+ }), Wn = s.object({
2320
2326
  type: s.literal("absolute"),
2321
2327
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
2322
- due: As.describe("The specific date/time for the reminder."),
2328
+ due: Ds.describe("The specific date/time for the reminder."),
2323
2329
  service: Oe.optional().describe(
2324
2330
  'Delivery method: "email" or "push" notification. Defaults to push.'
2325
2331
  ),
2326
2332
  isUrgent: _e
2327
- }), Wn = s.object({
2333
+ }), Bn = s.object({
2328
2334
  type: s.literal("location"),
2329
2335
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
2330
2336
  name: s.string().min(1).describe('Name of the location, e.g. "Office", "Home".'),
@@ -2334,23 +2340,23 @@ const $e = 25, Oe = s.enum(ro), As = s.object({
2334
2340
  'When to trigger: "on_enter" (arriving) or "on_leave" (departing).'
2335
2341
  ),
2336
2342
  radius: s.number().int().optional().describe("Radius in meters for the geofence. Defaults to server default.")
2337
- }), Bn = s.discriminatedUnion("type", [
2338
- Fn,
2343
+ }), zn = s.discriminatedUnion("type", [
2339
2344
  Hn,
2340
- Wn
2341
- ]), zn = {
2342
- reminders: s.array(Bn).min(1).max($e).describe(
2345
+ Wn,
2346
+ Bn
2347
+ ]), Kn = {
2348
+ reminders: s.array(zn).min(1).max($e).describe(
2343
2349
  `Array of reminders to create (max ${$e}). Each reminder must specify a type: "relative" (minutes before due), "absolute" (specific date/time), or "location" (geofence trigger).`
2344
2350
  )
2345
- }, Kn = {
2351
+ }, Yn = {
2346
2352
  reminders: s.array(ht).describe("The created reminders."),
2347
2353
  totalCount: s.number().describe("Total number of reminders created."),
2348
2354
  addedReminderIds: s.array(s.string()).describe("IDs of the created reminders.")
2349
- }, Yn = {
2355
+ }, Gn = {
2350
2356
  name: g.ADD_REMINDERS,
2351
2357
  description: 'Add reminders to tasks. Supports three types: "relative" (minutes before due), "absolute" (specific date/time), or "location" (geofence-triggered). Each reminder must specify a taskId.',
2352
- parameters: zn,
2353
- outputSchema: Kn,
2358
+ parameters: Kn,
2359
+ outputSchema: Yn,
2354
2360
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2355
2361
  async execute(e, t) {
2356
2362
  const { reminders: o } = e, r = o.map(async (c) => {
@@ -2383,7 +2389,7 @@ const $e = 25, Oe = s.enum(ro), As = s.object({
2383
2389
  }
2384
2390
  }), i = (await Promise.all(r)).map(we);
2385
2391
  return {
2386
- textContent: Gn(i),
2392
+ textContent: qn(i),
2387
2393
  structuredContent: {
2388
2394
  reminders: i,
2389
2395
  totalCount: i.length,
@@ -2392,7 +2398,7 @@ const $e = 25, Oe = s.enum(ro), As = s.object({
2392
2398
  };
2393
2399
  }
2394
2400
  };
2395
- function Gn(e) {
2401
+ function qn(e) {
2396
2402
  const { timeBasedCount: t, locationCount: o } = Ss(e), r = [];
2397
2403
  if (t > 0) {
2398
2404
  const n = t > 1 ? "reminders" : "reminder";
@@ -2404,15 +2410,15 @@ function Gn(e) {
2404
2410
  }
2405
2411
  return r.length > 0 ? `Added ${r.join(" and ")}` : "No reminders added";
2406
2412
  }
2407
- const qn = s.object({
2413
+ const Vn = s.object({
2408
2414
  name: s.string().min(1).describe("The name of the section."),
2409
2415
  projectId: s.string().min(1).describe(
2410
2416
  'The ID of the project to add the section to. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
2411
2417
  ),
2412
2418
  description: s.string().optional().describe("The description of the section. Supports Markdown.")
2413
- }), Vn = {
2414
- sections: s.array(qn).min(1).describe("The array of sections to add.")
2415
- }, Jn = {
2419
+ }), Jn = {
2420
+ sections: s.array(Vn).min(1).describe("The array of sections to add.")
2421
+ }, Xn = {
2416
2422
  sections: s.array(G).describe("The created sections."),
2417
2423
  totalCount: s.number().describe("The total number of sections created."),
2418
2424
  failures: s.array(oe).describe(
@@ -2421,11 +2427,11 @@ const qn = s.object({
2421
2427
  totalRequested: s.number().describe("The total number of sections requested."),
2422
2428
  successCount: s.number().describe("The number of successfully created sections."),
2423
2429
  failureCount: s.number().describe("The number of failed section creations.")
2424
- }, Xn = {
2430
+ }, Qn = {
2425
2431
  name: g.ADD_SECTIONS,
2426
2432
  description: "Add one or more new sections to projects.",
2427
- parameters: Vn,
2428
- outputSchema: Jn,
2433
+ parameters: Jn,
2434
+ outputSchema: Xn,
2429
2435
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2430
2436
  async execute({ sections: e }, t) {
2431
2437
  const o = e.some((c) => B(c.projectId)) ? P(() => t.getUser()) : void 0, r = await Promise.allSettled(
@@ -2444,7 +2450,7 @@ const qn = s.object({
2444
2450
  error: N(c.reason)
2445
2451
  });
2446
2452
  }), re(g.ADD_SECTIONS, e.length, i, { redactItems: !0 }), {
2447
- textContent: Qn({ sections: n, failures: i }),
2453
+ textContent: Zn({ sections: n, failures: i }),
2448
2454
  structuredContent: {
2449
2455
  sections: n.map(q),
2450
2456
  totalCount: n.length,
@@ -2456,7 +2462,7 @@ const qn = s.object({
2456
2462
  };
2457
2463
  }
2458
2464
  };
2459
- function Qn({
2465
+ function Zn({
2460
2466
  sections: e,
2461
2467
  failures: t
2462
2468
  }) {
@@ -2474,7 +2480,7 @@ const le = {
2474
2480
  PROJECT_NOT_FOUND: "PROJECT_NOT_FOUND",
2475
2481
  TASK_NOT_FOUND: "TASK_NOT_FOUND"
2476
2482
  };
2477
- class Zn {
2483
+ class ei {
2478
2484
  /**
2479
2485
  * Validate a single assignment operation
2480
2486
  */
@@ -2683,7 +2689,7 @@ class Zn {
2683
2689
  };
2684
2690
  }
2685
2691
  }
2686
- const yt = new Zn(), Ut = os.TASKS_PER_OPERATION, ei = s.object({
2692
+ const yt = new ei(), Ut = os.TASKS_PER_OPERATION, ti = s.object({
2687
2693
  content: s.string().min(1).describe(
2688
2694
  'The task name/title. Should be concise and actionable (e.g., "Review PR #123", "Call dentist"). For longer content, use the description field instead. Supports Markdown.'
2689
2695
  ),
@@ -2712,24 +2718,30 @@ const yt = new Zn(), Ut = os.TASKS_PER_OPERATION, ei = s.object({
2712
2718
  "Whether this task should be uncompletable (organizational header). Tasks with isUncompletable: true appear as organizational headers and cannot be completed."
2713
2719
  )
2714
2720
  }), Rt = {
2715
- tasks: s.array(ei).min(1).max(Ut).describe(`The array of tasks to add (max ${Ut}).`)
2716
- }, ti = {
2721
+ tasks: s.array(ti).min(1).max(Ut).describe(`The array of tasks to add (max ${Ut}).`)
2722
+ }, si = {
2717
2723
  tasks: s.array(K).describe("The created tasks."),
2718
2724
  totalCount: s.number().describe("The total number of tasks created."),
2719
2725
  failures: s.array(oe).describe("Failed task creations with error details."),
2720
2726
  totalRequested: s.number().describe("The total number of tasks requested."),
2721
2727
  successCount: s.number().describe("The number of successfully created tasks."),
2722
2728
  failureCount: s.number().describe("The number of failed task creations.")
2723
- }, si = {
2729
+ }, oi = {
2724
2730
  name: g.ADD_TASKS,
2725
2731
  description: "Add one or more tasks to a project, section, or parent. Supports assignment to project collaborators.",
2726
2732
  parameters: Rt,
2727
- outputSchema: ti,
2728
- annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2733
+ outputSchema: si,
2734
+ // Open world: assigning a task notifies the new assignee.
2735
+ annotations: {
2736
+ readOnlyHint: !1,
2737
+ destructiveHint: !1,
2738
+ idempotentHint: !1,
2739
+ openWorldHint: !0
2740
+ },
2729
2741
  async execute(e, t) {
2730
2742
  const { tasks: o } = s.object(Rt).parse(e), r = /* @__PURE__ */ new Map();
2731
2743
  o.forEach((h, m) => {
2732
- const y = oi(h), f = r.get(y);
2744
+ const y = ri(h), f = r.get(y);
2733
2745
  f ? f.push({ task: h, index: m }) : r.set(y, [{ task: h, index: m }]);
2734
2746
  });
2735
2747
  const n = /* @__PURE__ */ new Map(), a = (await Promise.all(
@@ -2737,7 +2749,7 @@ const yt = new Zn(), Ut = os.TASKS_PER_OPERATION, ei = s.object({
2737
2749
  const m = [];
2738
2750
  for (const { task: y, index: f } of h)
2739
2751
  try {
2740
- const T = await ri(y, t, n);
2752
+ const T = await ni(y, t, n);
2741
2753
  m.push({ index: f, result: { status: "fulfilled", value: T } });
2742
2754
  } catch (T) {
2743
2755
  m.push({
@@ -2750,7 +2762,7 @@ const yt = new Zn(), Ut = os.TASKS_PER_OPERATION, ei = s.object({
2750
2762
  )).flat().sort((h, m) => h.index - m.index), c = [], d = [];
2751
2763
  let u = !1;
2752
2764
  for (const { index: h, result: m } of a)
2753
- m.status === "fulfilled" ? c.push(m.value) : (u ||= m.reason instanceof De, d.push({
2765
+ m.status === "fulfilled" ? c.push(m.value) : (u ||= m.reason instanceof Ae, d.push({
2754
2766
  item: o[h]?.content ?? `Task ${h + 1}`,
2755
2767
  // Keep API error signals (status/code/tag) — `error.message`
2756
2768
  // alone collapses e.g. a full-project rejection into a bare
@@ -2763,7 +2775,7 @@ const yt = new Zn(), Ut = os.TASKS_PER_OPERATION, ei = s.object({
2763
2775
  }
2764
2776
  const l = c.map(U);
2765
2777
  return re(g.ADD_TASKS, o.length, d, { redactItems: !0 }), {
2766
- textContent: ni({
2778
+ textContent: ii({
2767
2779
  tasks: l,
2768
2780
  failures: d,
2769
2781
  args: { tasks: o }
@@ -2779,10 +2791,10 @@ const yt = new Zn(), Ut = os.TASKS_PER_OPERATION, ei = s.object({
2779
2791
  };
2780
2792
  }
2781
2793
  };
2782
- function oi(e) {
2794
+ function ri(e) {
2783
2795
  return `${e.projectId ?? ""}|${e.sectionId ?? ""}|${e.parentId ?? ""}`;
2784
2796
  }
2785
- async function ri(e, t, o) {
2797
+ async function ni(e, t, o) {
2786
2798
  const {
2787
2799
  duration: r,
2788
2800
  projectId: n,
@@ -2850,9 +2862,9 @@ async function ri(e, t, o) {
2850
2862
  d
2851
2863
  );
2852
2864
  if (!T.isValid) {
2853
- const C = T.error?.message || "Assignment validation failed", A = T.error?.suggestions?.join(". ") || "";
2865
+ const C = T.error?.message || "Assignment validation failed", D = T.error?.suggestions?.join(". ") || "";
2854
2866
  throw new Error(
2855
- `Task "${e.content}": ${C}${A ? `. ${A}` : ""}`
2867
+ `Task "${e.content}": ${C}${D ? `. ${D}` : ""}`
2856
2868
  );
2857
2869
  }
2858
2870
  y.assigneeId = T.resolvedUser?.userId;
@@ -2860,15 +2872,15 @@ async function ri(e, t, o) {
2860
2872
  try {
2861
2873
  return await t.addTask(y);
2862
2874
  } catch (f) {
2863
- const T = xo(f, {
2875
+ const T = Eo(f, {
2864
2876
  taskContent: e.content,
2865
2877
  dueString: e.dueString,
2866
2878
  deadlineDate: e.deadlineDate
2867
2879
  });
2868
- throw T ? new De(T) : f;
2880
+ throw T ? new Ae(T) : f;
2869
2881
  }
2870
2882
  }
2871
- function ni({
2883
+ function ii({
2872
2884
  tasks: e,
2873
2885
  failures: t,
2874
2886
  args: o
@@ -2893,11 +2905,11 @@ function ni({
2893
2905
  showDetails: !0
2894
2906
  });
2895
2907
  }
2896
- const ii = {
2908
+ const ai = {
2897
2909
  projectId: s.string().min(1).describe(
2898
2910
  "The ID of the project to analyze. This triggers a new health analysis which may take some time to complete."
2899
2911
  )
2900
- }, ai = {
2912
+ }, ci = {
2901
2913
  projectId: s.string().describe("The project ID."),
2902
2914
  health: s.object({
2903
2915
  status: s.enum(ot).describe("The health status after triggering analysis."),
@@ -2905,11 +2917,11 @@ const ii = {
2905
2917
  updateInProgress: s.boolean().describe("Whether an analysis update is currently in progress.")
2906
2918
  }).describe("The health response returned after triggering analysis."),
2907
2919
  message: s.string().describe("A human-readable message about the analysis status.")
2908
- }, ci = {
2920
+ }, di = {
2909
2921
  name: g.ANALYZE_PROJECT_HEALTH,
2910
2922
  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.",
2911
- parameters: ii,
2912
- outputSchema: ai,
2923
+ parameters: ai,
2924
+ outputSchema: ci,
2913
2925
  annotations: {
2914
2926
  readOnlyHint: !1,
2915
2927
  destructiveHint: !1,
@@ -2932,19 +2944,19 @@ ${n}`,
2932
2944
  }
2933
2945
  };
2934
2946
  }
2935
- }, di = {
2936
- ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to complete.")
2937
2947
  }, li = {
2948
+ ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to complete.")
2949
+ }, ui = {
2938
2950
  completed: s.array(s.string()).describe("The IDs of successfully completed tasks."),
2939
2951
  failures: s.array(oe).describe("Failed task completions with error details."),
2940
2952
  totalRequested: s.number().describe("The total number of tasks requested to complete."),
2941
2953
  successCount: s.number().describe("The number of successfully completed tasks."),
2942
2954
  failureCount: s.number().describe("The number of failed task completions.")
2943
- }, ui = {
2955
+ }, pi = {
2944
2956
  name: g.COMPLETE_TASKS,
2945
2957
  description: "Complete one or more tasks by their IDs.",
2946
- parameters: di,
2947
- outputSchema: li,
2958
+ parameters: li,
2959
+ outputSchema: ui,
2948
2960
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
2949
2961
  async execute(e, t) {
2950
2962
  const o = [], r = [];
@@ -2958,7 +2970,7 @@ ${n}`,
2958
2970
  });
2959
2971
  }
2960
2972
  return re(g.COMPLETE_TASKS, e.ids.length, r), {
2961
- textContent: pi({
2973
+ textContent: hi({
2962
2974
  completed: o,
2963
2975
  failures: r,
2964
2976
  args: e
@@ -2973,7 +2985,7 @@ ${n}`,
2973
2985
  };
2974
2986
  }
2975
2987
  };
2976
- function pi({
2988
+ function hi({
2977
2989
  completed: e,
2978
2990
  failures: t,
2979
2991
  args: o
@@ -2995,20 +3007,20 @@ const Es = [
2995
3007
  "filter",
2996
3008
  "reminder",
2997
3009
  "location_reminder"
2998
- ], hi = {
3010
+ ], mi = {
2999
3011
  type: s.enum(Es).describe("The type of entity to delete."),
3000
3012
  id: s.string().min(1).describe("The ID of the entity to delete.")
3001
- }, mi = {
3013
+ }, fi = {
3002
3014
  deletedEntity: s.object({
3003
3015
  type: s.enum(Es).describe("The type of deleted entity."),
3004
3016
  id: s.string().describe("The ID of the deleted entity.")
3005
3017
  }).describe("Information about the deleted entity."),
3006
3018
  success: s.boolean().describe("Whether the deletion was successful.")
3007
- }, fi = {
3019
+ }, bi = {
3008
3020
  name: g.DELETE_OBJECT,
3009
3021
  description: "Delete a project, section, task, comment, label, filter, reminder, or location_reminder by its ID. Projects can be deleted whether active or archived (find archived ones via find-projects with archivedStatus); note a workspace project must be archived before it can be deleted, while personal projects can be deleted regardless.",
3010
- parameters: hi,
3011
- outputSchema: mi,
3022
+ parameters: mi,
3023
+ outputSchema: fi,
3012
3024
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !0 },
3013
3025
  async execute(e, t) {
3014
3026
  switch (e.type) {
@@ -3051,7 +3063,7 @@ const Es = [
3051
3063
  }
3052
3064
  };
3053
3065
  }
3054
- }, Lt = 5, Os = ["file", "url"], bi = {
3066
+ }, Lt = 5, Os = ["file", "url"], gi = {
3055
3067
  projectId: s.string().min(1).describe("The ID of the project to export as a template."),
3056
3068
  format: s.enum(Os).default("file").describe(
3057
3069
  'How to return the template. "file" returns the CSV content, which can be passed straight back to import-project-template. "url" returns a shareable download link instead, and is the better choice for large projects because it does not return the whole file.'
@@ -3059,18 +3071,24 @@ const Es = [
3059
3071
  useRelativeDates: s.boolean().optional().describe(
3060
3072
  'Export due dates relative to the import date (e.g. "day 3") instead of absolute dates. Defaults to false.'
3061
3073
  )
3062
- }, gi = {
3074
+ }, yi = {
3063
3075
  format: s.enum(Os).describe("The format the template was exported in."),
3064
3076
  content: s.string().optional().describe('The template as CSV content. Only present when format is "file".'),
3065
3077
  lineCount: s.number().optional().describe('Number of rows in the exported CSV. Only present when format is "file".'),
3066
3078
  fileName: s.string().optional().describe('The generated template file name. Only present when format is "url".'),
3067
3079
  fileUrl: s.string().optional().describe('The shareable download URL. Only present when format is "url".')
3068
- }, yi = {
3080
+ }, Ti = {
3069
3081
  name: g.EXPORT_PROJECT_TEMPLATE,
3070
- description: "Export an existing project as a Todoist template, either as CSV content or as a shareable URL. Use it to duplicate a project, share its structure, or hand the CSV to import-project-template. To read a project rather than export it, use find-tasks instead — it returns structured tasks rather than raw CSV. Nothing is modified.",
3071
- parameters: bi,
3072
- outputSchema: gi,
3073
- annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3082
+ description: 'Export an existing project as a Todoist template, either as CSV content or as a shareable URL. Use it to duplicate a project, share its structure, or hand the CSV to import-project-template. To read a project rather than export it, use find-tasks instead — it returns structured tasks rather than raw CSV. The project itself is not modified, but the "url" format uploads a copy and returns a link that anyone holding it can open.',
3083
+ parameters: gi,
3084
+ outputSchema: yi,
3085
+ // Not read-only and open world: the "url" format uploads the CSV and returns a public link.
3086
+ annotations: {
3087
+ readOnlyHint: !1,
3088
+ destructiveHint: !1,
3089
+ idempotentHint: !0,
3090
+ openWorldHint: !0
3091
+ },
3074
3092
  // `format` is defaulted here as well as in the schema: scripts/run-tool.ts calls
3075
3093
  // execute() with raw JSON, so schema defaults are not applied on that path.
3076
3094
  async execute({ projectId: e, format: t = "file", useRelativeDates: o }, r) {
@@ -3090,12 +3108,12 @@ ${c}`,
3090
3108
  return {
3091
3109
  // The full CSV already ships in structuredContent; a preview here keeps a large
3092
3110
  // project from being spelled out twice in the response.
3093
- textContent: Ti({ projectId: e, lines: i }),
3111
+ textContent: ki({ projectId: e, lines: i }),
3094
3112
  structuredContent: { format: t, content: n, lineCount: i.length }
3095
3113
  };
3096
3114
  }
3097
3115
  };
3098
- function Ti({ projectId: e, lines: t }) {
3116
+ function ki({ projectId: e, lines: t }) {
3099
3117
  const o = `Exported project (id=${e}) as a template file (${t.length} row${t.length === 1 ? "" : "s"}).`, r = t.slice(0, Lt).join(`
3100
3118
  `), n = t.length - Lt;
3101
3119
  return n > 0 ? `${o}
@@ -3105,7 +3123,7 @@ ${r}
3105
3123
 
3106
3124
  ${r}`;
3107
3125
  }
3108
- const ki = K.pick({
3126
+ const wi = K.pick({
3109
3127
  id: !0,
3110
3128
  content: !0,
3111
3129
  dueDate: !0,
@@ -3114,15 +3132,15 @@ const ki = K.pick({
3114
3132
  hasChildren: s.boolean().describe(
3115
3133
  "Whether this subtask has subtasks of its own. Fetch it with includeChildren to expand."
3116
3134
  )
3117
- }), wi = se.pick({ id: !0, name: !0 }).extend({
3135
+ }), vi = se.pick({ id: !0, name: !0 }).extend({
3118
3136
  hasChildren: s.boolean().describe(
3119
3137
  "Whether this sub-project has sub-projects of its own. Fetch it with includeChildren to expand."
3120
3138
  )
3121
- }), vi = {
3139
+ }), Ii = {
3122
3140
  childCount: s.number().optional().describe(
3123
3141
  "The number of direct children listed in children. Only present when children were requested and the type supports them. 0 means the object definitively has none."
3124
3142
  ),
3125
- children: s.array(s.union([ki, wi])).optional().describe(
3143
+ children: s.array(s.union([wi, vi])).optional().describe(
3126
3144
  "Direct children only: subtasks for a task, sub-projects for a project. Completed subtasks and archived sub-projects are excluded."
3127
3145
  ),
3128
3146
  hasMoreChildren: s.boolean().optional().describe(
@@ -3132,7 +3150,7 @@ const ki = K.pick({
3132
3150
  'Present when the children lookup failed or returned incomplete information. When no children are listed alongside it, childCount is unknown - do not read its absence as "no children".'
3133
3151
  )
3134
3152
  };
3135
- async function Ii(e, t) {
3153
+ async function Si(e, t) {
3136
3154
  const { results: o, nextCursor: r } = await e.getTasks({
3137
3155
  parentId: t,
3138
3156
  limit: j.CHILDREN_MAX
@@ -3155,7 +3173,7 @@ async function Ii(e, t) {
3155
3173
  childrenError: i ? `Could not check ${i} of ${o.length} subtasks for subtasks of their own; those are reported as hasChildren=false.` : void 0
3156
3174
  };
3157
3175
  }
3158
- async function Si(e, t) {
3176
+ async function Ci(e, t) {
3159
3177
  if (!Y(t))
3160
3178
  return { childCount: 0, children: [] };
3161
3179
  const o = await Is(e), r = /* @__PURE__ */ new Map();
@@ -3188,22 +3206,22 @@ function Mt(e, t) {
3188
3206
  const o = t.hasMoreChildren ? "+" : "", r = t.childrenError ? " (partial)" : "";
3189
3207
  return ` • ${e}=${t.childCount}${o}${r}`;
3190
3208
  }
3191
- const _s = ["task", "project", "comment", "section"], Ci = {
3209
+ const _s = ["task", "project", "comment", "section"], ji = {
3192
3210
  type: s.enum(_s).describe("The type of object to fetch."),
3193
3211
  id: s.string().min(1).describe("The unique ID of the object to fetch."),
3194
3212
  includeChildren: s.boolean().optional().describe(
3195
3213
  "Also return the direct children of the object: subtasks for a task, sub-projects for a project. Returns childCount plus a compact list, flagging each child that has children of its own. Use this to check whether a task hides subtasks instead of a speculative find-tasks lookup. Ignored for comments and sections."
3196
3214
  )
3197
- }, ji = {
3215
+ }, $i = {
3198
3216
  type: s.enum(_s).describe("The type of object fetched."),
3199
3217
  id: s.string().describe("The ID of the fetched object."),
3200
3218
  object: s.union([K, se, Ie, G]).describe("The fetched object data."),
3201
- ...vi
3202
- }, $i = {
3219
+ ...Ii
3220
+ }, Ai = {
3203
3221
  name: g.FETCH_OBJECT,
3204
3222
  description: "Fetch a single task, project, comment, or section by its ID. Use this when you have a specific object ID and want to retrieve its full details. Set includeChildren to also get its direct subtasks or sub-projects.",
3205
- parameters: Ci,
3206
- outputSchema: ji,
3223
+ parameters: ji,
3224
+ outputSchema: $i,
3207
3225
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3208
3226
  async execute(e, t) {
3209
3227
  const { type: o, id: r, includeChildren: n } = e;
@@ -3212,7 +3230,7 @@ const _s = ["task", "project", "comment", "section"], Ci = {
3212
3230
  case "task": {
3213
3231
  const [i, a] = await Promise.all([
3214
3232
  t.getTask(r),
3215
- n ? Nt(() => Ii(t, r)) : Promise.resolve({})
3233
+ n ? Nt(() => Si(t, r)) : Promise.resolve({})
3216
3234
  ]), c = U(i);
3217
3235
  return {
3218
3236
  textContent: `Found task: ${c.content} • id=${c.id} • priority=${c.priority} • project=${c.projectId}${Mt("subtasks", a)}`,
@@ -3225,7 +3243,7 @@ const _s = ["task", "project", "comment", "section"], Ci = {
3225
3243
  };
3226
3244
  }
3227
3245
  case "project": {
3228
- const i = await t.getProject(r), a = te(i), c = n ? await Nt(() => Si(t, i)) : {};
3246
+ const i = await t.getProject(r), a = te(i), c = n ? await Nt(() => Ci(t, i)) : {};
3229
3247
  return {
3230
3248
  textContent: `Found project: ${a.name} • id=${a.id} • color=${a.color} • viewStyle=${a.viewStyle}${Mt("subProjects", c)}`,
3231
3249
  structuredContent: {
@@ -3272,17 +3290,17 @@ const _s = ["task", "project", "comment", "section"], Ci = {
3272
3290
  id: s.string().min(1).describe(
3273
3291
  'A unique identifier for the document in the format "task:{id}" or "project:{id}".'
3274
3292
  )
3275
- }, Ai = {
3293
+ }, xi = {
3276
3294
  id: s.string().describe("The ID of the fetched document."),
3277
3295
  title: s.string().describe("The title of the document."),
3278
3296
  text: s.string().describe("The text content of the document."),
3279
3297
  url: s.string().describe("The URL of the document."),
3280
3298
  metadata: s.record(s.string(), s.unknown()).optional().describe("Additional metadata about the document.")
3281
- }, xi = {
3299
+ }, Ei = {
3282
3300
  name: g.FETCH,
3283
3301
  description: 'Fetch the full contents of a task or project by its ID. The ID should be in the format "task:{id}" or "project:{id}". (Comments may exist; use find-comments to retrieve them.)',
3284
3302
  parameters: Di,
3285
- outputSchema: Ai,
3303
+ outputSchema: xi,
3286
3304
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3287
3305
  async execute(e, t) {
3288
3306
  const { id: o } = e, [r, n] = o.split(":", 2);
@@ -3345,14 +3363,14 @@ Favorite: Yes`), i = {
3345
3363
  structuredContent: i
3346
3364
  };
3347
3365
  }
3348
- }, Ei = s.union([s.iso.date(), s.iso.datetime({ offset: !0 })]);
3366
+ }, Oi = s.union([s.iso.date(), s.iso.datetime({ offset: !0 })]);
3349
3367
  function Ft(e) {
3350
- return R(e).pipe(Ei.optional());
3368
+ return R(e).pipe(Oi.optional());
3351
3369
  }
3352
- const Oi = {
3353
- objectType: s.enum(io).optional().describe("Type of object to filter by."),
3370
+ const _i = {
3371
+ objectType: s.enum(ao).optional().describe("Type of object to filter by."),
3354
3372
  objectId: s.string().optional().describe("Filter by specific object ID (task, project, or comment)."),
3355
- eventType: s.enum(no).optional().describe("Type of event to filter by."),
3373
+ eventType: s.enum(io).optional().describe("Type of event to filter by."),
3356
3374
  projectId: s.string().optional().describe("Filter events by parent project ID."),
3357
3375
  taskId: s.string().optional().describe("Filter events by parent task ID (for subtask events)."),
3358
3376
  initiatorId: s.string().optional().describe(
@@ -3366,17 +3384,17 @@ const Oi = {
3366
3384
  ),
3367
3385
  limit: s.number().int().min(1).max(j.ACTIVITY_MAX).default(j.ACTIVITY_DEFAULT).describe("Maximum number of activity events to return."),
3368
3386
  cursor: s.string().optional().describe("Pagination cursor for retrieving the next page of results.")
3369
- }, _i = {
3370
- events: s.array(nn).describe("The activity events."),
3387
+ }, Pi = {
3388
+ events: s.array(an).describe("The activity events."),
3371
3389
  nextCursor: s.string().optional(),
3372
3390
  totalCount: s.number().describe("The total number of events in this page."),
3373
3391
  hasMore: s.boolean(),
3374
3392
  appliedFilters: s.record(s.string(), s.unknown())
3375
- }, Pi = {
3393
+ }, Ui = {
3376
3394
  name: g.FIND_ACTIVITY,
3377
3395
  description: `Retrieve activity logs to monitor and audit changes in Todoist. Shows events from all users by default (use initiatorId to filter by specific user). To answer what someone completed in a period, including recurring task occurrences, use objectType "task", eventType "completed", and dateFrom/dateTo. For a first-person question ("what did I get done"), also set initiatorId to the current user from user-info, or the answer includes collaborators' completions. Track task completions, updates, deletions, project changes, and more with flexible filtering. Activity history availability and retention depend on the user plan.`,
3378
- parameters: Oi,
3379
- outputSchema: _i,
3396
+ parameters: _i,
3397
+ outputSchema: Pi,
3380
3398
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3381
3399
  async execute(e, t) {
3382
3400
  const {
@@ -3395,9 +3413,9 @@ const Oi = {
3395
3413
  cursor: p ?? null
3396
3414
  };
3397
3415
  o && n ? h.objectEventTypes = `${o}:${n}` : o ? h.objectEventTypes = `${o}:` : n && (h.objectEventTypes = `:${n}`), r && r !== "remove" && (h.objectId = r), i && (h.parentProjectId = i), a && (h.parentItemId = a), c && (h.initiatorId = c), d && (h.dateFrom = d), u && (h.dateTo = u);
3398
- const { results: m, nextCursor: y } = await t.getActivityLogs(h), f = m.map(Xr);
3416
+ const { results: m, nextCursor: y } = await t.getActivityLogs(h), f = m.map(Qr);
3399
3417
  return {
3400
- textContent: Ui({ events: f, args: e, nextCursor: y }),
3418
+ textContent: Ri({ events: f, args: e, nextCursor: y }),
3401
3419
  structuredContent: {
3402
3420
  events: f,
3403
3421
  nextCursor: y ?? void 0,
@@ -3408,7 +3426,7 @@ const Oi = {
3408
3426
  };
3409
3427
  }
3410
3428
  };
3411
- function Ui({
3429
+ function Ri({
3412
3430
  events: e,
3413
3431
  args: t,
3414
3432
  nextCursor: o
@@ -3429,12 +3447,12 @@ function Ui({
3429
3447
  limit: t.limit,
3430
3448
  nextCursor: o ?? void 0,
3431
3449
  filterHints: i,
3432
- previewLines: Ri(e, Math.min(e.length, t.limit)),
3450
+ previewLines: Li(e, Math.min(e.length, t.limit)),
3433
3451
  zeroReasonHints: a
3434
3452
  });
3435
3453
  }
3436
- function Ri(e, t = 10) {
3437
- const r = e.slice(0, t).map(Li).join(`
3454
+ function Li(e, t = 10) {
3455
+ const r = e.slice(0, t).map(Ni).join(`
3438
3456
  `);
3439
3457
  if (e.length > t) {
3440
3458
  const n = e.length - t;
@@ -3443,8 +3461,8 @@ function Ri(e, t = 10) {
3443
3461
  }
3444
3462
  return r;
3445
3463
  }
3446
- function Li(e) {
3447
- const t = Ni(e.eventDate), o = `${e.eventType} ${e.objectType}`;
3464
+ function Ni(e) {
3465
+ const t = Mi(e.eventDate), o = `${e.eventType} ${e.objectType}`;
3448
3466
  let r = "";
3449
3467
  if (e.extraData) {
3450
3468
  const c = e.extraData.content || e.extraData.name || e.extraData.last_content;
@@ -3453,7 +3471,7 @@ function Li(e) {
3453
3471
  const n = e.objectId ? ` • id=${e.objectId}` : "", i = e.initiatorId ? ` • by=${e.initiatorId}` : " • system", a = e.parentProjectId ? ` • project=${e.parentProjectId}` : "";
3454
3472
  return ` [${t}] ${o}${r}${n}${i}${a}`;
3455
3473
  }
3456
- function Ni(e) {
3474
+ function Mi(e) {
3457
3475
  try {
3458
3476
  const t = new Date(e), o = t.toLocaleDateString("en-US", { month: "short", timeZone: "UTC" }), r = t.toLocaleDateString("en-US", { day: "numeric", timeZone: "UTC" }), n = t.toLocaleTimeString("en-US", {
3459
3477
  hour: "2-digit",
@@ -3466,7 +3484,7 @@ function Ni(e) {
3466
3484
  return e;
3467
3485
  }
3468
3486
  }
3469
- const Mi = {
3487
+ const Fi = {
3470
3488
  taskId: s.string().optional().describe("Find comments for a specific task."),
3471
3489
  projectId: s.string().optional().describe(
3472
3490
  'Find comments for a specific project. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
@@ -3474,7 +3492,7 @@ const Mi = {
3474
3492
  commentId: s.string().optional().describe("Get a specific comment by ID."),
3475
3493
  cursor: s.string().optional().describe("Pagination cursor for retrieving more results."),
3476
3494
  limit: s.number().int().min(1).max(j.COMMENTS_MAX).optional().describe("Maximum number of comments to return")
3477
- }, Fi = {
3495
+ }, Hi = {
3478
3496
  comments: s.array(Ie).describe("The found comments."),
3479
3497
  searchType: s.string().describe(
3480
3498
  'The type of search performed: "single" (comment ID), "task" (task ID), or "project" (project ID).'
@@ -3483,14 +3501,14 @@ const Mi = {
3483
3501
  hasMore: s.boolean(),
3484
3502
  nextCursor: s.string().optional(),
3485
3503
  totalCount: s.number().describe("The total number of comments in this page.")
3486
- }, Hi = {
3504
+ }, Wi = {
3487
3505
  name: g.FIND_COMMENTS,
3488
3506
  description: "Find comments by task, project, or get a specific comment by ID. Exactly one of taskId, projectId, or commentId must be provided.",
3489
- parameters: Mi,
3490
- outputSchema: Fi,
3507
+ parameters: Fi,
3508
+ outputSchema: Hi,
3491
3509
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3492
3510
  async execute(e, t) {
3493
- const o = Ae(e.cursor), r = [e.taskId, e.projectId, e.commentId].filter(Boolean);
3511
+ const o = De(e.cursor), r = [e.taskId, e.projectId, e.commentId].filter(Boolean);
3494
3512
  if (r.length === 0)
3495
3513
  throw new Error("Must provide exactly one of: taskId, projectId, or commentId.");
3496
3514
  if (r.length > 1)
@@ -3522,7 +3540,7 @@ const Mi = {
3522
3540
  throw new Error("Invalid state: no search parameter provided");
3523
3541
  const d = c.map(ve);
3524
3542
  return {
3525
- textContent: Wi({
3543
+ textContent: Bi({
3526
3544
  comments: d,
3527
3545
  searchType: e.commentId ? "single" : e.taskId ? "task" : "project",
3528
3546
  searchId: e.commentId || e.taskId || e.projectId || "",
@@ -3540,7 +3558,7 @@ const Mi = {
3540
3558
  };
3541
3559
  }
3542
3560
  };
3543
- function Wi({
3561
+ function Bi({
3544
3562
  comments: e,
3545
3563
  searchType: t,
3546
3564
  searchId: o,
@@ -3570,14 +3588,14 @@ function Ps(e) {
3570
3588
  const t = e.getUTCFullYear(), o = String(e.getUTCMonth() + 1).padStart(2, "0"), r = String(e.getUTCDate()).padStart(2, "0");
3571
3589
  return `${t}-${o}-${r}`;
3572
3590
  }
3573
- function Bi(e) {
3591
+ function zi(e) {
3574
3592
  const t = /^([+-])(\d{2}):(\d{2})$/.exec(e);
3575
3593
  if (!t)
3576
3594
  return 0;
3577
3595
  const [, o, r, n] = t, i = Number(r) * 60 + Number(n);
3578
3596
  return o === "-" ? -i : i;
3579
3597
  }
3580
- function zi(e, t) {
3598
+ function Ki(e, t) {
3581
3599
  const o = new Date(e.getTime() + t * 60 * 1e3);
3582
3600
  return Ps(o);
3583
3601
  }
@@ -3588,9 +3606,9 @@ function Ht(e, t) {
3588
3606
  const d = new Date(Date.UTC(i, a - 1, c));
3589
3607
  return d.setUTCDate(d.getUTCDate() + t), Ps(d);
3590
3608
  }
3591
- const Ki = ["and", "or"], Tt = {
3609
+ const Yi = ["and", "or"], Tt = {
3592
3610
  labels: s.string().array().optional().describe("The labels to filter the tasks by"),
3593
- labelsOperator: s.enum(Ki).optional().describe(
3611
+ labelsOperator: s.enum(Yi).optional().describe(
3594
3612
  'The operator to use when filtering by labels. This will dictate whether a task has all labels, or some of them. Default is "or".'
3595
3613
  )
3596
3614
  };
@@ -3599,20 +3617,20 @@ function kt(e = [], t = "or") {
3599
3617
  const o = t === "and" ? " & " : " | ";
3600
3618
  return `(${e.map((i) => i.startsWith("@") ? i : `@${i}`).join(` ${o} `)})`;
3601
3619
  }
3602
- const Yi = 7;
3603
- function Gi({
3620
+ const Gi = 7;
3621
+ function qi({
3604
3622
  since: e,
3605
3623
  until: t,
3606
3624
  userGmtOffset: o,
3607
3625
  now: r = /* @__PURE__ */ new Date()
3608
3626
  }) {
3609
- const n = Bi(o), i = zi(r, n), a = Yi - 1, c = t ?? (e ? Ht(e, a) : i);
3627
+ const n = zi(o), i = Ki(r, n), a = Gi - 1, c = t ?? (e ? Ht(e, a) : i);
3610
3628
  return {
3611
3629
  since: e ?? Ht(c, -a),
3612
3630
  until: c
3613
3631
  };
3614
3632
  }
3615
- const qi = {
3633
+ const Vi = {
3616
3634
  getBy: s.enum(["completion", "due"]).default("completion").describe(
3617
3635
  'The method to use to get the tasks: "completion" to get tasks by completion date (ie, when the task was actually completed), "due" to get tasks by due date (ie, when the task was due to be completed by).'
3618
3636
  ),
@@ -3636,17 +3654,17 @@ const qi = {
3636
3654
  "The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters)."
3637
3655
  ),
3638
3656
  ...Tt
3639
- }, Vi = {
3657
+ }, Ji = {
3640
3658
  tasks: s.array(K).describe("The found completed tasks."),
3641
3659
  nextCursor: s.string().optional(),
3642
3660
  totalCount: s.number().describe("The total number of tasks in this page."),
3643
3661
  hasMore: s.boolean(),
3644
3662
  appliedFilters: s.record(s.string(), s.unknown())
3645
- }, Ji = {
3663
+ }, Xi = {
3646
3664
  name: g.FIND_COMPLETED_TASKS,
3647
3665
  description: 'Get completed tasks in a date range. For "what did I complete/get done" questions, use find-activity instead — it reports completion events, including every occurrence of a recurring task, which this tool does not. since/until are optional and default to a 7-day window when omitted. Includes all collaborators by default. Person-specific queries (summaries, plans, reports) require responsibleUser.',
3648
- parameters: qi,
3649
- outputSchema: Vi,
3666
+ parameters: Vi,
3667
+ outputSchema: Ji,
3650
3668
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3651
3669
  async execute(e, t) {
3652
3670
  const {
@@ -3659,7 +3677,7 @@ const qi = {
3659
3677
  projectId: d,
3660
3678
  cursor: u,
3661
3679
  ...l
3662
- } = e, p = Ae(u);
3680
+ } = e, p = De(u);
3663
3681
  if (p && (!i || !a))
3664
3682
  throw new Error(
3665
3683
  "Cursor pagination requires explicit since and until. Reuse structuredContent.appliedFilters.since and structuredContent.appliedFilters.until from the previous page."
@@ -3667,10 +3685,10 @@ const qi = {
3667
3685
  const h = await lt(t, c), m = h?.email;
3668
3686
  let f = kt(r, n);
3669
3687
  h && m && (f = me(f, `assigned to: ${m}`));
3670
- const T = await t.getUser(), C = T.tzInfo?.gmtString || "+00:00", A = await ee({
3688
+ const T = await t.getUser(), C = T.tzInfo?.gmtString || "+00:00", D = await ee({
3671
3689
  projectId: d,
3672
3690
  user: T
3673
- }), k = Gi({
3691
+ }), k = qi({
3674
3692
  since: i,
3675
3693
  until: a,
3676
3694
  userGmtOffset: C
@@ -3678,23 +3696,23 @@ const qi = {
3678
3696
  ...e,
3679
3697
  since: k.since,
3680
3698
  until: k.until
3681
- }, { items: D, nextCursor: E } = o === "completion" ? await t.getCompletedTasksByCompletionDate({
3699
+ }, { items: A, nextCursor: E } = o === "completion" ? await t.getCompletedTasksByCompletionDate({
3682
3700
  ...l,
3683
3701
  ...p ? { cursor: p } : {},
3684
- projectId: A,
3702
+ projectId: D,
3685
3703
  since: w,
3686
3704
  until: b,
3687
3705
  ...f ? { filterQuery: f, filterLang: "en" } : {}
3688
3706
  }) : await t.getCompletedTasksByDueDate({
3689
3707
  ...l,
3690
3708
  ...p ? { cursor: p } : {},
3691
- projectId: A,
3709
+ projectId: D,
3692
3710
  since: w,
3693
3711
  until: b,
3694
3712
  ...f ? { filterQuery: f, filterLang: "en" } : {}
3695
- }), O = D.map(U);
3713
+ }), O = A.map(U);
3696
3714
  return {
3697
- textContent: Xi({
3715
+ textContent: Qi({
3698
3716
  tasks: O,
3699
3717
  args: S,
3700
3718
  nextCursor: E,
@@ -3710,7 +3728,7 @@ const qi = {
3710
3728
  };
3711
3729
  }
3712
3730
  };
3713
- function Xi({
3731
+ function Qi({
3714
3732
  tasks: e,
3715
3733
  args: t,
3716
3734
  nextCursor: o,
@@ -3736,7 +3754,7 @@ function Xi({
3736
3754
  zeroReasonHints: c
3737
3755
  });
3738
3756
  }
3739
- const Qi = {
3757
+ const Zi = {
3740
3758
  searchText: s.string().optional().describe(
3741
3759
  'Search for a label by name (partial and case insensitive match). Supports wildcards (e.g. "work*" for prefix match). Use "\\*" for a literal asterisk. If omitted, all labels are returned.'
3742
3760
  ),
@@ -3744,7 +3762,7 @@ const Qi = {
3744
3762
  cursor: s.string().optional().describe(
3745
3763
  "The cursor to get the next page of labels (cursor is obtained from the previous call to this tool, with the same parameters). Ignored when searchText is provided."
3746
3764
  )
3747
- }, Zi = {
3765
+ }, ea = {
3748
3766
  labels: s.array(ge).describe("The found personal labels."),
3749
3767
  nextCursor: s.string().optional(),
3750
3768
  totalCount: s.number().describe("The total number of labels in this page."),
@@ -3753,22 +3771,22 @@ const Qi = {
3753
3771
  "Names of all shared labels visible to you. These have no IDs or metadata — use their names directly when filtering tasks."
3754
3772
  ),
3755
3773
  appliedFilters: s.record(s.string(), s.unknown())
3756
- }, ea = {
3774
+ }, ta = {
3757
3775
  name: g.FIND_LABELS,
3758
3776
  description: "List personal labels and shared labels. Personal labels have full metadata (id, name, color, order, isFavorite) and support pagination and name search (partial, case insensitive). Shared labels are labels used on tasks shared with you — they are returned as names only (no IDs or metadata). When searching, all matching personal labels are fetched across all pages and returned as a single result set (limit and cursor are ignored). When not searching, personal labels are returned with pagination.",
3759
- parameters: Qi,
3760
- outputSchema: Zi,
3777
+ parameters: Zi,
3778
+ outputSchema: ea,
3761
3779
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3762
3780
  async execute(e, t) {
3763
3781
  const [o, r] = await Promise.all([
3764
- e.searchText ? qr(t, e.searchText).then((c) => ({
3782
+ e.searchText ? Vr(t, e.searchText).then((c) => ({
3765
3783
  results: c,
3766
3784
  nextCursor: null
3767
3785
  })) : t.getLabels({ limit: e.limit, cursor: e.cursor ?? null }),
3768
- Vr(t)
3786
+ Jr(t)
3769
3787
  ]), { results: n, nextCursor: i } = o, a = e.searchText ? { searchText: e.searchText } : { limit: e.limit, cursor: e.cursor };
3770
3788
  return {
3771
- textContent: ta({ labels: n, args: e, nextCursor: i, sharedLabels: r }),
3789
+ textContent: sa({ labels: n, args: e, nextCursor: i, sharedLabels: r }),
3772
3790
  structuredContent: {
3773
3791
  labels: n.map((c) => ge.parse(c)),
3774
3792
  nextCursor: i ?? void 0,
@@ -3780,7 +3798,7 @@ const Qi = {
3780
3798
  };
3781
3799
  }
3782
3800
  };
3783
- function ta({
3801
+ function sa({
3784
3802
  labels: e,
3785
3803
  args: t,
3786
3804
  nextCursor: o,
@@ -3788,7 +3806,7 @@ function ta({
3788
3806
  }) {
3789
3807
  const n = t.searchText ? `All labels matching "${t.searchText}"` : "Labels", i = [];
3790
3808
  t.searchText && i.push(`searchText: "${t.searchText}"`);
3791
- const a = 10, d = e.slice(0, a).map(xn).join(`
3809
+ const a = 10, d = e.slice(0, a).map(En).join(`
3792
3810
  `), u = e.length - a, l = u > 0 ? `${d}
3793
3811
  …and ${u} more` : d, p = [];
3794
3812
  e.length === 0 && (t.searchText ? (p.push("Try broader search terms"), p.push("Check spelling"), p.push("Remove searchText to see all labels")) : p.push("No personal labels created yet"));
@@ -3805,15 +3823,15 @@ No shared labels.`;
3805
3823
  zeroReasonHints: p
3806
3824
  }) + h;
3807
3825
  }
3808
- const { FIND_PROJECTS: Us, ADD_TASKS: Rs, UPDATE_TASKS: Ls } = g, sa = {
3826
+ const { FIND_PROJECTS: Us, ADD_TASKS: Rs, UPDATE_TASKS: Ls } = g, oa = {
3809
3827
  projectId: s.string().min(1).optional().describe(
3810
3828
  'Optional. If provided, searches only collaborators of this project. If omitted, searches across the collaborators of all shared projects the authenticated user can access (plus the authenticated user themselves) — use this for general "find a user" / "who is X" lookups.'
3811
3829
  ),
3812
3830
  searchTerm: s.string().optional().describe(
3813
3831
  "Search for a user by name or email (partial and case insensitive match). If omitted, all users are returned."
3814
3832
  )
3815
- }, oa = {
3816
- collaborators: s.array(an).describe("The found users."),
3833
+ }, ra = {
3834
+ collaborators: s.array(cn).describe("The found users."),
3817
3835
  projectInfo: s.object({
3818
3836
  id: s.string().describe("The project ID."),
3819
3837
  name: s.string().describe("The project name."),
@@ -3822,16 +3840,16 @@ const { FIND_PROJECTS: Us, ADD_TASKS: Rs, UPDATE_TASKS: Ls } = g, sa = {
3822
3840
  totalCount: s.number().describe("The total number of users found."),
3823
3841
  totalAvailable: s.number().optional().describe("The total number of available users before the search filter was applied."),
3824
3842
  appliedFilters: s.record(s.string(), s.unknown())
3825
- }, ra = {
3843
+ }, na = {
3826
3844
  name: g.FIND_PROJECT_COLLABORATORS,
3827
3845
  description: `Find Todoist users (collaborators, teammates) by name or email to look up their user ID. Use this whenever the user asks to find, look up, or identify a person — e.g. "find Carrie's user ID", "who is Ernesto", "look up a user". When projectId is omitted, searches across the collaborators of every shared project the authenticated user has access to, plus the authenticated user themselves — an empty result means the person is not a collaborator on any project you share with them, not necessarily that they do not exist in Todoist. When projectId is provided, searches only that project. Partial, case-insensitive match on name and email.`,
3828
- parameters: sa,
3829
- outputSchema: oa,
3846
+ parameters: oa,
3847
+ outputSchema: ra,
3830
3848
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3831
3849
  async execute(e, t) {
3832
3850
  const { projectId: o, searchTerm: r } = e;
3833
3851
  if (!o)
3834
- return na({ searchTerm: r, client: t, appliedFilters: e });
3852
+ return ia({ searchTerm: r, client: t, appliedFilters: e });
3835
3853
  let n = o, i;
3836
3854
  try {
3837
3855
  if (i = await t.getProject(o), !i)
@@ -3901,12 +3919,12 @@ const { FIND_PROJECTS: Us, ADD_TASKS: Rs, UPDATE_TASKS: Ls } = g, sa = {
3901
3919
  };
3902
3920
  }
3903
3921
  };
3904
- async function na({
3922
+ async function ia({
3905
3923
  searchTerm: e,
3906
3924
  client: t,
3907
3925
  appliedFilters: o
3908
3926
  }) {
3909
- const r = await H.getAllCollaborators(t), n = await ia(t, r);
3927
+ const r = await H.getAllCollaborators(t), n = await aa(t, r);
3910
3928
  if (n.length === 0)
3911
3929
  return {
3912
3930
  textContent: `No users found. You may have no shared projects, or collaborator data is not accessible.
@@ -3940,7 +3958,7 @@ async function na({
3940
3958
  }
3941
3959
  };
3942
3960
  }
3943
- async function ia(e, t) {
3961
+ async function aa(e, t) {
3944
3962
  try {
3945
3963
  const o = await e.getUser();
3946
3964
  return !o || t.some((r) => r.id === o.id) ? t : [
@@ -3985,11 +4003,11 @@ function Ms({
3985
4003
  nextSteps: l
3986
4004
  });
3987
4005
  }
3988
- const { ADD_PROJECTS: Wt } = g, aa = {
4006
+ const { ADD_PROJECTS: Wt } = g, ca = {
3989
4007
  active: "projects",
3990
4008
  archived: "archived projects",
3991
4009
  all: "projects (active and archived)"
3992
- }, ca = {
4010
+ }, da = {
3993
4011
  searchText: s.string().optional().describe(
3994
4012
  'Search for a project by name (partial and case insensitive match). Supports wildcards (e.g. "work*" for prefix match). Use "\\*" for a literal asterisk. If omitted, all projects are returned.'
3995
4013
  ),
@@ -4000,17 +4018,17 @@ const { ADD_PROJECTS: Wt } = g, aa = {
4000
4018
  archivedStatus: s.enum(["active", "archived", "all"]).optional().describe(
4001
4019
  "Which projects to return by archive status: 'active' (default, non-archived only), 'archived' (archived only), or 'all' (both active and archived). Each project includes an isArchived field. Archived projects can be deleted via the delete-object tool (type: 'project')."
4002
4020
  )
4003
- }, da = {
4021
+ }, la = {
4004
4022
  projects: s.array(se).describe("The found projects."),
4005
4023
  nextCursor: s.string().optional(),
4006
4024
  totalCount: s.number().describe("The total number of projects in this page."),
4007
4025
  hasMore: s.boolean(),
4008
4026
  appliedFilters: s.record(s.string(), s.unknown())
4009
- }, la = {
4027
+ }, ua = {
4010
4028
  name: g.FIND_PROJECTS,
4011
4029
  description: "List all projects or search for projects by name. By default only active projects are returned; use archivedStatus ('archived' or 'all') to include archived projects. When searching or when archivedStatus is 'all', all matching projects are returned (pagination is ignored). Otherwise projects are returned with pagination.",
4012
- parameters: ca,
4013
- outputSchema: da,
4030
+ parameters: da,
4031
+ outputSchema: la,
4014
4032
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4015
4033
  async execute(e, t) {
4016
4034
  const { searchText: o } = e, r = e.archivedStatus ?? "active";
@@ -4018,8 +4036,8 @@ const { ADD_PROJECTS: Wt } = g, aa = {
4018
4036
  if (o || r === "all") {
4019
4037
  const c = Promise.resolve([]), [d, u] = await Promise.all([
4020
4038
  r === "archived" ? c : o ? vs(t, o) : Is(t),
4021
- r === "active" ? c : Yr(t)
4022
- ]), l = o ? Gr(o) : null, p = l ? u.filter((h) => l.test(h.name)) : u;
4039
+ r === "active" ? c : Gr(t)
4040
+ ]), l = o ? qr(o) : null, p = l ? u.filter((h) => l.test(h.name)) : u;
4023
4041
  n = [...d, ...p];
4024
4042
  } else {
4025
4043
  const c = r === "archived" ? await t.getArchivedProjects({
@@ -4030,7 +4048,7 @@ const { ADD_PROJECTS: Wt } = g, aa = {
4030
4048
  }
4031
4049
  const a = n.map(te);
4032
4050
  return {
4033
- textContent: ua({ projects: a, args: e, nextCursor: i }),
4051
+ textContent: pa({ projects: a, args: e, nextCursor: i }),
4034
4052
  structuredContent: {
4035
4053
  projects: a,
4036
4054
  nextCursor: i ?? void 0,
@@ -4041,14 +4059,14 @@ const { ADD_PROJECTS: Wt } = g, aa = {
4041
4059
  };
4042
4060
  }
4043
4061
  };
4044
- function ua({
4062
+ function pa({
4045
4063
  projects: e,
4046
4064
  args: t,
4047
4065
  nextCursor: o
4048
4066
  }) {
4049
- const r = aa[t.archivedStatus ?? "active"], n = t.searchText ? `All ${r} matching "${t.searchText}"` : `${r.charAt(0).toUpperCase()}${r.slice(1)}`, i = [];
4067
+ const r = ca[t.archivedStatus ?? "active"], n = t.searchText ? `All ${r} matching "${t.searchText}"` : `${r.charAt(0).toUpperCase()}${r.slice(1)}`, i = [];
4050
4068
  t.searchText && i.push(`searchText: "${t.searchText}"`), t.archivedStatus && t.archivedStatus !== "active" && i.push(`archivedStatus: "${t.archivedStatus}"`);
4051
- const a = 10, d = e.slice(0, a).map(En).join(`
4069
+ const a = 10, d = e.slice(0, a).map(On).join(`
4052
4070
  `), u = e.length - a, l = u > 0 ? `${d}
4053
4071
  …and ${u} more` : d, p = [];
4054
4072
  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 ${Wt} to create a project`)) : (p.push("No active projects"), p.push("Use archivedStatus: 'all' to include archived projects"), p.push(`Use ${Wt} to create a project`))), V({
@@ -4061,22 +4079,22 @@ function ua({
4061
4079
  zeroReasonHints: p
4062
4080
  });
4063
4081
  }
4064
- const pa = {
4082
+ const ha = {
4065
4083
  taskId: s.string().optional().describe(
4066
4084
  "Find all reminders for a specific task. Returns both time-based and location reminders."
4067
4085
  ),
4068
4086
  reminderId: s.string().optional().describe("Get a specific time-based reminder (relative or absolute) by its ID."),
4069
4087
  locationReminderId: s.string().optional().describe("Get a specific location reminder by its ID.")
4070
- }, ha = {
4088
+ }, ma = {
4071
4089
  reminders: s.array(ht).describe("The found reminders (time-based and location)."),
4072
4090
  searchType: s.string().describe('The search type used: "task", "reminder", or "location_reminder".'),
4073
4091
  searchId: s.string().describe("The ID used for the search."),
4074
4092
  totalCount: s.number().describe("Total reminders in this response.")
4075
- }, ma = {
4093
+ }, fa = {
4076
4094
  name: g.FIND_REMINDERS,
4077
4095
  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.",
4078
- parameters: pa,
4079
- outputSchema: ha,
4096
+ parameters: ha,
4097
+ outputSchema: ma,
4080
4098
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4081
4099
  async execute(e, t) {
4082
4100
  const { taskId: o, reminderId: r, locationReminderId: n } = e, i = [o, r, n].filter(Boolean);
@@ -4122,7 +4140,7 @@ const pa = {
4122
4140
  })
4123
4141
  ]), u = [...a, ...c].map(we);
4124
4142
  return {
4125
- textContent: fa(u, o),
4143
+ textContent: ba(u, o),
4126
4144
  structuredContent: {
4127
4145
  reminders: u,
4128
4146
  searchType: "task",
@@ -4134,7 +4152,7 @@ const pa = {
4134
4152
  throw new Error("One of taskId, reminderId, or locationReminderId must be provided.");
4135
4153
  }
4136
4154
  };
4137
- function fa(e, t) {
4155
+ function ba(e, t) {
4138
4156
  if (e.length === 0)
4139
4157
  return `No reminders found for task ${t}`;
4140
4158
  const { timeBasedCount: o, locationCount: r } = Ss(e), n = [];
@@ -4148,22 +4166,22 @@ function fa(e, t) {
4148
4166
  }
4149
4167
  return `Found ${n.join(" and ")} for task ${t}`;
4150
4168
  }
4151
- const { ADD_SECTIONS: ba } = g, ga = {
4169
+ const { ADD_SECTIONS: ga } = g, ya = {
4152
4170
  projectId: s.string().min(1).describe(
4153
4171
  'The ID of the project to search sections in. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
4154
4172
  ),
4155
4173
  searchText: s.string().optional().describe(
4156
4174
  'Search for a section by name (partial and case insensitive match). Supports wildcards (e.g. "work*" for prefix match). Use "\\*" for a literal asterisk. If omitted, all sections in the project are returned.'
4157
4175
  )
4158
- }, ya = {
4176
+ }, Ta = {
4159
4177
  sections: s.array(G).describe("The found sections."),
4160
4178
  totalCount: s.number().describe("The total number of sections found."),
4161
4179
  appliedFilters: s.record(s.string(), s.unknown())
4162
- }, Ta = {
4180
+ }, ka = {
4163
4181
  name: g.FIND_SECTIONS,
4164
4182
  description: "Search for sections by name or other criteria in a project. When searching, uses server-side search to avoid fetching all sections.",
4165
- parameters: ga,
4166
- outputSchema: ya,
4183
+ parameters: ya,
4184
+ outputSchema: Ta,
4167
4185
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4168
4186
  async execute(e, t) {
4169
4187
  const o = await ee({
@@ -4171,12 +4189,12 @@ const { ADD_SECTIONS: ba } = g, ga = {
4171
4189
  client: t
4172
4190
  });
4173
4191
  let r;
4174
- e.searchText ? r = await Jr(t, e.searchText, o) : r = (await t.getSections({
4192
+ e.searchText ? r = await Xr(t, e.searchText, o) : r = (await t.getSections({
4175
4193
  projectId: o
4176
4194
  })).results;
4177
4195
  const n = r.map(q);
4178
4196
  return {
4179
- textContent: ka({
4197
+ textContent: wa({
4180
4198
  sections: n,
4181
4199
  projectId: e.projectId,
4182
4200
  searchText: e.searchText
@@ -4189,13 +4207,13 @@ const { ADD_SECTIONS: ba } = g, ga = {
4189
4207
  };
4190
4208
  }
4191
4209
  };
4192
- function ka({
4210
+ function wa({
4193
4211
  sections: e,
4194
4212
  projectId: t,
4195
4213
  searchText: o
4196
4214
  }) {
4197
4215
  const r = [];
4198
- o ? (r.push("Try broader search terms"), r.push("Check spelling"), r.push("Remove searchText to see all sections")) : (r.push("Project has no sections yet"), r.push(`Use ${ba} to create sections`));
4216
+ o ? (r.push("Try broader search terms"), r.push("Check spelling"), r.push("Remove searchText to see all sections")) : (r.push("Project has no sections yet"), r.push(`Use ${ga} to create sections`));
4199
4217
  const n = o ? `Sections in project ${t} matching "${o}"` : `Sections in project ${t}`, i = e.length > 0 ? e.map((a) => ` ${a.name} • id=${a.id}`).join(`
4200
4218
  `) : void 0;
4201
4219
  return V({
@@ -4208,7 +4226,7 @@ function ka({
4208
4226
  function Fs(e) {
4209
4227
  return /* @__PURE__ */ new Date(`${e}T00:00:00`);
4210
4228
  }
4211
- const wa = {
4229
+ const va = {
4212
4230
  startDate: s.string().regex(/^(\d{4}-\d{2}-\d{2}|today)$/).optional().describe(
4213
4231
  "The start date to get the tasks for. Format: YYYY-MM-DD, or 'today', which by default also includes overdue tasks."
4214
4232
  ),
@@ -4229,20 +4247,20 @@ const wa = {
4229
4247
  "Filter when responsibleUser is omitted. 'assigned'=assigned to others; 'unassignedOrMe'=unassigned+mine; 'all'=everyone. Default: 'unassignedOrMe'."
4230
4248
  ),
4231
4249
  ...Tt
4232
- }, va = {
4250
+ }, Ia = {
4233
4251
  tasks: s.array(K).describe("The found tasks."),
4234
4252
  nextCursor: s.string().optional(),
4235
4253
  totalCount: s.number().describe("The total number of tasks in this page."),
4236
4254
  hasMore: s.boolean(),
4237
4255
  appliedFilters: s.record(s.string(), s.unknown())
4238
- }, Ia = {
4256
+ }, Sa = {
4239
4257
  name: g.FIND_TASKS_BY_DATE,
4240
4258
  description: "Get tasks by date range. startDate='today' includes overdue items. Default responsibleUserFiltering='unassignedOrMe' excludes others' tasks.",
4241
- parameters: wa,
4242
- outputSchema: va,
4259
+ parameters: va,
4260
+ outputSchema: Ia,
4243
4261
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4244
4262
  async execute(e, t) {
4245
- const o = Ae(e.cursor);
4263
+ const o = De(e.cursor);
4246
4264
  if (!e.startDate && e.overdueOption !== "overdue-only")
4247
4265
  throw new Error(
4248
4266
  "Either startDate must be provided or overdueOption must be set to overdue-only"
@@ -4253,8 +4271,8 @@ const wa = {
4253
4271
  d = "overdue";
4254
4272
  else if (e.startDate === "today")
4255
4273
  if (e.daysCount > 1) {
4256
- const y = /* @__PURE__ */ new Date(), f = pe(y), T = Be(y, e.daysCount), C = wt(T, { representation: "date" }), A = `(due after: ${f} | due: ${f}) & due before: ${C}`;
4257
- d = e.overdueOption === "exclude-overdue" ? A : `(${A} | overdue)`;
4274
+ const y = /* @__PURE__ */ new Date(), f = pe(y), T = Be(y, e.daysCount), C = wt(T, { representation: "date" }), D = `(due after: ${f} | due: ${f}) & due before: ${C}`;
4275
+ d = e.overdueOption === "exclude-overdue" ? D : `(${D} | overdue)`;
4258
4276
  } else
4259
4277
  d = e.overdueOption === "exclude-overdue" ? "today" : "(today | overdue)";
4260
4278
  else if (e.startDate) {
@@ -4277,7 +4295,7 @@ const wa = {
4277
4295
  limit: e.limit
4278
4296
  });
4279
4297
  return {
4280
- textContent: Sa({ tasks: p, args: e, nextCursor: h, assigneeEmail: i }),
4298
+ textContent: Ca({ tasks: p, args: e, nextCursor: h, assigneeEmail: i }),
4281
4299
  structuredContent: {
4282
4300
  tasks: p,
4283
4301
  nextCursor: h ?? void 0,
@@ -4288,7 +4306,7 @@ const wa = {
4288
4306
  };
4289
4307
  }
4290
4308
  };
4291
- function Sa({
4309
+ function Ca({
4292
4310
  tasks: e,
4293
4311
  args: t,
4294
4312
  nextCursor: o,
@@ -4338,14 +4356,14 @@ function Sa({
4338
4356
  zeroReasonHints: a
4339
4357
  });
4340
4358
  }
4341
- const Ca = 300 * 1e3;
4342
- class ja {
4359
+ const ja = 300 * 1e3;
4360
+ class $a {
4343
4361
  constructor() {
4344
4362
  this.cacheByClient = /* @__PURE__ */ new WeakMap();
4345
4363
  }
4346
4364
  async getFilters(t) {
4347
4365
  const o = this.cacheByClient, r = o.get(t);
4348
- if (r && Date.now() - r.timestamp < Ca)
4366
+ if (r && Date.now() - r.timestamp < ja)
4349
4367
  return r.filters;
4350
4368
  const i = ((await t.sync({
4351
4369
  resourceTypes: ["filters"],
@@ -4402,7 +4420,7 @@ ${l}` + (d.length > 5 ? `
4402
4420
  this.cacheByClient = /* @__PURE__ */ new WeakMap();
4403
4421
  }
4404
4422
  }
4405
- const $a = new ja(), { FIND_COMPLETED_TASKS: Bt, ADD_TASKS: zt } = g, Da = {
4423
+ const Aa = new $a(), { FIND_COMPLETED_TASKS: Bt, ADD_TASKS: zt } = g, Da = {
4406
4424
  searchText: s.string().optional().describe("The text to search for in tasks."),
4407
4425
  projectId: s.string().optional().describe(
4408
4426
  'Find tasks in this project. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
@@ -4426,17 +4444,17 @@ const $a = new ja(), { FIND_COMPLETED_TASKS: Bt, ADD_TASKS: zt } = g, Da = {
4426
4444
  "The ID or name of a saved Todoist filter. The filter's query will be fetched and used to find tasks. Cannot be used with the `filter` parameter, projectId, sectionId, or parentId."
4427
4445
  ),
4428
4446
  ...Tt
4429
- }, Aa = {
4447
+ }, xa = {
4430
4448
  tasks: s.array(K).describe("The found tasks."),
4431
4449
  nextCursor: s.string().optional(),
4432
4450
  totalCount: s.number().describe("The total number of tasks in this page."),
4433
4451
  hasMore: s.boolean(),
4434
4452
  appliedFilters: s.record(s.string(), s.unknown())
4435
- }, xa = {
4453
+ }, Ea = {
4436
4454
  name: g.FIND_TASKS,
4437
4455
  description: "Find tasks by text search, project/section/parent container, responsible user, labels, a raw Todoist filter string, or a saved filter by ID or name (filterIdOrName). At least one filter must be provided.",
4438
4456
  parameters: Da,
4439
- outputSchema: Aa,
4457
+ outputSchema: xa,
4440
4458
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4441
4459
  async execute(e, t) {
4442
4460
  const {
@@ -4452,7 +4470,7 @@ const $a = new ja(), { FIND_COMPLETED_TASKS: Bt, ADD_TASKS: zt } = g, Da = {
4452
4470
  labelsOperator: p,
4453
4471
  filter: h,
4454
4472
  filterIdOrName: m
4455
- } = e, y = Ae(u), f = await t.getUser(), T = l && l.length > 0;
4473
+ } = e, y = De(u), f = await t.getUser(), T = l && l.length > 0;
4456
4474
  if (!o && !r && !n && !i && !a && !T && !h && !m)
4457
4475
  throw new Error(
4458
4476
  "At least one filter must be provided: searchText, projectId, sectionId, parentId, responsibleUser, labels, filter, or filterIdOrName"
@@ -4466,8 +4484,8 @@ const $a = new ja(), { FIND_COMPLETED_TASKS: Bt, ADD_TASKS: zt } = g, Da = {
4466
4484
  'The `filter`/`filterIdOrName` parameter cannot be combined with projectId, sectionId, or parentId. Use filter syntax instead (e.g. "##ProjectName").'
4467
4485
  );
4468
4486
  let C = h;
4469
- m && (C = (await $a.resolveFilter(t, m)).filterQuery);
4470
- const A = await lt(t, a), k = A?.userId, I = A?.email;
4487
+ m && (C = (await Aa.resolveFilter(t, m)).filterQuery);
4488
+ const D = await lt(t, a), k = D?.userId, I = D?.email;
4471
4489
  if (r || n || i) {
4472
4490
  const O = {
4473
4491
  limit: d,
@@ -4478,7 +4496,7 @@ const $a = new ja(), { FIND_COMPLETED_TASKS: Bt, ADD_TASKS: zt } = g, Da = {
4478
4496
  let M = o ? ne.filter(
4479
4497
  (ie) => ie.content.toLowerCase().includes(o.toLowerCase()) || ie.description?.toLowerCase().includes(o.toLowerCase())
4480
4498
  ) : ne;
4481
- return M = Kr({
4499
+ return M = Yr({
4482
4500
  tasks: M,
4483
4501
  resolvedAssigneeId: k,
4484
4502
  currentUserId: f.id,
@@ -4545,7 +4563,7 @@ const $a = new ja(), { FIND_COMPLETED_TASKS: Bt, ADD_TASKS: zt } = g, Da = {
4545
4563
  });
4546
4564
  $ = me($, O);
4547
4565
  }
4548
- const { tasks: S, nextCursor: D } = await pt({
4566
+ const { tasks: S, nextCursor: A } = await pt({
4549
4567
  client: t,
4550
4568
  query: $,
4551
4569
  cursor: y,
@@ -4555,21 +4573,21 @@ const $a = new ja(), { FIND_COMPLETED_TASKS: Bt, ADD_TASKS: zt } = g, Da = {
4555
4573
  textContent: Le({
4556
4574
  tasks: S,
4557
4575
  args: e,
4558
- nextCursor: D,
4576
+ nextCursor: A,
4559
4577
  isContainerSearch: !1,
4560
4578
  assigneeEmail: I
4561
4579
  }),
4562
4580
  structuredContent: {
4563
4581
  tasks: S,
4564
- nextCursor: D ?? void 0,
4582
+ nextCursor: A ?? void 0,
4565
4583
  totalCount: S.length,
4566
- hasMore: !!D,
4584
+ hasMore: !!A,
4567
4585
  appliedFilters: e
4568
4586
  }
4569
4587
  };
4570
4588
  }
4571
4589
  };
4572
- function Ea(e) {
4590
+ function Oa(e) {
4573
4591
  if (e.projectId) {
4574
4592
  const t = [
4575
4593
  e.searchText ? "No tasks in project match search" : "Project has no tasks yet"
@@ -4604,7 +4622,7 @@ function Le({
4604
4622
  const d = t.labels.map((u) => `@${u}`).join(t.labelsOperator === "and" ? " & " : " | ");
4605
4623
  a.push(`labels: ${d}`);
4606
4624
  }
4607
- e.length === 0 && c.push(...Ea(t));
4625
+ e.length === 0 && c.push(...Oa(t));
4608
4626
  } else {
4609
4627
  const d = n || t.responsibleUser, u = [];
4610
4628
  if (t.filter && u.push(`filter: ${t.filter}`), t.searchText && u.push(`"${t.searchText}"`), t.responsibleUser && u.push(`assigned to ${d}`), t.labels && t.labels.length > 0) {
@@ -4633,7 +4651,7 @@ function Le({
4633
4651
  zeroReasonHints: c
4634
4652
  });
4635
4653
  }
4636
- const Oa = {
4654
+ const _a = {
4637
4655
  projectId: s.string().min(1).optional().describe(
4638
4656
  `Optional project ID. Use "inbox" for the Inbox. If provided, returns that project's tasks grouped by section. If omitted, returns the project and section structure for the whole account with no tasks.`
4639
4657
  )
@@ -4647,7 +4665,7 @@ const Oa = {
4647
4665
  sections: s.array(G),
4648
4666
  children: s.array(Hs).describe("Nested child projects.")
4649
4667
  })
4650
- ), _a = {
4668
+ ), Pa = {
4651
4669
  type: s.enum(["account_overview", "project_overview"]).describe("The type of overview returned."),
4652
4670
  totalProjects: s.number().optional().describe("Total number of projects (account overview only)."),
4653
4671
  totalTasks: s.number().optional().describe("Total number of tasks."),
@@ -4681,7 +4699,7 @@ const Oa = {
4681
4699
  tasksWithoutSection: s.number()
4682
4700
  }).optional().describe("Statistics object (project overview only).")
4683
4701
  };
4684
- function Pa(e) {
4702
+ function Ua(e) {
4685
4703
  const t = {};
4686
4704
  for (const n of e)
4687
4705
  t[n.id] = {
@@ -4706,7 +4724,7 @@ function Pa(e) {
4706
4724
  }
4707
4725
  return r(o), o;
4708
4726
  }
4709
- async function Ua(e, t) {
4727
+ async function Ra(e, t) {
4710
4728
  const o = {};
4711
4729
  return await Promise.all(
4712
4730
  t.map(async (r) => {
@@ -4763,7 +4781,7 @@ function Bs(e, t) {
4763
4781
  )
4764
4782
  };
4765
4783
  }
4766
- async function Ra(e, t) {
4784
+ async function La(e, t) {
4767
4785
  let o = [], r;
4768
4786
  do {
4769
4787
  const { results: n, nextCursor: i } = await e.getTasks({
@@ -4775,12 +4793,12 @@ async function Ra(e, t) {
4775
4793
  } while (r);
4776
4794
  return o;
4777
4795
  }
4778
- async function La(e, t) {
4796
+ async function Na(e, t) {
4779
4797
  const { results: o } = await e.getSections({ projectId: t });
4780
4798
  return o;
4781
4799
  }
4782
- async function Na(e) {
4783
- const { results: t } = await e.getProjects({}), o = t.find((p) => Y(p) && p.inboxProject === !0), r = t.filter((p) => !Y(p) || p.inboxProject !== !0), n = Pa(r), i = t.map((p) => p.id), a = await Ua(e, i), c = ["# Personal Projects", ""];
4800
+ async function Ma(e) {
4801
+ const { results: t } = await e.getProjects({}), o = t.find((p) => Y(p) && p.inboxProject === !0), r = t.filter((p) => !Y(p) || p.inboxProject !== !0), n = Ua(r), i = t.map((p) => p.id), a = await Ra(e, i), c = ["# Personal Projects", ""];
4784
4802
  if (o) {
4785
4803
  c.push(`- Inbox Project: ${o.name} (id=${o.id})`);
4786
4804
  for (const p of a[o.id] || [])
@@ -4820,11 +4838,11 @@ async function Na(e) {
4820
4838
  };
4821
4839
  return { textContent: u, structuredContent: l };
4822
4840
  }
4823
- async function Ma(e, t) {
4841
+ async function Fa(e, t) {
4824
4842
  const [o, r, n] = await Promise.all([
4825
4843
  e.getProject(t),
4826
- La(e, t),
4827
- Ra(e, t)
4844
+ Na(e, t),
4845
+ La(e, t)
4828
4846
  ]), i = {};
4829
4847
  for (const l of r)
4830
4848
  i[l.id] = [];
@@ -4866,27 +4884,27 @@ async function Ma(e, t) {
4866
4884
  };
4867
4885
  return { textContent: d, structuredContent: u };
4868
4886
  }
4869
- const Fa = {
4887
+ const Ha = {
4870
4888
  name: g.GET_OVERVIEW,
4871
4889
  description: `Get a Markdown overview. Called without a projectId, returns the account's project and section structure only — no tasks — for navigation. Pass a projectId (or "inbox" for the Inbox) to get that project's tasks grouped by section.`,
4872
- parameters: Oa,
4873
- outputSchema: _a,
4890
+ parameters: _a,
4891
+ outputSchema: Pa,
4874
4892
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4875
4893
  async execute(e, t) {
4876
- const o = await ee({ projectId: e.projectId, client: t }), r = o ? await Ma(t, o) : await Na(t);
4894
+ const o = await ee({ projectId: e.projectId, client: t }), r = o ? await Fa(t, o) : await Ma(t);
4877
4895
  return {
4878
4896
  textContent: r.textContent,
4879
4897
  structuredContent: r.structuredContent
4880
4898
  };
4881
4899
  }
4882
- }, Ha = {}, ue = s.object({
4900
+ }, Wa = {}, ue = s.object({
4883
4901
  count: s.number().describe("Number of consecutive periods in this streak."),
4884
4902
  start: s.string().describe("Start date of the streak."),
4885
4903
  end: s.string().describe("End date of the streak.")
4886
4904
  }), Yt = s.object({
4887
4905
  id: s.string().describe("Project ID."),
4888
4906
  completed: s.number().describe("Number of tasks completed in this project.")
4889
- }), Wa = {
4907
+ }), Ba = {
4890
4908
  completedCount: s.number().describe("Total number of completed tasks (all-time)."),
4891
4909
  daysItems: s.array(
4892
4910
  s.object({
@@ -4935,11 +4953,11 @@ const Fa = {
4935
4953
  })
4936
4954
  ).describe("Recent karma change events with reasons."),
4937
4955
  projectColors: s.record(s.string(), s.string()).describe("Map of project ID to color key.")
4938
- }, Ba = {
4956
+ }, za = {
4939
4957
  name: g.GET_PRODUCTIVITY_STATS,
4940
4958
  description: 'Get comprehensive productivity statistics including daily/weekly completion breakdowns, goal streaks (current, last, max), karma score and trends, and historical karma data. Useful for productivity analysis and tracking goal progress. Reports counts, streaks and karma only, never the tasks themselves — for "what did I complete", use find-activity.',
4941
- parameters: Ha,
4942
- outputSchema: Wa,
4959
+ parameters: Wa,
4960
+ outputSchema: Ba,
4943
4961
  annotations: {
4944
4962
  readOnlyHint: !0,
4945
4963
  destructiveHint: !1,
@@ -4948,7 +4966,7 @@ const Fa = {
4948
4966
  async execute(e, t) {
4949
4967
  const o = await t.getProductivityStats();
4950
4968
  return {
4951
- textContent: za(o),
4969
+ textContent: Ka(o),
4952
4970
  structuredContent: {
4953
4971
  completedCount: o.completedCount,
4954
4972
  daysItems: o.daysItems,
@@ -4975,7 +4993,7 @@ const Fa = {
4975
4993
  };
4976
4994
  }
4977
4995
  };
4978
- function za(e) {
4996
+ function Ka(e) {
4979
4997
  const t = [
4980
4998
  "# Productivity Statistics",
4981
4999
  "",
@@ -5005,11 +5023,11 @@ function za(e) {
5005
5023
  return t.join(`
5006
5024
  `);
5007
5025
  }
5008
- const Ka = {
5026
+ const Ya = {
5009
5027
  projectId: s.string().min(1).describe("The ID of the project to get activity stats for."),
5010
5028
  weeks: s.number().int().min(1).max(12).optional().describe("Number of weeks of activity data to retrieve (1-12, default 2)."),
5011
5029
  includeWeeklyCounts: s.boolean().optional().describe("Include weekly rollup counts alongside daily counts.")
5012
- }, Ya = {
5030
+ }, Ga = {
5013
5031
  projectId: s.string().describe("The project ID."),
5014
5032
  dayItems: s.array(
5015
5033
  s.object({
@@ -5025,7 +5043,7 @@ const Ka = {
5025
5043
  })
5026
5044
  ).optional().describe("Weekly completion rollups. Only included when includeWeeklyCounts is true.")
5027
5045
  };
5028
- function Ga(e, t) {
5046
+ function qa(e, t) {
5029
5047
  const o = [`# Activity Stats: Project ${e}`, ""];
5030
5048
  if (t.dayItems.length > 0) {
5031
5049
  o.push("## Daily Activity");
@@ -5041,11 +5059,11 @@ function Ga(e, t) {
5041
5059
  return o.join(`
5042
5060
  `);
5043
5061
  }
5044
- const qa = {
5062
+ const Va = {
5045
5063
  name: g.GET_PROJECT_ACTIVITY_STATS,
5046
5064
  description: "Get daily and optional weekly task completion counts for a project over a configurable time window (1-12 weeks). Useful for identifying completion trends and patterns.",
5047
- parameters: Ka,
5048
- outputSchema: Ya,
5065
+ parameters: Ya,
5066
+ outputSchema: Ga,
5049
5067
  annotations: {
5050
5068
  readOnlyHint: !0,
5051
5069
  destructiveHint: !1,
@@ -5057,7 +5075,7 @@ const qa = {
5057
5075
  includeWeeklyCounts: n
5058
5076
  });
5059
5077
  return {
5060
- textContent: Ga(o, i),
5078
+ textContent: qa(o, i),
5061
5079
  structuredContent: {
5062
5080
  projectId: o,
5063
5081
  dayItems: i.dayItems,
@@ -5065,12 +5083,12 @@ const qa = {
5065
5083
  }
5066
5084
  };
5067
5085
  }
5068
- }, Va = {
5086
+ }, Ja = {
5069
5087
  projectId: s.string().min(1).describe("The ID of the project to check health for."),
5070
5088
  includeContext: s.boolean().default(!1).describe(
5071
5089
  "Include detailed health context with project metrics and task-level data. May produce large output for projects with many tasks."
5072
5090
  )
5073
- }, Ja = s.object({
5091
+ }, Xa = s.object({
5074
5092
  id: s.string().describe("The task ID."),
5075
5093
  content: s.string().describe("The task content/title."),
5076
5094
  priority: s.string().describe("The task priority (1-4)."),
@@ -5078,7 +5096,7 @@ const qa = {
5078
5096
  deadline: s.string().optional().describe("The deadline date string, if set."),
5079
5097
  isCompleted: s.boolean().describe("Whether the task is completed."),
5080
5098
  labels: s.array(s.string()).describe("Labels applied to this task.")
5081
- }), Xa = {
5099
+ }), Qa = {
5082
5100
  projectId: s.string().describe("The project ID."),
5083
5101
  projectName: s.string().describe("The project name."),
5084
5102
  progress: s.object({
@@ -5104,12 +5122,12 @@ const qa = {
5104
5122
  tasksCompletedThisWeek: s.number().describe("Tasks completed in the current week."),
5105
5123
  averageCompletionTime: s.number().optional().describe("Average task completion time in days, if available.")
5106
5124
  }).describe("Aggregated project metrics."),
5107
- tasks: s.array(Ja).describe("Tasks in the project.")
5125
+ tasks: s.array(Xa).describe("Tasks in the project.")
5108
5126
  }).optional().describe(
5109
5127
  "Detailed project context with metrics and task data. Only included when includeContext is true."
5110
5128
  )
5111
5129
  };
5112
- async function Qa(e, t, o) {
5130
+ async function Za(e, t, o) {
5113
5131
  if (o) {
5114
5132
  const [i, a, c] = await Promise.all([
5115
5133
  e.getProjectProgress(t),
@@ -5124,7 +5142,7 @@ async function Qa(e, t, o) {
5124
5142
  ]);
5125
5143
  return { progress: r, health: n };
5126
5144
  }
5127
- function Za(e, { progress: t, health: o, context: r }) {
5145
+ function ec(e, { progress: t, health: o, context: r }) {
5128
5146
  const n = [`# Project Health: ${e}`, ""];
5129
5147
  if (n.push(`**Status:** ${o.status}`), o.isStale && n.push("**Note:** Health data is stale and may not reflect recent changes."), o.updateInProgress && n.push("**Note:** A health analysis update is currently in progress."), o.updatedAt && n.push(`**Last Updated:** ${o.updatedAt.toISOString()}`), n.push(""), n.push("## Progress"), n.push(
5130
5148
  `**Completed:** ${t.completedCount} | **Active:** ${t.activeCount} | **Progress:** ${t.progressPercent}%`
@@ -5142,18 +5160,18 @@ function Za(e, { progress: t, health: o, context: r }) {
5142
5160
  return n.join(`
5143
5161
  `);
5144
5162
  }
5145
- const ec = {
5163
+ const tc = {
5146
5164
  name: g.GET_PROJECT_HEALTH,
5147
5165
  description: "Get a comprehensive health assessment for a project including completion progress, health status (EXCELLENT, ON_TRACK, AT_RISK, CRITICAL), and optional detailed context with project metrics and task-level data. Use includeContext=true for that full detail.",
5148
- parameters: Va,
5149
- outputSchema: Xa,
5166
+ parameters: Ja,
5167
+ outputSchema: Qa,
5150
5168
  annotations: {
5151
5169
  readOnlyHint: !0,
5152
5170
  destructiveHint: !1,
5153
5171
  idempotentHint: !0
5154
5172
  },
5155
5173
  async execute(e, t) {
5156
- const { projectId: o, includeContext: r } = e, n = await Qa(t, o, r), i = n.context?.projectName ?? `Project ${o}`, a = Za(i, n), c = n.context ? {
5174
+ const { projectId: o, includeContext: r } = e, n = await Za(t, o, r), i = n.context?.projectName ?? `Project ${o}`, a = ec(i, n), c = n.context ? {
5157
5175
  projectDescription: n.context.projectDescription ?? void 0,
5158
5176
  projectMetrics: {
5159
5177
  ...n.context.projectMetrics,
@@ -5191,12 +5209,12 @@ const ec = {
5191
5209
  }
5192
5210
  };
5193
5211
  }
5194
- }, tc = {
5212
+ }, sc = {
5195
5213
  workspaceIdOrName: s.string().min(1).describe(
5196
5214
  "The workspace ID or name. Supports exact ID, exact name match (case-insensitive), or unique partial name match."
5197
5215
  ),
5198
5216
  projectIds: s.array(s.string().min(1)).min(1).optional().describe("Optional list of project IDs to scope insights to specific projects.")
5199
- }, sc = s.object({
5217
+ }, oc = s.object({
5200
5218
  projectId: s.string().describe("The project ID."),
5201
5219
  health: s.object({
5202
5220
  status: s.enum(ot).describe("The health status of the project."),
@@ -5208,22 +5226,22 @@ const ec = {
5208
5226
  activeCount: s.number().describe("Number of active tasks."),
5209
5227
  progressPercent: s.number().describe("Completion percentage (0-100).")
5210
5228
  }).optional().describe("Progress data for this project. Omitted when the project has none.")
5211
- }), oc = {
5229
+ }), rc = {
5212
5230
  workspaceId: s.string().describe("The resolved workspace ID."),
5213
5231
  workspaceName: s.string().describe("The resolved workspace name."),
5214
- projectInsights: s.array(sc).describe("Health and progress insights for each project in the workspace.")
5215
- }, rc = {
5232
+ projectInsights: s.array(oc).describe("Health and progress insights for each project in the workspace.")
5233
+ }, nc = {
5216
5234
  name: g.GET_WORKSPACE_INSIGHTS,
5217
5235
  description: "Get aggregated health and progress insights across all projects in a workspace. Accepts workspace name or ID, with optional project ID filtering. Useful for a cross-project health overview.",
5218
- parameters: tc,
5219
- outputSchema: oc,
5236
+ parameters: sc,
5237
+ outputSchema: rc,
5220
5238
  annotations: {
5221
5239
  readOnlyHint: !0,
5222
5240
  destructiveHint: !1,
5223
5241
  idempotentHint: !0
5224
5242
  },
5225
5243
  async execute(e, t) {
5226
- const { workspaceIdOrName: o, projectIds: r } = e, n = await Ds.resolveWorkspace(t, o), a = (await t.getWorkspaceInsights(n.workspaceId, { projectIds: r })).projectInsights.map((d) => ({
5244
+ const { workspaceIdOrName: o, projectIds: r } = e, n = await As.resolveWorkspace(t, o), a = (await t.getWorkspaceInsights(n.workspaceId, { projectIds: r })).projectInsights.map((d) => ({
5227
5245
  projectId: d.projectId,
5228
5246
  health: d.health ? {
5229
5247
  status: d.health.status,
@@ -5256,7 +5274,7 @@ const ec = {
5256
5274
  };
5257
5275
  }
5258
5276
  };
5259
- function nc(e) {
5277
+ function ic(e) {
5260
5278
  const t = e.trim();
5261
5279
  if (!/^https?:\/\//i.test(t))
5262
5280
  return t;
@@ -5266,21 +5284,21 @@ function nc(e) {
5266
5284
  } catch {
5267
5285
  throw new Error(`Could not read a template ID from "${t}".`);
5268
5286
  }
5269
- if (!ic(o.hostname))
5287
+ if (!ac(o.hostname))
5270
5288
  throw new Error(
5271
5289
  `"${o.hostname}" is not a Todoist domain. Pass a todoist.com template URL or the template ID itself.`
5272
5290
  );
5273
5291
  o.hostname = "todoist.com";
5274
- const r = ao(o.toString());
5292
+ const r = co(o.toString());
5275
5293
  if (r?.type !== "template")
5276
5294
  throw new Error(`"${t}" is not a Todoist template URL.`);
5277
5295
  return r.id;
5278
5296
  }
5279
- function ic(e) {
5297
+ function ac(e) {
5280
5298
  const t = e.toLowerCase();
5281
5299
  return t === "todoist.com" || t.endsWith(".todoist.com");
5282
5300
  }
5283
- const ac = {
5301
+ const cc = {
5284
5302
  projectId: s.string().min(1).describe("The ID of the existing project to import the template into."),
5285
5303
  templateId: s.string().optional().describe(
5286
5304
  'The template to import — either a gallery slug ("product-launch"), a personal template ID ("UT_28Ex..."), or a full Todoist template URL, which is reduced to the ID automatically. Gallery templates work for anyone; personal templates only for the account that owns them. There is no way to list templates through this server, so only use the ID or URL the user supplied. Provide either this or `csvFileContent`, not both.'
@@ -5289,16 +5307,16 @@ const ac = {
5289
5307
  "Raw CSV template content, as produced by export-project-template. Provide either this or `templateId`, not both."
5290
5308
  ),
5291
5309
  locale: s.string().optional().describe('Locale for the imported content when using `templateId`. Defaults to "en".')
5292
- }, cc = {
5310
+ }, dc = {
5293
5311
  sections: s.array(G).describe("Sections created by the import."),
5294
5312
  tasks: s.array(K).describe("Tasks created by the import."),
5295
5313
  comments: s.array(Ie).describe("Comments created by the import."),
5296
5314
  totalCount: s.number().describe("The total number of objects created by the import.")
5297
- }, dc = {
5315
+ }, lc = {
5298
5316
  name: g.IMPORT_PROJECT_TEMPLATE,
5299
5317
  description: "Import a template into an existing project, adding its tasks, sections and comments to whatever is already there. Source it by template ID/URL or by passing CSV content from export-project-template. To start a new project from a template, create the project with add-projects first, then import into it. This writes immediately and cannot be undone, so only run it against a project the user named.",
5300
- parameters: ac,
5301
- outputSchema: cc,
5318
+ parameters: cc,
5319
+ outputSchema: dc,
5302
5320
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
5303
5321
  async execute({ projectId: e, templateId: t, csvFileContent: o, locale: r }, n) {
5304
5322
  if (!!t == !!o)
@@ -5307,7 +5325,7 @@ const ac = {
5307
5325
  );
5308
5326
  const i = t ? await n.importTemplateFromId({
5309
5327
  projectId: e,
5310
- templateId: nc(t),
5328
+ templateId: ic(t),
5311
5329
  locale: r
5312
5330
  }) : await n.importTemplateIntoProject({
5313
5331
  projectId: e,
@@ -5316,7 +5334,7 @@ const ac = {
5316
5334
  fileName: "template.csv"
5317
5335
  }), a = i.sections.map(q), c = i.tasks.map(U), d = i.comments.map(ve), u = i.projects.length + a.length + c.length + d.length;
5318
5336
  return {
5319
- textContent: lc({
5337
+ textContent: uc({
5320
5338
  projectId: e,
5321
5339
  counts: {
5322
5340
  projects: i.projects.length,
@@ -5330,7 +5348,7 @@ const ac = {
5330
5348
  };
5331
5349
  }
5332
5350
  };
5333
- function lc({
5351
+ function uc({
5334
5352
  projectId: e,
5335
5353
  counts: t,
5336
5354
  totalCount: o
@@ -5340,21 +5358,21 @@ function lc({
5340
5358
  const r = Object.entries(t).filter(([, n]) => n > 0).map(([n, i]) => `${i} ${i === 1 ? n.replace(/s$/, "") : n}`);
5341
5359
  return `Imported template into project (id=${e}): ${r.join(", ")}.`;
5342
5360
  }
5343
- const uc = {}, pc = {
5361
+ const pc = {}, hc = {
5344
5362
  id: s.string().describe("The unique identifier for the workspace."),
5345
5363
  name: s.string().describe("The name of the workspace."),
5346
- plan: s.enum(lo).describe("The workspace plan type."),
5347
- role: s.enum(co).optional().describe("The user's role in the workspace, if available."),
5364
+ plan: s.enum(uo).describe("The workspace plan type."),
5365
+ role: s.enum(lo).optional().describe("The user's role in the workspace, if available."),
5348
5366
  isLinkSharingEnabled: s.boolean().describe("Whether link sharing is enabled for the workspace."),
5349
5367
  isGuestAllowed: s.boolean().describe("Whether guests are allowed in the workspace."),
5350
5368
  createdAt: s.string().optional().describe("The ISO 8601 timestamp when the workspace was created."),
5351
5369
  creatorId: s.string().describe("The ID of the user who created the workspace.")
5352
- }, hc = {
5370
+ }, mc = {
5353
5371
  type: s.literal("workspaces").describe("The type of the response."),
5354
- workspaces: s.array(s.object(pc)).describe("List of workspaces."),
5372
+ workspaces: s.array(s.object(hc)).describe("List of workspaces."),
5355
5373
  count: s.number().describe("The total number of workspaces.")
5356
5374
  };
5357
- async function mc(e) {
5375
+ async function fc(e) {
5358
5376
  const o = (await e.getWorkspaces()).map((a) => ({
5359
5377
  id: a.id,
5360
5378
  name: a.name,
@@ -5385,22 +5403,22 @@ async function mc(e) {
5385
5403
  };
5386
5404
  return { textContent: n, structuredContent: i };
5387
5405
  }
5388
- const fc = {
5406
+ const bc = {
5389
5407
  name: g.LIST_WORKSPACES,
5390
5408
  description: "Get all workspaces for the authenticated user. Returns workspace details including ID, name, plan type (STARTER/BUSINESS), user role (ADMIN/MEMBER/GUEST), link sharing settings, guest permissions, creation date, and creator ID.",
5391
- parameters: uc,
5392
- outputSchema: hc,
5409
+ parameters: pc,
5410
+ outputSchema: mc,
5393
5411
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
5394
5412
  async execute(e, t) {
5395
- const o = await mc(t);
5413
+ const o = await fc(t);
5396
5414
  return {
5397
5415
  textContent: o.textContent,
5398
5416
  structuredContent: o.structuredContent
5399
5417
  };
5400
5418
  }
5401
- }, { FIND_TASKS: bc, FIND_PROJECT_COLLABORATORS: Gt, UPDATE_TASKS: gc } = g, yc = 50, Tc = {
5419
+ }, { FIND_TASKS: gc, FIND_PROJECT_COLLABORATORS: Gt, UPDATE_TASKS: yc } = g, zs = 50, Tc = {
5402
5420
  operation: s.enum(["assign", "unassign", "reassign"]).describe("The assignment operation to perform."),
5403
- taskIds: s.array(s.string()).min(1).max(yc).describe("The IDs of the tasks to operate on (max 50)."),
5421
+ taskIds: s.array(s.string()).min(1).max(zs).describe("The IDs of the tasks to operate on (max 50)."),
5404
5422
  responsibleUser: s.string().optional().describe(
5405
5423
  '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.'
5406
5424
  ),
@@ -5426,10 +5444,16 @@ const fc = {
5426
5444
  }).optional().describe("Summary of the operation.")
5427
5445
  }, wc = {
5428
5446
  name: g.MANAGE_ASSIGNMENTS,
5429
- description: "Bulk assignment operations for multiple tasks. Supports assign, unassign, and reassign operations with atomic rollback on failures.",
5447
+ description: `Assign, unassign or reassign up to ${zs} tasks at once. Assigning notifies the new assignee. Each task is updated independently, so one failure does not undo the others; failures are reported per task. Use dryRun to check the changes first.`,
5430
5448
  parameters: Tc,
5431
5449
  outputSchema: kc,
5432
- annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5450
+ // Open world: assigning a task notifies the new assignee.
5451
+ annotations: {
5452
+ readOnlyHint: !1,
5453
+ destructiveHint: !0,
5454
+ idempotentHint: !1,
5455
+ openWorldHint: !0
5456
+ },
5433
5457
  async execute(e, t) {
5434
5458
  const { operation: o, taskIds: r, responsibleUser: n, fromAssigneeUser: i, dryRun: a } = e;
5435
5459
  if ((o === "assign" || o === "reassign") && !n)
@@ -5471,10 +5495,10 @@ const fc = {
5471
5495
  });
5472
5496
  if (o === "unassign") {
5473
5497
  if (a) {
5474
- const b = d.map((D) => ({
5475
- taskId: D.id,
5498
+ const b = d.map((A) => ({
5499
+ taskId: A.id,
5476
5500
  success: !0,
5477
- originalAssigneeId: D.responsibleUid ?? void 0,
5501
+ originalAssigneeId: A.responsibleUid ?? void 0,
5478
5502
  newAssigneeId: void 0
5479
5503
  }));
5480
5504
  return {
@@ -5548,7 +5572,7 @@ const fc = {
5548
5572
  );
5549
5573
  if (!I)
5550
5574
  return $.map(({ assignment: b, validation: S }) => {
5551
- const D = d.find((E) => E.id === b.taskId);
5575
+ const A = d.find((E) => E.id === b.taskId);
5552
5576
  if (!b.taskId || !S.resolvedUser?.userId)
5553
5577
  throw new Error(
5554
5578
  "Invalid assignment or validation data - this should not happen"
@@ -5556,19 +5580,19 @@ const fc = {
5556
5580
  return {
5557
5581
  taskId: b.taskId,
5558
5582
  success: !0,
5559
- originalAssigneeId: D?.responsibleUid ?? void 0,
5583
+ originalAssigneeId: A?.responsibleUid ?? void 0,
5560
5584
  newAssigneeId: S.resolvedUser.userId
5561
5585
  };
5562
5586
  });
5563
5587
  const w = $.map(
5564
5588
  async ({ assignment: b, validation: S }) => {
5565
- const D = d.find((E) => E.id === b.taskId);
5589
+ const A = d.find((E) => E.id === b.taskId);
5566
5590
  if (!b.taskId || !S.resolvedUser?.userId)
5567
5591
  return {
5568
5592
  taskId: b.taskId || "unknown-task",
5569
5593
  success: !1,
5570
5594
  error: "Invalid assignment data - missing task ID or resolved user",
5571
- originalAssigneeId: D?.responsibleUid ?? void 0
5595
+ originalAssigneeId: A?.responsibleUid ?? void 0
5572
5596
  };
5573
5597
  try {
5574
5598
  return await t.updateTask(b.taskId, {
@@ -5576,7 +5600,7 @@ const fc = {
5576
5600
  }), {
5577
5601
  taskId: b.taskId,
5578
5602
  success: !0,
5579
- originalAssigneeId: D?.responsibleUid ?? void 0,
5603
+ originalAssigneeId: A?.responsibleUid ?? void 0,
5580
5604
  newAssigneeId: S.resolvedUser.userId
5581
5605
  };
5582
5606
  } catch (E) {
@@ -5584,7 +5608,7 @@ const fc = {
5584
5608
  taskId: b.taskId,
5585
5609
  success: !1,
5586
5610
  error: E instanceof Error ? E.message : "Update failed",
5587
- originalAssigneeId: D?.responsibleUid ?? void 0
5611
+ originalAssigneeId: A?.responsibleUid ?? void 0
5588
5612
  };
5589
5613
  }
5590
5614
  }
@@ -5651,8 +5675,8 @@ function Ne({
5651
5675
  `;
5652
5676
  }
5653
5677
  return !o && r.length > 0 ? (c += `**Next steps:**
5654
- `, c += `• Use ${bc} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
5655
- `, c += `• Use ${gc} for individual assignment changes
5678
+ `, c += `• Use ${gc} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
5679
+ `, c += `• Use ${yc} for individual assignment changes
5656
5680
  `, n.length > 0 && (c += `• Check failed tasks and use ${Gt} to verify collaborator access
5657
5681
  `)) : o ? (c += `**To execute:**
5658
5682
  `, c += `• Remove dryRun parameter and run again to execute changes
@@ -5702,7 +5726,8 @@ const vc = {
5702
5726
  description: "Move a project between personal and workspace contexts.",
5703
5727
  parameters: Cc,
5704
5728
  outputSchema: jc,
5705
- annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
5729
+ // Destructive: move-to-personal removes every collaborator from the project.
5730
+ annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !0 },
5706
5731
  async execute(e, t) {
5707
5732
  let o;
5708
5733
  if (e.action === "move-to-workspace") {
@@ -5724,8 +5749,8 @@ const vc = {
5724
5749
  }
5725
5750
  };
5726
5751
  }
5727
- }, zs = ["project", "section"], Dc = {
5728
- type: s.enum(zs).describe(
5752
+ }, Ks = ["project", "section"], Ac = {
5753
+ type: s.enum(Ks).describe(
5729
5754
  'The type of entity to reorder. "project" reorders sibling projects within the same parent (and can move projects to a new parent). "section" reorders sections within the same project.'
5730
5755
  ),
5731
5756
  items: s.array(
@@ -5741,8 +5766,8 @@ const vc = {
5741
5766
  ).min(1).describe(
5742
5767
  "The items to reorder or move. Each item must have at least order or parentId. Items with parentId will be moved first, then items with order will be reordered. All items being reordered should be siblings for predictable results."
5743
5768
  )
5744
- }, Ac = {
5745
- type: s.enum(zs).describe("The type of entity that was reordered/moved."),
5769
+ }, Dc = {
5770
+ type: s.enum(Ks).describe("The type of entity that was reordered/moved."),
5746
5771
  movedCount: s.number().describe("The number of entities moved to a new parent."),
5747
5772
  reorderedCount: s.number().describe("The number of entities reordered."),
5748
5773
  affectedIds: s.array(s.string()).describe("The IDs of all affected entities."),
@@ -5750,8 +5775,8 @@ const vc = {
5750
5775
  }, xc = {
5751
5776
  name: g.REORDER_OBJECTS,
5752
5777
  description: 'Reorder sibling projects or sections, and optionally move projects to a new parent. For projects: set order to reorder siblings, and/or set parentId to move under a new parent (use "root" for top level). For sections: set order to reorder within a project.',
5753
- parameters: Dc,
5754
- outputSchema: Ac,
5778
+ parameters: Ac,
5779
+ outputSchema: Dc,
5755
5780
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
5756
5781
  async execute(e, t) {
5757
5782
  const { type: o, items: r } = e, n = /* @__PURE__ */ new Set();
@@ -6332,7 +6357,7 @@ const fd = s.object({
6332
6357
  }), bd = s.object({
6333
6358
  type: s.literal("absolute"),
6334
6359
  id: s.string().min(1).describe("The ID of the absolute reminder to update."),
6335
- due: As.optional().describe("New due date/time for the reminder."),
6360
+ due: Ds.optional().describe("New due date/time for the reminder."),
6336
6361
  service: Oe.optional().describe('New delivery method: "email" or "push".'),
6337
6362
  isUrgent: _e
6338
6363
  }), gd = s.object({
@@ -6450,16 +6475,16 @@ function jd({ sections: e }) {
6450
6475
  return `Updated ${t} section${t === 1 ? "" : "s"}:
6451
6476
  ${o}`;
6452
6477
  }
6453
- function Ks(e, t) {
6478
+ function Ys(e, t) {
6454
6479
  return t.projectId !== void 0 ? e.projectId === t.projectId && !e.sectionId && !e.parentId : t.sectionId !== void 0 ? e.sectionId === t.sectionId && !e.parentId : e.parentId === t.parentId;
6455
6480
  }
6456
6481
  function $d(e, t) {
6457
6482
  return t.projectId !== void 0 ? e.projectId === t.projectId : t.sectionId !== void 0 ? e.sectionId === t.sectionId : e.parentId === t.parentId;
6458
6483
  }
6459
- function Dd(e) {
6484
+ function Ad(e) {
6460
6485
  return e.projectId !== void 0 ? `project:${e.projectId}` : e.sectionId !== void 0 ? `section:${e.sectionId}` : `parent:${e.parentId}`;
6461
6486
  }
6462
- function Ad(e) {
6487
+ function Dd(e) {
6463
6488
  const t = [];
6464
6489
  return e.projectId && t.push({ projectId: e.projectId }), e.sectionId && t.push({ sectionId: e.sectionId }), e.parentId && t.push({ parentId: e.parentId }), t;
6465
6490
  }
@@ -6468,12 +6493,12 @@ function xd({
6468
6493
  request: t,
6469
6494
  current: o
6470
6495
  }) {
6471
- const r = Ad(t);
6496
+ const r = Dd(t);
6472
6497
  if (r.length === 0)
6473
6498
  return { redundantMoveSkipped: !1 };
6474
6499
  let n = r, i = !1;
6475
6500
  if (o) {
6476
- const a = r.length === 1 ? (c) => Ks(o, c) : (c) => $d(o, c);
6501
+ const a = r.length === 1 ? (c) => Ys(o, c) : (c) => $d(o, c);
6477
6502
  n = r.filter((c) => !a(c)), i = n.length < r.length;
6478
6503
  }
6479
6504
  if (n.length === 0)
@@ -6527,7 +6552,7 @@ const Ed = s.object({
6527
6552
  isUncompletable: s.boolean().optional().describe(
6528
6553
  "Whether this task should be uncompletable (organizational header). Tasks with isUncompletable: true appear as organizational headers and cannot be completed."
6529
6554
  )
6530
- }), Od = (e) => !!(e.projectId || e.sectionId || e.parentId), Ys = (e) => Object.keys(e).length > 0, _d = ["remove", "no date"], Pd = ["remove", "no date", "no deadline"], Ud = "no date", st = os.TASKS_PER_OPERATION, qt = {
6555
+ }), Od = (e) => !!(e.projectId || e.sectionId || e.parentId), Gs = (e) => Object.keys(e).length > 0, _d = ["remove", "no date"], Pd = ["remove", "no date", "no deadline"], Ud = "no date", st = os.TASKS_PER_OPERATION, qt = {
6531
6556
  tasks: s.array(Ed).min(1).max(st).describe(`The tasks to update (max ${st}).`)
6532
6557
  }, Rd = {
6533
6558
  tasks: s.array(K).describe("The updated tasks."),
@@ -6549,7 +6574,13 @@ const Ed = s.object({
6549
6574
  description: "Update existing tasks including content, dates, priorities, and assignments. Send only the fields that change.",
6550
6575
  parameters: qt,
6551
6576
  outputSchema: Rd,
6552
- annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6577
+ // Open world: assigning a task notifies the new assignee.
6578
+ annotations: {
6579
+ readOnlyHint: !1,
6580
+ destructiveHint: !0,
6581
+ idempotentHint: !1,
6582
+ openWorldHint: !0
6583
+ },
6553
6584
  async execute(e, t) {
6554
6585
  const { tasks: o } = s.object(qt).parse(e), r = o.map(() => ({ kind: "skipped" })), n = (w, b) => {
6555
6586
  r[w] = { kind: "failed", error: b };
@@ -6565,7 +6596,7 @@ const Ed = s.object({
6565
6596
  const S = a[w]?.index ?? w;
6566
6597
  b.status === "fulfilled" ? u.push(b.value) : i(S, b.reason);
6567
6598
  }
6568
- const l = await Gs({
6599
+ const l = await qs({
6569
6600
  client: t,
6570
6601
  ids: [
6571
6602
  ...new Set(
@@ -6590,20 +6621,20 @@ const Ed = s.object({
6590
6621
  Wd({
6591
6622
  client: t,
6592
6623
  items: b,
6593
- onUpdated: (S, D) => {
6594
- r[S.index] = { kind: "updated", task: D };
6624
+ onUpdated: (S, A) => {
6625
+ r[S.index] = { kind: "updated", task: A };
6595
6626
  },
6596
- onFailed: (S, D) => {
6627
+ onFailed: (S, A) => {
6597
6628
  const E = h.get(S.index);
6598
6629
  if (E && "task" in E) {
6599
6630
  r[S.index] = {
6600
6631
  kind: "partial",
6601
6632
  task: E.task,
6602
- error: `Move applied; field update failed: ${N(D)}`
6633
+ error: `Move applied; field update failed: ${N(A)}`
6603
6634
  };
6604
6635
  return;
6605
6636
  }
6606
- i(S.index, D);
6637
+ i(S.index, A);
6607
6638
  }
6608
6639
  })
6609
6640
  );
@@ -6615,9 +6646,9 @@ const Ed = s.object({
6615
6646
  onResolved: (w) => {
6616
6647
  const b = [];
6617
6648
  for (const { item: S } of w) {
6618
- const D = h.get(S.index);
6619
- if (D && "error" in D) {
6620
- n(S.index, D.error), S.failed = !0;
6649
+ const A = h.get(S.index);
6650
+ if (A && "error" in A) {
6651
+ n(S.index, A.error), S.failed = !0;
6621
6652
  continue;
6622
6653
  }
6623
6654
  b.push(S);
@@ -6626,17 +6657,17 @@ const Ed = s.object({
6626
6657
  }
6627
6658
  }), await Promise.all(m);
6628
6659
  for (const w of u) {
6629
- if (w.failed || Ys(w.updateArgs))
6660
+ if (w.failed || Gs(w.updateArgs))
6630
6661
  continue;
6631
6662
  const b = h.get(w.index);
6632
6663
  b && "task" in b && (r[w.index] = { kind: "updated", task: b.task });
6633
6664
  }
6634
- const { updatedTasks: T, failures: C, skippedCount: A } = Nd({ tasks: o, outcomes: r }), k = u.filter((w) => w.redundantMoveSkipped).length, I = T.map(U);
6665
+ const { updatedTasks: T, failures: C, skippedCount: D } = Nd({ tasks: o, outcomes: r }), k = u.filter((w) => w.redundantMoveSkipped).length, I = T.map(U);
6635
6666
  return re(g.UPDATE_TASKS, o.length, C), {
6636
6667
  textContent: Kd({
6637
6668
  tasks: I,
6638
6669
  failures: C,
6639
- skippedCount: A,
6670
+ skippedCount: D,
6640
6671
  redundantMovesSkipped: k
6641
6672
  }),
6642
6673
  structuredContent: {
@@ -6646,7 +6677,7 @@ const Ed = s.object({
6646
6677
  failures: C,
6647
6678
  appliedOperations: {
6648
6679
  updateCount: I.length,
6649
- skippedCount: A,
6680
+ skippedCount: D,
6650
6681
  failureCount: C.length,
6651
6682
  redundantMovesSkipped: k
6652
6683
  }
@@ -6680,7 +6711,7 @@ async function Md(e, t) {
6680
6711
  return { error: o };
6681
6712
  }
6682
6713
  }
6683
- async function Gs({
6714
+ async function qs({
6684
6715
  client: e,
6685
6716
  ids: t
6686
6717
  }) {
@@ -6708,10 +6739,10 @@ async function Fd({
6708
6739
  return;
6709
6740
  const n = /* @__PURE__ */ new Map();
6710
6741
  for (const c of t) {
6711
- const d = Dd(c.move), u = n.get(d);
6742
+ const d = Ad(c.move), u = n.get(d);
6712
6743
  u ? u.push(c) : n.set(d, [c]);
6713
6744
  }
6714
- const i = Ko(e), a = [];
6745
+ const i = Yo(e), a = [];
6715
6746
  for (const c of n.values()) {
6716
6747
  const d = [...new Set(c.map(({ item: p }) => p.id))], u = c[0]?.move, l = c.length === 1 ? c[0] : void 0;
6717
6748
  try {
@@ -6749,12 +6780,12 @@ async function Hd({
6749
6780
  unresolved: t,
6750
6781
  results: o
6751
6782
  }) {
6752
- const r = [...new Set(t.flatMap(({ group: i }) => i.map(({ item: a }) => a.id)))], n = await Gs({ client: e, ids: r });
6783
+ const r = [...new Set(t.flatMap(({ group: i }) => i.map(({ item: a }) => a.id)))], n = await qs({ client: e, ids: r });
6753
6784
  for (const { group: i, destination: a, error: c } of t) {
6754
6785
  const d = c === void 0 ? "Task not returned by the move" : N(c);
6755
6786
  for (const { item: u } of i) {
6756
6787
  const l = n.get(u.id);
6757
- if (l && Ks(l, a)) {
6788
+ if (l && Ys(l, a)) {
6758
6789
  o.set(u.index, { task: l });
6759
6790
  continue;
6760
6791
  }
@@ -6768,9 +6799,9 @@ async function Wd({
6768
6799
  onUpdated: o,
6769
6800
  onFailed: r
6770
6801
  }) {
6771
- const n = Yo(e);
6802
+ const n = Go(e);
6772
6803
  await Promise.all(
6773
- t.filter((i) => Ys(i.updateArgs)).map(async (i) => {
6804
+ t.filter((i) => Gs(i.updateArgs)).map(async (i) => {
6774
6805
  try {
6775
6806
  const a = await n(
6776
6807
  () => P(() => e.updateTask(i.id, i.updateArgs))
@@ -6815,8 +6846,8 @@ async function Bd({
6815
6846
  Ud
6816
6847
  );
6817
6848
  C !== void 0 && (T = { ...T, dueString: C });
6818
- const A = Vt(m, Pd, null);
6819
- if (A !== void 0 && (T = { ...T, deadlineDate: A }), u)
6849
+ const D = Vt(m, Pd, null);
6850
+ if (D !== void 0 && (T = { ...T, deadlineDate: D }), u)
6820
6851
  try {
6821
6852
  const { amount: k, unit: I } = bs(u);
6822
6853
  T = {
@@ -6931,11 +6962,11 @@ function el(e) {
6931
6962
  return !1;
6932
6963
  }
6933
6964
  }
6934
- function qs(e) {
6965
+ function Vs(e) {
6935
6966
  return el(e) ? e : "UTC";
6936
6967
  }
6937
6968
  function tl(e, t) {
6938
- const o = qs(t);
6969
+ const o = Vs(t);
6939
6970
  return e.toLocaleString("en-US", {
6940
6971
  timeZone: o,
6941
6972
  year: "numeric",
@@ -6948,7 +6979,7 @@ function tl(e, t) {
6948
6979
  });
6949
6980
  }
6950
6981
  async function sl(e) {
6951
- const t = await e.getUser(), o = t.tzInfo?.timezone ?? "UTC", r = qs(o), n = /* @__PURE__ */ new Date(), i = tl(n, r), a = t.startDay ?? 1, c = Zd(a), d = Vd(t), u = new Date(n.toLocaleString("en-US", { timeZone: r })), l = Jd(u, a), p = Xd(l), h = Qd(u), y = [
6982
+ const t = await e.getUser(), o = t.tzInfo?.timezone ?? "UTC", r = Vs(o), n = /* @__PURE__ */ new Date(), i = tl(n, r), a = t.startDay ?? 1, c = Zd(a), d = Vd(t), u = new Date(n.toLocaleString("en-US", { timeZone: r })), l = Jd(u, a), p = Xd(l), h = Qd(u), y = [
6952
6983
  "# User Information",
6953
6984
  "",
6954
6985
  `**User ID:** ${t.id}`,
@@ -7101,7 +7132,7 @@ const ul = {
7101
7132
  };
7102
7133
  }
7103
7134
  }, hl = {
7104
- ...Ia,
7135
+ ...Sa,
7105
7136
  _meta: {
7106
7137
  ui: {
7107
7138
  resourceUri: Ke
@@ -7109,67 +7140,67 @@ const ul = {
7109
7140
  }
7110
7141
  }, ml = {
7111
7142
  // Task management tools
7112
- addTasks: si,
7113
- completeTasks: ui,
7143
+ addTasks: oi,
7144
+ completeTasks: pi,
7114
7145
  uncompleteTasks: Hc,
7115
7146
  updateTasks: Ld,
7116
7147
  rescheduleTasks: Pc,
7117
- findTasks: xa,
7148
+ findTasks: Ea,
7118
7149
  findTasksByDate: hl,
7119
- findCompletedTasks: Ji,
7150
+ findCompletedTasks: Xi,
7120
7151
  // Project management tools
7121
- addProjects: Nn,
7152
+ addProjects: Mn,
7122
7153
  updateProjects: pd,
7123
- findProjects: la,
7154
+ findProjects: ua,
7124
7155
  projectManagement: Sc,
7125
7156
  projectMove: $c,
7126
7157
  // Section management tools
7127
- addSections: Xn,
7158
+ addSections: Qn,
7128
7159
  updateSections: Cd,
7129
- findSections: Ta,
7160
+ findSections: ka,
7130
7161
  // Comment management tools
7131
- addComments: pn,
7132
- findComments: Hi,
7162
+ addComments: hn,
7163
+ findComments: Wi,
7133
7164
  updateComments: Yc,
7134
7165
  // Reminder management tools
7135
- addReminders: Yn,
7136
- findReminders: ma,
7166
+ addReminders: Gn,
7167
+ findReminders: fa,
7137
7168
  updateReminders: wd,
7138
7169
  // Attachment tools
7139
7170
  viewAttachment: pl,
7140
7171
  // Label management tools
7141
- addLabels: jn,
7172
+ addLabels: $n,
7142
7173
  updateLabels: id,
7143
- findLabels: ea,
7174
+ findLabels: ta,
7144
7175
  // Filter management tools
7145
- findFilters: gn,
7146
- addFilters: vn,
7176
+ findFilters: yn,
7177
+ addFilters: In,
7147
7178
  updateFilters: Xc,
7148
7179
  // Activity and audit tools
7149
- findActivity: Pi,
7150
- getProductivityStats: Ba,
7180
+ findActivity: Ui,
7181
+ getProductivityStats: za,
7151
7182
  // Health and insights tools
7152
- getProjectHealth: ec,
7153
- getProjectActivityStats: qa,
7154
- analyzeProjectHealth: ci,
7155
- getWorkspaceInsights: rc,
7183
+ getProjectHealth: tc,
7184
+ getProjectActivityStats: Va,
7185
+ analyzeProjectHealth: di,
7186
+ getWorkspaceInsights: nc,
7156
7187
  // General tools
7157
- getOverview: Fa,
7158
- deleteObject: fi,
7159
- fetchObject: $i,
7188
+ getOverview: Ha,
7189
+ deleteObject: bi,
7190
+ fetchObject: Ai,
7160
7191
  reorderObjects: xc,
7161
7192
  userInfo: ol,
7162
7193
  // Assignment and collaboration tools
7163
- findProjectCollaborators: ra,
7194
+ findProjectCollaborators: na,
7164
7195
  manageAssignments: wc,
7165
7196
  // Template tools
7166
- exportProjectTemplate: yi,
7167
- importProjectTemplate: dc,
7197
+ exportProjectTemplate: Ti,
7198
+ importProjectTemplate: lc,
7168
7199
  // Workspace tools
7169
- listWorkspaces: fc,
7200
+ listWorkspaces: bc,
7170
7201
  // OpenAI MCP tools
7171
7202
  search: Nc,
7172
- fetch: xi
7203
+ fetch: Ei
7173
7204
  }, fl = Object.values(ml), bl = `
7174
7205
  ## Todoist Task and Project Management Tools
7175
7206
 
@@ -7233,7 +7264,7 @@ function xl({
7233
7264
  baseUrl: t,
7234
7265
  features: o = []
7235
7266
  }) {
7236
- const r = new Js(
7267
+ const r = new Xs(
7237
7268
  { name: "todoist-mcp-server", version: at },
7238
7269
  {
7239
7270
  capabilities: {
@@ -7249,8 +7280,8 @@ function xl({
7249
7280
  "resources/templates/list": Te
7250
7281
  }
7251
7282
  }
7252
- ), n = ir(e, { baseUrl: t });
7253
- wo(r);
7283
+ ), n = ar(e, { baseUrl: t });
7284
+ vo(r);
7254
7285
  const i = { server: r, client: n, features: o };
7255
7286
  for (const a of fl)
7256
7287
  Dr({ tool: a, ...i });
@@ -7265,15 +7296,15 @@ function xl({
7265
7296
  ), r;
7266
7297
  }
7267
7298
  export {
7268
- pr as $,
7269
- Fa as A,
7270
- Ba as B,
7271
- qa as C,
7272
- ec as D,
7273
- rc as E,
7274
- Al as F,
7275
- dc as G,
7276
- fc as H,
7299
+ hr as $,
7300
+ Ha as A,
7301
+ za as B,
7302
+ Va as C,
7303
+ tc as D,
7304
+ nc as E,
7305
+ Dl as F,
7306
+ lc as G,
7307
+ bc as H,
7277
7308
  wc as I,
7278
7309
  Sc as J,
7279
7310
  $c as K,
@@ -7291,32 +7322,32 @@ export {
7291
7322
  Ld as W,
7292
7323
  ol as X,
7293
7324
  pl as Y,
7294
- ir as Z,
7295
- Xo as _,
7296
- pn as a,
7297
- vn as b,
7298
- jn as c,
7299
- Nn as d,
7300
- Yn as e,
7301
- Xn as f,
7325
+ ar as Z,
7326
+ Qo as _,
7327
+ hn as a,
7328
+ In as b,
7329
+ $n as c,
7330
+ Mn as d,
7331
+ Gn as e,
7332
+ Qn as f,
7302
7333
  xl as g,
7303
- si as h,
7304
- ci as i,
7305
- ui as j,
7306
- fi as k,
7307
- yi as l,
7308
- xi as m,
7309
- $i as n,
7310
- Pi as o,
7311
- Hi as p,
7312
- Ji as q,
7313
- gn as r,
7314
- ea as s,
7334
+ oi as h,
7335
+ di as i,
7336
+ pi as j,
7337
+ bi as k,
7338
+ Ti as l,
7339
+ Ei as m,
7340
+ Ai as n,
7341
+ Ui as o,
7342
+ Wi as p,
7343
+ Xi as q,
7344
+ yn as r,
7345
+ ta as s,
7315
7346
  ml as t,
7316
- ra as u,
7317
- la as v,
7318
- ma as w,
7319
- Ta as x,
7320
- xa as y,
7321
- Ia as z
7347
+ na as u,
7348
+ ua as v,
7349
+ fa as w,
7350
+ ka as x,
7351
+ Ea as y,
7352
+ Sa as z
7322
7353
  };