@doist/todoist-mcp 10.1.6 → 10.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/index.d.ts +24 -2
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +3 -3
  4. package/dist/main-http.js +2 -2
  5. package/dist/main.js +1 -1
  6. package/dist/{mcp-server-CBoARwsO.js → mcp-server-DdZVyZTr.js} +230 -199
  7. package/dist/mcp-server.d.ts +1 -1
  8. package/dist/mcp-server.d.ts.map +1 -1
  9. package/dist/{require-valid-todoist-token-C8lrnzrA.js → require-valid-todoist-token-Bx_T4J5L.js} +1 -1
  10. package/dist/tool-helpers.d.ts +1 -0
  11. package/dist/tool-helpers.d.ts.map +1 -1
  12. package/dist/tools/add-projects.d.ts +4 -0
  13. package/dist/tools/add-projects.d.ts.map +1 -1
  14. package/dist/tools/add-sections.d.ts +4 -0
  15. package/dist/tools/add-sections.d.ts.map +1 -1
  16. package/dist/tools/fetch-object.d.ts +4 -0
  17. package/dist/tools/fetch-object.d.ts.map +1 -1
  18. package/dist/tools/fetch.d.ts.map +1 -1
  19. package/dist/tools/find-projects.d.ts +2 -0
  20. package/dist/tools/find-projects.d.ts.map +1 -1
  21. package/dist/tools/find-sections.d.ts +2 -0
  22. package/dist/tools/find-sections.d.ts.map +1 -1
  23. package/dist/tools/get-overview.d.ts +2 -0
  24. package/dist/tools/get-overview.d.ts.map +1 -1
  25. package/dist/tools/project-management.d.ts +2 -0
  26. package/dist/tools/project-management.d.ts.map +1 -1
  27. package/dist/tools/project-move.d.ts +2 -0
  28. package/dist/tools/project-move.d.ts.map +1 -1
  29. package/dist/tools/update-projects.d.ts +4 -0
  30. package/dist/tools/update-projects.d.ts.map +1 -1
  31. package/dist/tools/update-sections.d.ts +6 -2
  32. package/dist/tools/update-sections.d.ts.map +1 -1
  33. package/dist/utils/output-schemas.d.ts +7 -3
  34. package/dist/utils/output-schemas.d.ts.map +1 -1
  35. package/dist/utils/test-helpers.d.ts.map +1 -1
  36. package/package.json +2 -2
@@ -4,10 +4,10 @@ import { readFileSync as ls } from "node:fs";
4
4
  import { dirname as xt, join as Ne } from "node:path";
5
5
  import { fileURLToPath as us } from "node:url";
6
6
  import { registerAppResource as ps, RESOURCE_MIME_TYPE as At, registerAppTool as ms } from "@modelcontextprotocol/ext-apps/server";
7
- import Z, { ZodError as hs, z as s } from "zod";
7
+ import Q, { ZodError as hs, z as s } from "zod";
8
8
  import { AsyncLocalStorage as fs } from "node:async_hooks";
9
9
  import { createRequire as bs } from "node:module";
10
- import { TodoistApi as gs, isWorkspaceProject as ke, isPersonalProject as ae, colors as Me, LOCATION_TRIGGERS as Et, REMINDER_TYPES as ys, createCommand as Y, REMINDER_DELIVERY_SERVICES as ks, HEALTH_STATUSES as Ve, getTaskUrl as Ot, getProjectUrl as Ut, GOAL_OWNER_TYPES as Ts, WORKSPACE_ROLES as ws, WORKSPACE_PLANS as Is } from "@doist/todoist-sdk";
10
+ import { TodoistApi as gs, isWorkspaceProject as ke, isPersonalProject as ie, colors as Me, LOCATION_TRIGGERS as Et, REMINDER_TYPES as ys, createCommand as Y, REMINDER_DELIVERY_SERVICES as ks, HEALTH_STATUSES as Ve, getTaskUrl as Ot, getProjectUrl as Ut, GOAL_OWNER_TYPES as Ts, WORKSPACE_ROLES as ws, WORKSPACE_PLANS as Is } from "@doist/todoist-sdk";
11
11
  import { addDays as Fe, formatISO as ct } from "date-fns";
12
12
  const dt = xt(us(import.meta.url)), vs = [
13
13
  Ne(dt, "task-list", "index.html"),
@@ -28,7 +28,7 @@ function js() {
28
28
  }
29
29
  return console.error("Failed to load task list app HTML from any known path:", e), Ss;
30
30
  }
31
- const _t = js(), Cs = ds("sha256").update(_t).digest("hex").slice(0, 12), He = `ui://todoist/task-list@${Cs}`, $s = "ui://todoist/task-list@{hash}", We = "Interactive task list widget", Ds = "https://ai.todoist.net", Ge = {
31
+ const Pt = js(), Cs = ds("sha256").update(Pt).digest("hex").slice(0, 12), He = `ui://todoist/task-list@${Cs}`, $s = "ui://todoist/task-list@{hash}", We = "Interactive task list widget", Ds = "https://ai.todoist.net", Ge = {
32
32
  ui: {
33
33
  prefersBorder: !0,
34
34
  csp: {
@@ -51,7 +51,7 @@ function lt(e) {
51
51
  {
52
52
  uri: e,
53
53
  mimeType: At,
54
- text: _t,
54
+ text: Pt,
55
55
  _meta: Ge
56
56
  }
57
57
  ]
@@ -101,7 +101,7 @@ function T(e) {
101
101
  if (typeof e == "number" || typeof e == "boolean")
102
102
  return String(e);
103
103
  }
104
- function Q(e) {
104
+ function ee(e) {
105
105
  const t = O(e);
106
106
  return t !== void 0 ? t : T(e);
107
107
  }
@@ -111,7 +111,7 @@ function As(e) {
111
111
  "$1: [REDACTED]"
112
112
  ).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]");
113
113
  }
114
- function _(e, t = 220) {
114
+ function P(e, t = 220) {
115
115
  const o = As(e).replace(/\s+/g, " ").trim();
116
116
  return o.length <= t ? o : `${o.slice(0, t - 3)}...`;
117
117
  }
@@ -129,10 +129,10 @@ function Ee(e) {
129
129
  function B(e) {
130
130
  const t = T(e);
131
131
  if (t)
132
- return _(t);
132
+ return P(t);
133
133
  if (Array.isArray(e)) {
134
134
  const n = e.map((a) => q(a) ? T(a.message) || T(a.error) : T(a)).filter((a) => !!a);
135
- return n.length > 0 ? _(n.slice(0, 2).join("; ")) : void 0;
135
+ return n.length > 0 ? P(n.slice(0, 2).join("; ")) : void 0;
136
136
  }
137
137
  if (!q(e))
138
138
  return;
@@ -144,20 +144,20 @@ function B(e) {
144
144
  T(e.description)
145
145
  );
146
146
  if (o)
147
- return _(o);
147
+ return P(o);
148
148
  const r = [];
149
149
  for (const [n, a] of Object.entries(e)) {
150
150
  const i = T(a);
151
151
  if (i && (r.push(`${n}: ${i}`), r.length >= 2))
152
152
  break;
153
153
  }
154
- return r.length > 0 ? _(r.join("; ")) : void 0;
154
+ return r.length > 0 ? P(r.join("; ")) : void 0;
155
155
  }
156
156
  function Es(e) {
157
157
  if (!e)
158
158
  return [];
159
159
  const t = /* @__PURE__ */ new Set(), o = (i) => {
160
- i && t.add(_(i, 120));
160
+ i && t.add(P(i, 120));
161
161
  }, r = L(
162
162
  T(e.field),
163
163
  T(e.parameter),
@@ -230,10 +230,10 @@ const Os = [
230
230
  function Us(e) {
231
231
  return e ? Os.some((t) => e[t] !== void 0) : !1;
232
232
  }
233
- function _s(e, t) {
233
+ function Ps(e, t) {
234
234
  return e === 401 || e === 403 ? "Verify your API token and access permissions, then retry." : e === 404 ? "Confirm the referenced IDs exist and are accessible, then retry." : e === 429 ? "Rate limit reached. Wait briefly and retry." : e !== void 0 && e >= 500 ? "Todoist API may be temporarily unavailable. Retry shortly." : t ? "Fix the field hints above and retry." : e === 400 || e === 422 ? "Check parameter values and formats, then retry." : "Check the request parameters and retry.";
235
235
  }
236
- function Ps(e) {
236
+ function _s(e) {
237
237
  const t = q(e) ? e : void 0, o = e instanceof Error && q(e.cause) ? e.cause : void 0, r = Be(t?.response, o?.response), n = Be(
238
238
  t?.responseData,
239
239
  r?.data,
@@ -254,12 +254,12 @@ function Ps(e) {
254
254
  Ee(T(o?.message)),
255
255
  Ee(typeof e == "string" ? e : void 0)
256
256
  ), i = L(
257
- Q(n?.errorCode),
258
- Q(n?.error_code),
259
- Q(n?.code),
260
- Q(t?.errorCode),
261
- Q(t?.error_code),
262
- Q(t?.code)
257
+ ee(n?.errorCode),
258
+ ee(n?.error_code),
259
+ ee(n?.code),
260
+ ee(t?.errorCode),
261
+ ee(t?.error_code),
262
+ ee(t?.code)
263
263
  ), c = L(
264
264
  T(n?.errorTag),
265
265
  T(n?.error_tag),
@@ -285,9 +285,9 @@ function Ps(e) {
285
285
  return a !== void 0 || Us(n) || c !== void 0 || i !== void 0 || (l ? ut(l) : !1) ? {
286
286
  statusCode: a,
287
287
  code: i,
288
- tag: c ? _(c, 80) : void 0,
289
- message: l ? _(l) : void 0,
290
- details: u ? _(u) : void 0,
288
+ tag: c ? P(c, 80) : void 0,
289
+ message: l ? P(l) : void 0,
290
+ details: u ? P(u) : void 0,
291
291
  fieldHints: p
292
292
  } : null;
293
293
  }
@@ -297,21 +297,21 @@ function Rs(e) {
297
297
  const o = [
298
298
  t.length > 0 ? `Todoist API request failed (${t.join(", ")}).` : "Todoist API request failed."
299
299
  ];
300
- return e.message && o.push(`Message: ${e.message}`), e.details && e.details !== e.message && o.push(`Details: ${e.details}`), e.fieldHints.length > 0 && o.push(`Field hints: ${e.fieldHints.join("; ")}`), o.push(`Try next: ${_s(e.statusCode, e.fieldHints.length > 0)}`), o.join(`
300
+ return e.message && o.push(`Message: ${e.message}`), e.details && e.details !== e.message && o.push(`Details: ${e.details}`), e.fieldHints.length > 0 && o.push(`Field hints: ${e.fieldHints.join("; ")}`), o.push(`Try next: ${Ps(e.statusCode, e.fieldHints.length > 0)}`), o.join(`
301
301
  `);
302
302
  }
303
303
  function Ls(e) {
304
- return e instanceof Error ? _(e.message) : typeof e == "string" ? _(e) : "An unknown error occurred";
304
+ return e instanceof Error ? P(e.message) : typeof e == "string" ? P(e) : "An unknown error occurred";
305
305
  }
306
306
  function Ns(e) {
307
307
  if (e instanceof hs)
308
308
  return e.message;
309
- const t = Ps(e);
309
+ const t = _s(e);
310
310
  return t ? Rs(t) : Ls(e);
311
311
  }
312
- const Ms = "10.1.6", Fs = {
312
+ const Ms = "10.3.0", Fs = {
313
313
  version: Ms
314
- }, Hs = "todoist-mcp", Je = Fs.version, Pt = new fs(), pt = bs(import.meta.url);
314
+ }, Hs = "todoist-mcp", Je = Fs.version, _t = new fs(), pt = bs(import.meta.url);
315
315
  let ye;
316
316
  const Ws = async () => {
317
317
  const e = pt.resolve("@doist/todoist-sdk"), t = Ne(xt(e), "transport", "http-dispatcher.js");
@@ -325,14 +325,14 @@ function Rt(e) {
325
325
  return e.trim().toLowerCase();
326
326
  }
327
327
  function Ys(e, t) {
328
- return Pt.run(Rt(e), t);
328
+ return _t.run(Rt(e), t);
329
329
  }
330
330
  function qs({
331
331
  label: e,
332
332
  platform: t = "mcp",
333
333
  sessionId: o = Le()
334
334
  } = {}) {
335
- const r = e ? Rt(e) : Pt.getStore();
335
+ const r = e ? Rt(e) : _t.getStore();
336
336
  return {
337
337
  "User-Agent": Bs(),
338
338
  "doist-platform": t,
@@ -800,7 +800,7 @@ function vo(e) {
800
800
  ]
801
801
  };
802
802
  }
803
- const pe = {
803
+ const me = {
804
804
  name: "productivity-analysis",
805
805
  title: "Productivity Analysis",
806
806
  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.",
@@ -894,7 +894,7 @@ function Nt(e) {
894
894
  function Co(e) {
895
895
  return { 4: "p1", 3: "p2", 2: "p3", 1: "p4" }[e];
896
896
  }
897
- const E = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ new Map(), Ue = 300 * 1e3, $o = "me";
897
+ const E = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Map(), Ue = 300 * 1e3, $o = "me";
898
898
  class Do {
899
899
  /**
900
900
  * Resolve a user name or ID to a user ID by looking up collaborators across all shared projects.
@@ -979,12 +979,12 @@ class Do {
979
979
  * Get collaborators for a specific project
980
980
  */
981
981
  async getProjectCollaborators(t, o) {
982
- const r = `project_${o}`, n = ee.get(r);
982
+ const r = `project_${o}`, n = te.get(r);
983
983
  if (n && Date.now() - n.timestamp < Ue)
984
984
  return n.result;
985
985
  try {
986
986
  const a = await t.getProjectCollaborators(o), c = (Array.isArray(a) ? a : a.results || []).filter((d) => d?.id && d.name && d.email);
987
- return ee.set(r, {
987
+ return te.set(r, {
988
988
  result: c,
989
989
  timestamp: Date.now()
990
990
  }), c;
@@ -996,7 +996,7 @@ class Do {
996
996
  * Get all collaborators from all shared projects, deduplicated by user ID.
997
997
  */
998
998
  async getAllCollaborators(t) {
999
- const o = "all_collaborators", r = ee.get(o);
999
+ const o = "all_collaborators", r = te.get(o);
1000
1000
  if (r && Date.now() - r.timestamp < Ue)
1001
1001
  return r.result;
1002
1002
  try {
@@ -1006,7 +1006,7 @@ class Do {
1006
1006
  })).filter((u) => u.isShared);
1007
1007
  if (a.length === 0) {
1008
1008
  const u = [];
1009
- return ee.set(o, { result: u, timestamp: Date.now() }), u;
1009
+ return te.set(o, { result: u, timestamp: Date.now() }), u;
1010
1010
  }
1011
1011
  const i = [], c = /* @__PURE__ */ new Set(), d = a.map(
1012
1012
  (u) => this.getProjectCollaborators(t, u.id)
@@ -1015,7 +1015,7 @@ class Do {
1015
1015
  if (u.status === "fulfilled")
1016
1016
  for (const p of u.value)
1017
1017
  p && !c.has(p.id) && (i.push(p), c.add(p.id));
1018
- return ee.set(o, {
1018
+ return te.set(o, {
1019
1019
  result: i,
1020
1020
  timestamp: Date.now()
1021
1021
  }), i;
@@ -1027,7 +1027,7 @@ class Do {
1027
1027
  * Clear all caches - useful for testing
1028
1028
  */
1029
1029
  clearCache() {
1030
- E.clear(), ee.clear();
1030
+ E.clear(), te.clear();
1031
1031
  }
1032
1032
  }
1033
1033
  const W = new Do();
@@ -1045,7 +1045,7 @@ async function Qe(e, t) {
1045
1045
  );
1046
1046
  return { userId: o.userId, email: o.email };
1047
1047
  }
1048
- function ne(e, t) {
1048
+ function ae(e, t) {
1049
1049
  return t.length === 0 ? e : e.length === 0 ? t : `${e} & ${t}`;
1050
1050
  }
1051
1051
  function Ft({
@@ -1063,12 +1063,12 @@ function Ao({
1063
1063
  }) {
1064
1064
  return t ? e.filter((n) => n.responsibleUid === t) : r === "unassignedOrMe" ? e.filter((n) => !n.responsibleUid || n.responsibleUid === o) : r === "assigned" ? e.filter((n) => n.responsibleUid && n.responsibleUid !== o) : e;
1065
1065
  }
1066
- function he(e) {
1066
+ function fe(e) {
1067
1067
  return e?.toLowerCase() === "inbox";
1068
1068
  }
1069
1069
  async function K(e) {
1070
1070
  const { projectId: t, user: o, client: r } = e;
1071
- if (!he(t))
1071
+ if (!fe(t))
1072
1072
  return t;
1073
1073
  const n = o || (r ? await r.getUser() : null);
1074
1074
  if (!n)
@@ -1120,7 +1120,7 @@ async function Uo(e, t, o) {
1120
1120
  limit: $.SECTIONS_MAX
1121
1121
  });
1122
1122
  }
1123
- function _o(e, t, o, r) {
1123
+ function Po(e, t, o, r) {
1124
1124
  const n = [t, o, r].filter(Boolean);
1125
1125
  if (n.length > 1)
1126
1126
  throw new Error(
@@ -1135,7 +1135,7 @@ function _o(e, t, o, r) {
1135
1135
  if (r) return { parentId: r };
1136
1136
  throw new Error("Unexpected error: No valid move parameter found");
1137
1137
  }
1138
- function P(e) {
1138
+ function _(e) {
1139
1139
  return {
1140
1140
  id: e.id,
1141
1141
  content: e.content,
@@ -1159,11 +1159,12 @@ function V(e) {
1159
1159
  return {
1160
1160
  id: e.id,
1161
1161
  name: e.name,
1162
+ description: e.description,
1162
1163
  color: e.color,
1163
1164
  isFavorite: e.isFavorite,
1164
1165
  isShared: e.isShared,
1165
- parentId: ae(e) ? e.parentId ?? void 0 : void 0,
1166
- inboxProject: ae(e) ? e.inboxProject ?? !1 : !1,
1166
+ parentId: ie(e) ? e.parentId ?? void 0 : void 0,
1167
+ inboxProject: ie(e) ? e.inboxProject ?? !1 : !1,
1167
1168
  viewStyle: e.viewStyle,
1168
1169
  workspaceId: ke(e) ? e.workspaceId : void 0,
1169
1170
  folderId: ke(e) ? e.folderId ?? void 0 : void 0,
@@ -1207,7 +1208,7 @@ function Ie(e) {
1207
1208
  progress: e.progress
1208
1209
  };
1209
1210
  }
1210
- function Po(e) {
1211
+ function _o(e) {
1211
1212
  return {
1212
1213
  id: e.id ?? void 0,
1213
1214
  objectType: e.objectType,
@@ -1220,12 +1221,12 @@ function Po(e) {
1220
1221
  extraData: e.extraData ?? void 0
1221
1222
  };
1222
1223
  }
1223
- const Ro = Z.object({
1224
- httpStatusCode: Z.number(),
1225
- responseData: Z.object({
1226
- error: Z.string(),
1227
- errorCode: Z.number(),
1228
- errorTag: Z.string()
1224
+ const Ro = Q.object({
1225
+ httpStatusCode: Q.number(),
1226
+ responseData: Q.object({
1227
+ error: Q.string(),
1228
+ errorCode: Q.number(),
1229
+ errorTag: Q.string()
1229
1230
  })
1230
1231
  });
1231
1232
  async function tt({
@@ -1236,7 +1237,7 @@ async function tt({
1236
1237
  }) {
1237
1238
  try {
1238
1239
  const { results: n, nextCursor: a } = await e.getTasksByFilter({ query: t, cursor: r, limit: o });
1239
- return { tasks: n.map(P), nextCursor: a };
1240
+ return { tasks: n.map(_), nextCursor: a };
1240
1241
  } catch (n) {
1241
1242
  const a = Ro.safeParse(n);
1242
1243
  if (!a.success)
@@ -1256,7 +1257,7 @@ function ht(e) {
1256
1257
  timezone: e.timezone ?? void 0
1257
1258
  };
1258
1259
  }
1259
- function me(e) {
1260
+ function he(e) {
1260
1261
  const t = {
1261
1262
  id: e.id,
1262
1263
  taskId: e.itemId,
@@ -1299,9 +1300,9 @@ function Lo(e) {
1299
1300
  const t = e.toLowerCase();
1300
1301
  return (Me.find((r) => r.key === t) ?? Me.find((r) => r.displayName.toLowerCase() === t))?.key;
1301
1302
  }
1302
- const No = `Color for the entity. Accepts a color key (e.g. "berry_red") or display name (e.g. "Berry Red"). Valid colors: ${ve.join(", ")}. Unrecognized colors are omitted and charcoal will be used as the default.`, ce = s.preprocess(Lo, s.enum(ve).optional()).describe(No);
1303
+ const No = `Color for the entity. Accepts a color key (e.g. "berry_red") or display name (e.g. "Berry Red"). Valid colors: ${ve.join(", ")}. Unrecognized colors are omitted and charcoal will be used as the default.`, de = s.preprocess(Lo, s.enum(ve).optional()).describe(No);
1303
1304
  s.enum(ve).describe("The color key of the entity.");
1304
- const de = s.enum(ve).optional().catch(void 0).describe("The color key of the entity."), J = s.object({
1305
+ const le = s.enum(ve).optional().catch(void 0).describe("The color key of the entity."), J = s.object({
1305
1306
  id: s.string().describe("The unique ID of the task."),
1306
1307
  content: s.string().describe("The task title/content."),
1307
1308
  description: s.string().describe("The task description."),
@@ -1321,10 +1322,11 @@ const de = s.enum(ve).optional().catch(void 0).describe("The color key of the en
1321
1322
  assignedByUid: s.string().optional().describe("The UID of the user who assigned this task."),
1322
1323
  checked: s.boolean().describe("Whether the task is checked/completed."),
1323
1324
  completedAt: s.string().optional().describe("When the task was completed (ISO 8601 format).")
1324
- }), le = s.object({
1325
+ }), ue = s.object({
1325
1326
  id: s.string().describe("The unique ID of the project."),
1326
1327
  name: s.string().describe("The name of the project."),
1327
- color: de,
1328
+ description: s.string().describe("The description of the project (empty string if none)."),
1329
+ color: le,
1328
1330
  isFavorite: s.boolean().describe("Whether the project is marked as favorite."),
1329
1331
  isShared: s.boolean().describe("Whether the project is shared."),
1330
1332
  parentId: s.string().optional().describe("The ID of the parent project (for sub-projects)."),
@@ -1335,12 +1337,13 @@ const de = s.enum(ve).optional().catch(void 0).describe("The color key of the en
1335
1337
  ),
1336
1338
  folderId: s.string().optional().describe("The ID of the folder this project belongs to (workspace projects only)."),
1337
1339
  childOrder: s.number().describe("The ordering index of the project among its siblings.")
1338
- }), ie = s.object({
1340
+ }), ce = s.object({
1339
1341
  id: s.string().describe("The unique ID of the section."),
1340
- name: s.string().describe("The name of the section.")
1342
+ name: s.string().describe("The name of the section."),
1343
+ description: s.string().optional().describe("The description of the section. Supports Markdown.")
1341
1344
  });
1342
- function fe({ id: e, name: t }) {
1343
- return { id: e, name: t };
1345
+ function X({ id: e, name: t, description: o }) {
1346
+ return { id: e, name: t, description: o ?? void 0 };
1344
1347
  }
1345
1348
  const Mo = s.object({
1346
1349
  resourceType: s.string().describe("The type of resource (file, url, image, etc)."),
@@ -1377,10 +1380,10 @@ const Mo = s.object({
1377
1380
  id: s.string().describe("The unique ID of the user."),
1378
1381
  name: s.string().describe("The full name of the user."),
1379
1382
  email: s.string().describe("The email address of the user.")
1380
- }), ue = s.object({
1383
+ }), pe = s.object({
1381
1384
  id: s.string().describe("The unique ID of the label."),
1382
1385
  name: s.string().describe("The name of the label."),
1383
- color: de,
1386
+ color: le,
1384
1387
  order: s.number().optional().catch(void 0).describe("The display order of the label."),
1385
1388
  isFavorite: s.boolean().describe("Whether the label is marked as favorite.")
1386
1389
  }), Wo = s.object({
@@ -1451,7 +1454,7 @@ const Mo = s.object({
1451
1454
  `Comment ${l + 1}: Cannot provide both taskId and projectId. Choose one.`
1452
1455
  );
1453
1456
  }
1454
- const n = o.some((l) => he(l.projectId)) ? await t.getUser() : void 0, a = o.map(async ({ content: l, taskId: u, projectId: p }) => {
1457
+ const n = o.some((l) => fe(l.projectId)) ? await t.getUser() : void 0, a = o.map(async ({ content: l, taskId: u, projectId: p }) => {
1455
1458
  const m = await K({
1456
1459
  projectId: p,
1457
1460
  user: n,
@@ -1492,7 +1495,7 @@ const Ko = {
1492
1495
  id: s.string().describe("The unique ID of the filter."),
1493
1496
  name: s.string().describe("The name of the filter."),
1494
1497
  query: s.string().describe('The filter query string (e.g. "today & p1", "#Work & overdue").'),
1495
- color: de,
1498
+ color: le,
1496
1499
  isFavorite: s.boolean().describe("Whether the filter is marked as favorite."),
1497
1500
  itemOrder: s.number().describe("The display order of the filter.")
1498
1501
  }), Vo = {
@@ -1515,7 +1518,7 @@ const Ko = {
1515
1518
  id: i.id,
1516
1519
  name: i.name,
1517
1520
  query: i.query,
1518
- color: de.parse(i.color),
1521
+ color: le.parse(i.color),
1519
1522
  isFavorite: i.isFavorite,
1520
1523
  itemOrder: i.itemOrder
1521
1524
  }));
@@ -1554,7 +1557,7 @@ const Zo = s.object({
1554
1557
  query: s.string().min(1).describe(
1555
1558
  'The filter query string. Examples: "today & p1", "#Work & overdue", "@email & today", "(p1 | p2) & !assigned". Operators: | (OR), & (AND), ! (NOT), () grouping, , (multiple queries).'
1556
1559
  ),
1557
- color: ce,
1560
+ color: de,
1558
1561
  isFavorite: s.boolean().optional().describe("Whether to mark the filter as a favorite. Defaults to false.")
1559
1562
  }), Qo = {
1560
1563
  filters: s.array(Zo).min(1).describe("The array of filters to add.")
@@ -1580,7 +1583,7 @@ const Zo = s.object({
1580
1583
  )), i = (await t.sync({ commands: n })).tempIdMapping ?? {}, c = e.map((p, m) => {
1581
1584
  const h = r[m], k = h !== void 0 ? i[h] : void 0;
1582
1585
  if (!k) return null;
1583
- const b = p.color !== void 0 ? de.parse(p.color) : void 0;
1586
+ const b = p.color !== void 0 ? le.parse(p.color) : void 0;
1584
1587
  return {
1585
1588
  id: k,
1586
1589
  name: p.name,
@@ -1633,13 +1636,13 @@ ${a}`,
1633
1636
  }
1634
1637
  }, ar = s.object({
1635
1638
  name: s.string().min(1).max(128).describe("The name of the label."),
1636
- color: ce,
1639
+ color: de,
1637
1640
  order: s.number().int().optional().describe("The position of the label in the label list."),
1638
1641
  isFavorite: s.boolean().optional().describe("Whether the label is a favorite. Defaults to false.")
1639
1642
  }), ir = {
1640
1643
  labels: s.array(ar).min(1).describe("The array of labels to add.")
1641
1644
  }, cr = {
1642
- labels: s.array(ue).describe("The created labels."),
1645
+ labels: s.array(pe).describe("The created labels."),
1643
1646
  totalCount: s.number().describe("The total number of labels created.")
1644
1647
  }, dr = {
1645
1648
  name: f.ADD_LABELS,
@@ -1652,7 +1655,7 @@ ${a}`,
1652
1655
  return {
1653
1656
  textContent: lr({ labels: o }),
1654
1657
  structuredContent: {
1655
- labels: o.map((n) => ue.parse(n)),
1658
+ labels: o.map((n) => pe.parse(n)),
1656
1659
  totalCount: o.length
1657
1660
  }
1658
1661
  };
@@ -1729,14 +1732,15 @@ const Gt = new mr(), hr = s.object({
1729
1732
  parentId: s.string().optional().describe("The ID of the parent project. If provided, creates this as a sub-project."),
1730
1733
  isFavorite: s.boolean().optional().describe("Whether the project is a favorite. Defaults to false."),
1731
1734
  viewStyle: s.enum(["list", "board", "calendar"]).optional().describe('The project view style. Defaults to "list".'),
1732
- color: ce,
1735
+ description: s.string().optional().describe("The description of the project. Supports Markdown."),
1736
+ color: de,
1733
1737
  workspace: s.string().trim().min(1).optional().describe(
1734
1738
  "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."
1735
1739
  )
1736
1740
  }), fr = {
1737
1741
  projects: s.array(hr).min(1).describe("The array of projects to add.")
1738
1742
  }, br = {
1739
- projects: s.array(le).describe("The created projects."),
1743
+ projects: s.array(ue).describe("The created projects."),
1740
1744
  totalCount: s.number().describe("The total number of projects created.")
1741
1745
  }, gr = {
1742
1746
  name: f.ADD_PROJECTS,
@@ -1853,7 +1857,7 @@ const Te = 25, Ce = s.enum(ks), Bt = s.object({
1853
1857
  radius: c.radius
1854
1858
  });
1855
1859
  }
1856
- }), a = (await Promise.all(r)).map(me);
1860
+ }), a = (await Promise.all(r)).map(he);
1857
1861
  return {
1858
1862
  textContent: Cr(a),
1859
1863
  structuredContent: {
@@ -1880,11 +1884,12 @@ const $r = s.object({
1880
1884
  name: s.string().min(1).describe("The name of the section."),
1881
1885
  projectId: s.string().min(1).describe(
1882
1886
  'The ID of the project to add the section to. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
1883
- )
1887
+ ),
1888
+ description: s.string().optional().describe("The description of the section. Supports Markdown.")
1884
1889
  }), Dr = {
1885
1890
  sections: s.array($r).min(1).describe("The array of sections to add.")
1886
1891
  }, xr = {
1887
- sections: s.array(ie).describe("The created sections."),
1892
+ sections: s.array(ce).describe("The created sections."),
1888
1893
  totalCount: s.number().describe("The total number of sections created.")
1889
1894
  }, Ar = {
1890
1895
  name: f.ADD_SECTIONS,
@@ -1893,7 +1898,7 @@ const $r = s.object({
1893
1898
  outputSchema: xr,
1894
1899
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1895
1900
  async execute({ sections: e }, t) {
1896
- const r = e.some((c) => he(c.projectId)) ? await t.getUser() : void 0, n = await Promise.all(
1901
+ const r = e.some((c) => fe(c.projectId)) ? await t.getUser() : void 0, n = await Promise.all(
1897
1902
  e.map(async (c) => ({
1898
1903
  ...c,
1899
1904
  projectId: await K({
@@ -1908,7 +1913,7 @@ const $r = s.object({
1908
1913
  return {
1909
1914
  textContent: Er({ sections: a }),
1910
1915
  structuredContent: {
1911
- sections: a.map(fe),
1916
+ sections: a.map(X),
1912
1917
  totalCount: a.length
1913
1918
  }
1914
1919
  };
@@ -1920,7 +1925,7 @@ function Er({ sections: e }) {
1920
1925
  return `Added ${t} section${t === 1 ? "" : "s"}:
1921
1926
  ${o}`;
1922
1927
  }
1923
- const te = {
1928
+ const se = {
1924
1929
  USER_NOT_FOUND: "USER_NOT_FOUND",
1925
1930
  USER_NOT_COLLABORATOR: "USER_NOT_COLLABORATOR",
1926
1931
  PROJECT_NOT_SHARED: "PROJECT_NOT_SHARED",
@@ -1941,7 +1946,7 @@ class Or {
1941
1946
  taskId: r,
1942
1947
  projectId: n,
1943
1948
  error: {
1944
- type: te.USER_NOT_FOUND,
1949
+ type: se.USER_NOT_FOUND,
1945
1950
  message: `User "${a}" not found`,
1946
1951
  suggestions: [
1947
1952
  "Check the spelling of the user name or email",
@@ -1959,7 +1964,7 @@ class Or {
1959
1964
  projectId: n,
1960
1965
  resolvedUser: i,
1961
1966
  error: {
1962
- type: te.PROJECT_NOT_SHARED,
1967
+ type: se.PROJECT_NOT_SHARED,
1963
1968
  message: `Project "${c.name}" is not shared. Task assignments require a shared project with collaborators. Share the project with at least one other person to enable assignments.`,
1964
1969
  suggestions: [
1965
1970
  "Share the project with at least one collaborator to enable assignments",
@@ -1978,7 +1983,7 @@ class Or {
1978
1983
  projectId: n,
1979
1984
  resolvedUser: i,
1980
1985
  error: {
1981
- type: te.USER_NOT_COLLABORATOR,
1986
+ type: se.USER_NOT_COLLABORATOR,
1982
1987
  message: `User "${i.displayName}" is not a collaborator on project "${c.name}"`,
1983
1988
  suggestions: [
1984
1989
  "Invite the user to collaborate on this project first",
@@ -1997,7 +2002,7 @@ class Or {
1997
2002
  projectId: n,
1998
2003
  resolvedUser: i,
1999
2004
  error: {
2000
- type: te.TASK_NOT_FOUND,
2005
+ type: se.TASK_NOT_FOUND,
2001
2006
  message: `Task "${r}" not found or not accessible`,
2002
2007
  suggestions: [
2003
2008
  "Verify the task ID is correct",
@@ -2020,7 +2025,7 @@ class Or {
2020
2025
  projectId: n,
2021
2026
  resolvedUser: i,
2022
2027
  error: {
2023
- type: te.PERMISSION_DENIED,
2028
+ type: se.PERMISSION_DENIED,
2024
2029
  message: "Permission denied or API error occurred",
2025
2030
  suggestions: [
2026
2031
  "Check your API permissions",
@@ -2070,7 +2075,7 @@ class Or {
2070
2075
  isValid: !1,
2071
2076
  taskId: o,
2072
2077
  error: {
2073
- type: te.TASK_NOT_FOUND,
2078
+ type: se.TASK_NOT_FOUND,
2074
2079
  message: `Task "${o}" not found or not accessible`,
2075
2080
  suggestions: [
2076
2081
  "Verify the task ID is correct",
@@ -2139,7 +2144,7 @@ class Or {
2139
2144
  }
2140
2145
  }
2141
2146
  const rt = new Or();
2142
- function oe(e = /* @__PURE__ */ new Date()) {
2147
+ function re(e = /* @__PURE__ */ new Date()) {
2143
2148
  const t = e.getFullYear(), o = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getDate()).padStart(2, "0");
2144
2149
  return `${t}-${o}-${r}`;
2145
2150
  }
@@ -2177,11 +2182,11 @@ function Ur(e) {
2177
2182
  const t = e.content || e.title || "Untitled", o = e.dueDate ? ` • due ${e.dueDate}` : "", r = e.priority ? ` • ${e.priority.toUpperCase()}` : "", n = e.projectName ? ` • ${e.projectName}` : "", a = e.id ? ` • id=${e.id}` : "";
2178
2183
  return ` ${t}${o}${r}${n}${a}`;
2179
2184
  }
2180
- function _r(e) {
2185
+ function Pr(e) {
2181
2186
  const t = ` (${e.color})`, o = e.isFavorite ? " • ⭐" : "", r = ` • id=${e.id}`;
2182
2187
  return ` ${e.name}${t}${o}${r}`;
2183
2188
  }
2184
- function Pr(e) {
2189
+ function _r(e) {
2185
2190
  const t = e.inboxProject ? " • Inbox" : "", o = e.isFavorite ? " • ⭐" : "", r = e.isShared ? " • Shared" : "", n = e.viewStyle && e.viewStyle !== "list" ? ` • ${e.viewStyle}` : "", a = ` • id=${e.id}`;
2186
2191
  return ` ${e.name}${t}${o}${r}${n}${a}`;
2187
2192
  }
@@ -2293,7 +2298,7 @@ const bt = 25, Rr = s.object({
2293
2298
  const p = d.map((m) => `"${m.item}": ${m.error}`).join("; ");
2294
2299
  throw new Error(`All ${d.length} task(s) failed to create: ${p}`);
2295
2300
  }
2296
- const l = c.map(P);
2301
+ const l = c.map(_);
2297
2302
  return {
2298
2303
  textContent: Hr({
2299
2304
  tasks: l,
@@ -2326,7 +2331,7 @@ async function Fr(e, t, o) {
2326
2331
  labels: u,
2327
2332
  deadlineDate: p,
2328
2333
  ...m
2329
- } = e, h = he(n) ? void 0 : n;
2334
+ } = e, h = fe(n) ? void 0 : n;
2330
2335
  if (h) {
2331
2336
  const b = await t.getProject(h);
2332
2337
  if (b.isArchived)
@@ -2398,7 +2403,7 @@ function Hr({
2398
2403
  }) {
2399
2404
  const r = /* @__PURE__ */ new Set();
2400
2405
  for (const a of o.tasks)
2401
- a.projectId && !he(a.projectId) ? r.add("projects") : a.sectionId ? r.add("sections") : a.parentId ? r.add("subtasks") : r.add("inbox");
2406
+ a.projectId && !fe(a.projectId) ? r.add("projects") : a.sectionId ? r.add("sections") : a.parentId ? r.add("subtasks") : r.add("inbox");
2402
2407
  let n = "";
2403
2408
  if (r.size === 1) {
2404
2409
  const a = Array.from(r)[0];
@@ -2635,7 +2640,7 @@ const zt = [
2635
2640
  }, sn = {
2636
2641
  type: s.enum(Kt).describe("The type of object fetched."),
2637
2642
  id: s.string().describe("The ID of the fetched object."),
2638
- object: s.union([J, le, Se, ie, je]).describe("The fetched object data.")
2643
+ object: s.union([J, ue, Se, ce, je]).describe("The fetched object data.")
2639
2644
  }, on = {
2640
2645
  name: f.FETCH_OBJECT,
2641
2646
  description: "Fetch a single task, project, comment, section, or goal by its ID. Use this when you have a specific object ID and want to retrieve its full details.",
@@ -2647,7 +2652,7 @@ const zt = [
2647
2652
  try {
2648
2653
  switch (o) {
2649
2654
  case "task": {
2650
- const n = await t.getTask(r), a = P(n);
2655
+ const n = await t.getTask(r), a = _(n);
2651
2656
  return {
2652
2657
  textContent: `Found task: ${a.content} • id=${a.id} • priority=${a.priority} • project=${a.projectId}`,
2653
2658
  structuredContent: {
@@ -2683,10 +2688,7 @@ const zt = [
2683
2688
  const n = await t.getSection(r);
2684
2689
  if (!n)
2685
2690
  throw new Error(`Section ${r} not found.`);
2686
- const a = {
2687
- id: n.id,
2688
- name: n.name
2689
- };
2691
+ const a = X(n);
2690
2692
  return {
2691
2693
  textContent: `Found section: ${a.name} • id=${a.id}`,
2692
2694
  structuredContent: {
@@ -2738,7 +2740,7 @@ const zt = [
2738
2740
  );
2739
2741
  let a;
2740
2742
  if (r === "task") {
2741
- const i = await t.getTask(n), c = P(i), d = [c.content];
2743
+ const i = await t.getTask(n), c = _(i), d = [c.content];
2742
2744
  c.description && d.push(`
2743
2745
 
2744
2746
  Description: ${c.description}`), c.dueDate && d.push(`
@@ -2763,7 +2765,9 @@ Labels: ${c.labels.join(", ")}`), a = {
2763
2765
  };
2764
2766
  } else {
2765
2767
  const i = await t.getProject(n), c = V(i), d = [c.name];
2766
- c.isShared && d.push(`
2768
+ c.description && d.push(`
2769
+
2770
+ Description: ${c.description}`), c.isShared && d.push(`
2767
2771
 
2768
2772
  Shared project`), c.isFavorite && d.push(`
2769
2773
  Favorite: Yes`), a = {
@@ -2823,7 +2827,7 @@ Favorite: Yes`), a = {
2823
2827
  cursor: l ?? null
2824
2828
  };
2825
2829
  o && n ? u.objectEventTypes = `${o}:${n}` : o ? u.objectEventTypes = `${o}:` : n && (u.objectEventTypes = `:${n}`), r && r !== "remove" && (u.objectId = r), a && (u.parentProjectId = a), i && (u.parentItemId = i), c && (u.initiatorId = c);
2826
- const { results: p, nextCursor: m } = await t.getActivityLogs(u), h = p.map(Po);
2830
+ const { results: p, nextCursor: m } = await t.getActivityLogs(u), h = p.map(_o);
2827
2831
  return {
2828
2832
  textContent: un({ events: h, args: e, nextCursor: m }),
2829
2833
  structuredContent: {
@@ -3084,7 +3088,7 @@ const Sn = {
3084
3088
  );
3085
3089
  const u = await Qe(t, c), p = u?.email;
3086
3090
  let h = it(r, n);
3087
- u && p && (h = ne(h, `assigned to: ${p}`));
3091
+ u && p && (h = ae(h, `assigned to: ${p}`));
3088
3092
  const k = await t.getUser(), b = k.tzInfo?.gmtString || "+00:00", j = await K({
3089
3093
  projectId: d,
3090
3094
  user: k
@@ -3108,7 +3112,7 @@ const Sn = {
3108
3112
  since: y,
3109
3113
  until: D,
3110
3114
  ...h ? { filterQuery: h, filterLang: "en" } : {}
3111
- }), S = I.map(P);
3115
+ }), S = I.map(_);
3112
3116
  return {
3113
3117
  textContent: $n({
3114
3118
  tasks: S,
@@ -3218,7 +3222,7 @@ const Dn = {
3218
3222
  "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."
3219
3223
  )
3220
3224
  }, On = {
3221
- labels: s.array(ue).describe("The found personal labels."),
3225
+ labels: s.array(pe).describe("The found personal labels."),
3222
3226
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
3223
3227
  totalCount: s.number().describe("The total number of labels in this page."),
3224
3228
  hasMore: s.boolean().describe("Whether there are more results available."),
@@ -3241,9 +3245,9 @@ const Dn = {
3241
3245
  Oo(t)
3242
3246
  ]), { results: n, nextCursor: a } = o, i = e.searchText ? { searchText: e.searchText } : { limit: e.limit, cursor: e.cursor };
3243
3247
  return {
3244
- textContent: _n({ labels: n, args: e, nextCursor: a, sharedLabels: r }),
3248
+ textContent: Pn({ labels: n, args: e, nextCursor: a, sharedLabels: r }),
3245
3249
  structuredContent: {
3246
- labels: n.map((c) => ue.parse(c)),
3250
+ labels: n.map((c) => pe.parse(c)),
3247
3251
  nextCursor: a ?? void 0,
3248
3252
  totalCount: n.length,
3249
3253
  hasMore: !!a,
@@ -3253,7 +3257,7 @@ const Dn = {
3253
3257
  };
3254
3258
  }
3255
3259
  };
3256
- function _n({
3260
+ function Pn({
3257
3261
  labels: e,
3258
3262
  args: t,
3259
3263
  nextCursor: o,
@@ -3261,7 +3265,7 @@ function _n({
3261
3265
  }) {
3262
3266
  const n = t.searchText ? `All labels matching "${t.searchText}"` : "Labels", a = [];
3263
3267
  t.searchText && a.push(`searchText: "${t.searchText}"`);
3264
- const i = 10, d = e.slice(0, i).map(_r).join(`
3268
+ const i = 10, d = e.slice(0, i).map(Pr).join(`
3265
3269
  `), l = e.length - i, u = l > 0 ? `${d}
3266
3270
  …and ${l} more` : d, p = [];
3267
3271
  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"));
@@ -3278,7 +3282,7 @@ No shared labels.`;
3278
3282
  zeroReasonHints: p
3279
3283
  }) + m;
3280
3284
  }
3281
- const { FIND_PROJECTS: Jt, ADD_TASKS: Xt, UPDATE_TASKS: Zt } = f, Pn = {
3285
+ const { FIND_PROJECTS: Jt, ADD_TASKS: Xt, UPDATE_TASKS: Zt } = f, _n = {
3282
3286
  projectId: s.string().min(1).optional().describe(
3283
3287
  '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.'
3284
3288
  ),
@@ -3298,7 +3302,7 @@ const { FIND_PROJECTS: Jt, ADD_TASKS: Xt, UPDATE_TASKS: Zt } = f, Pn = {
3298
3302
  }, Ln = {
3299
3303
  name: f.FIND_PROJECT_COLLABORATORS,
3300
3304
  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.`,
3301
- parameters: Pn,
3305
+ parameters: _n,
3302
3306
  outputSchema: Rn,
3303
3307
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3304
3308
  async execute(e, t) {
@@ -3467,7 +3471,7 @@ const { ADD_PROJECTS: Fn } = f, Hn = {
3467
3471
  "The cursor to get the next page of projects (cursor is obtained from the previous call to this tool, with the same parameters)."
3468
3472
  )
3469
3473
  }, Wn = {
3470
- projects: s.array(le).describe("The found projects."),
3474
+ projects: s.array(ue).describe("The found projects."),
3471
3475
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
3472
3476
  totalCount: s.number().describe("The total number of projects in this page."),
3473
3477
  hasMore: s.boolean().describe("Whether there are more results available."),
@@ -3509,7 +3513,7 @@ function Bn({
3509
3513
  }) {
3510
3514
  const r = t.searchText ? `All projects matching "${t.searchText}"` : "Projects", n = [];
3511
3515
  t.searchText && n.push(`searchText: "${t.searchText}"`);
3512
- const a = 10, c = e.slice(0, a).map(Pr).join(`
3516
+ const a = 10, c = e.slice(0, a).map(_r).join(`
3513
3517
  `), d = e.length - a, l = d > 0 ? `${c}
3514
3518
  …and ${d} more` : c, u = [];
3515
3519
  return e.length === 0 && (t.searchText ? (u.push("Try broader search terms"), u.push("Check spelling"), u.push("Remove searchText to see all projects")) : (u.push("No projects created yet"), u.push(`Use ${Fn} to create a project`))), N({
@@ -3548,7 +3552,7 @@ const Yn = {
3548
3552
  "Only one of taskId, reminderId, or locationReminderId can be provided at a time."
3549
3553
  );
3550
3554
  if (r) {
3551
- const i = await t.getReminder(r), c = me(i);
3555
+ const i = await t.getReminder(r), c = he(i);
3552
3556
  return {
3553
3557
  textContent: `Found ${i.type} reminder (id=${r})`,
3554
3558
  structuredContent: {
@@ -3560,7 +3564,7 @@ const Yn = {
3560
3564
  };
3561
3565
  }
3562
3566
  if (n) {
3563
- const i = await t.getLocationReminder(n), c = me(i);
3567
+ const i = await t.getLocationReminder(n), c = he(i);
3564
3568
  return {
3565
3569
  textContent: `Found location reminder (id=${n})`,
3566
3570
  structuredContent: {
@@ -3581,7 +3585,7 @@ const Yn = {
3581
3585
  apiMethod: (p) => t.getLocationReminders(p),
3582
3586
  args: { taskId: o }
3583
3587
  })
3584
- ]), l = [...i, ...c].map(me);
3588
+ ]), l = [...i, ...c].map(he);
3585
3589
  return {
3586
3590
  textContent: Kn(l, o),
3587
3591
  structuredContent: {
@@ -3617,7 +3621,7 @@ const { ADD_SECTIONS: Vn } = f, Jn = {
3617
3621
  '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.'
3618
3622
  )
3619
3623
  }, Xn = {
3620
- sections: s.array(ie).describe("The found sections."),
3624
+ sections: s.array(ce).describe("The found sections."),
3621
3625
  totalCount: s.number().describe("The total number of sections found."),
3622
3626
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
3623
3627
  }, Zn = {
@@ -3635,7 +3639,7 @@ const { ADD_SECTIONS: Vn } = f, Jn = {
3635
3639
  e.searchText ? r = await Uo(t, e.searchText, o) : r = (await t.getSections({
3636
3640
  projectId: o
3637
3641
  })).results;
3638
- const n = r.map(({ id: i, name: c }) => ({ id: i, name: c }));
3642
+ const n = r.map(X);
3639
3643
  return {
3640
3644
  textContent: Qn({
3641
3645
  sections: n,
@@ -3711,7 +3715,7 @@ const ea = {
3711
3715
  a = "overdue";
3712
3716
  else if (e.startDate === "today")
3713
3717
  if (e.daysCount > 1) {
3714
- const p = /* @__PURE__ */ new Date(), m = oe(p), h = Fe(p, e.daysCount), k = ct(h, { representation: "date" }), b = `(due after: ${m} | due: ${m}) & due before: ${k}`;
3718
+ const p = /* @__PURE__ */ new Date(), m = re(p), h = Fe(p, e.daysCount), k = ct(h, { representation: "date" }), b = `(due after: ${m} | due: ${m}) & due before: ${k}`;
3715
3719
  a = e.overdueOption === "exclude-overdue" ? b : `(${b} | overdue)`;
3716
3720
  } else
3717
3721
  a = e.overdueOption === "exclude-overdue" ? "today" : "(today | overdue)";
@@ -3720,13 +3724,13 @@ const ea = {
3720
3724
  a = `(due after: ${p} | due: ${p}) & due before: ${h}`;
3721
3725
  }
3722
3726
  const i = it(e.labels, e.labelsOperator);
3723
- i.length > 0 && (a = ne(a, `(${i})`));
3727
+ i.length > 0 && (a = ae(a, `(${i})`));
3724
3728
  const c = Ft({
3725
3729
  resolvedAssigneeId: r,
3726
3730
  assigneeEmail: n,
3727
3731
  responsibleUserFiltering: e.responsibleUserFiltering
3728
3732
  });
3729
- a = ne(a, c);
3733
+ a = ae(a, c);
3730
3734
  const { tasks: d, nextCursor: l } = await tt({
3731
3735
  client: t,
3732
3736
  query: a,
@@ -3760,7 +3764,7 @@ function oa({
3760
3764
  `today${c}${t.daysCount > 1 ? ` + ${t.daysCount - 1} more days` : ""}`
3761
3765
  );
3762
3766
  } else if (t.startDate) {
3763
- const c = t.daysCount > 1 ? ` to ${oe(Fe(ts(t.startDate), t.daysCount))}` : "";
3767
+ const c = t.daysCount > 1 ? ` to ${re(Fe(ts(t.startDate), t.daysCount))}` : "";
3764
3768
  n.push(`${t.startDate}${c}`);
3765
3769
  }
3766
3770
  if (t.labels && t.labels.length > 0) {
@@ -3928,9 +3932,9 @@ const aa = new na(), { FIND_COMPLETED_TASKS: Tt, ADD_TASKS: wt } = f, ia = {
3928
3932
  cursor: l ?? null
3929
3933
  };
3930
3934
  r && (x.projectId = await K({ projectId: r, user: k })), n && (x.sectionId = n), a && (x.parentId = a);
3931
- const { results: M, nextCursor: G } = await t.getTasks(x), xe = M.map(P);
3935
+ const { results: M, nextCursor: G } = await t.getTasks(x), xe = M.map(_);
3932
3936
  let F = o ? xe.filter(
3933
- (X) => X.content.toLowerCase().includes(o.toLowerCase()) || X.description?.toLowerCase().includes(o.toLowerCase())
3937
+ (Z) => Z.content.toLowerCase().includes(o.toLowerCase()) || Z.description?.toLowerCase().includes(o.toLowerCase())
3934
3938
  ) : xe;
3935
3939
  return F = Ao({
3936
3940
  tasks: F,
@@ -3938,11 +3942,11 @@ const aa = new na(), { FIND_COMPLETED_TASKS: Tt, ADD_TASKS: wt } = f, ia = {
3938
3942
  currentUserId: k.id,
3939
3943
  responsibleUserFiltering: c
3940
3944
  }), u && u.length > 0 && (F = p === "and" ? F.filter(
3941
- (X) => u.every((Ae) => X.labels.includes(Ae))
3945
+ (Z) => u.every((Ae) => Z.labels.includes(Ae))
3942
3946
  ) : F.filter(
3943
- (X) => u.some((Ae) => X.labels.includes(Ae))
3947
+ (Z) => u.some((Ae) => Z.labels.includes(Ae))
3944
3948
  )), {
3945
- textContent: _e({
3949
+ textContent: Pe({
3946
3950
  tasks: F,
3947
3951
  args: e,
3948
3952
  nextCursor: G,
@@ -3964,9 +3968,9 @@ const aa = new na(), { FIND_COMPLETED_TASKS: Tt, ADD_TASKS: wt } = f, ia = {
3964
3968
  lang: "en",
3965
3969
  limit: d,
3966
3970
  cursor: l ?? null
3967
- }), G = x.map(P);
3971
+ }), G = x.map(_);
3968
3972
  return {
3969
- textContent: _e({
3973
+ textContent: Pe({
3970
3974
  tasks: G,
3971
3975
  args: e,
3972
3976
  nextCursor: M,
@@ -3983,15 +3987,15 @@ const aa = new na(), { FIND_COMPLETED_TASKS: Tt, ADD_TASKS: wt } = f, ia = {
3983
3987
  };
3984
3988
  }
3985
3989
  let y = j ? `(${j})` : "";
3986
- o && (y = ne(y, `search: ${o}`));
3990
+ o && (y = ae(y, `search: ${o}`));
3987
3991
  const D = it(u, p);
3988
- if (y = ne(y, D), !(h && !i && !c)) {
3992
+ if (y = ae(y, D), !(h && !i && !c)) {
3989
3993
  const x = Ft({
3990
3994
  resolvedAssigneeId: A,
3991
3995
  assigneeEmail: w,
3992
3996
  responsibleUserFiltering: c
3993
3997
  });
3994
- y = ne(y, x);
3998
+ y = ae(y, x);
3995
3999
  }
3996
4000
  const { tasks: I, nextCursor: C } = await tt({
3997
4001
  client: t,
@@ -4000,7 +4004,7 @@ const aa = new na(), { FIND_COMPLETED_TASKS: Tt, ADD_TASKS: wt } = f, ia = {
4000
4004
  limit: e.limit
4001
4005
  });
4002
4006
  return {
4003
- textContent: _e({
4007
+ textContent: Pe({
4004
4008
  tasks: I,
4005
4009
  args: e,
4006
4010
  nextCursor: C,
@@ -4034,7 +4038,7 @@ function la(e) {
4034
4038
  }
4035
4039
  return [];
4036
4040
  }
4037
- function _e({
4041
+ function Pe({
4038
4042
  tasks: e,
4039
4043
  args: t,
4040
4044
  nextCursor: o,
@@ -4117,7 +4121,7 @@ const ua = {
4117
4121
  inbox: s.object({
4118
4122
  id: s.string().describe("The inbox project ID."),
4119
4123
  name: s.string().describe("The inbox project name."),
4120
- sections: s.array(ie).describe("Sections in the inbox project.")
4124
+ sections: s.array(ce).describe("Sections in the inbox project.")
4121
4125
  }).nullable().optional().describe("Inbox information (account overview only)."),
4122
4126
  projects: s.array(s.lazy(() => ss)).optional().describe(
4123
4127
  "List of projects with hierarchy, folders, and ordering (account overview only)."
@@ -4126,7 +4130,7 @@ const ua = {
4126
4130
  id: s.string().describe("The project ID."),
4127
4131
  name: s.string().describe("The project name.")
4128
4132
  }).optional().describe("Project details (project overview only)."),
4129
- sections: s.array(ie).optional().describe("List of sections (project overview only)."),
4133
+ sections: s.array(ce).optional().describe("List of sections (project overview only)."),
4130
4134
  tasks: s.array(s.any()).optional().describe("List of tasks (project overview only)."),
4131
4135
  stats: s.object({
4132
4136
  totalTasks: s.number(),
@@ -4146,7 +4150,7 @@ function ma(e) {
4146
4150
  for (const n of e) {
4147
4151
  const a = t[n.id];
4148
4152
  if (a)
4149
- if (ae(n) && n.parentId) {
4153
+ if (ie(n) && n.parentId) {
4150
4154
  const i = t[n.parentId];
4151
4155
  i ? i.children.push(a) : o.push(a);
4152
4156
  } else
@@ -4207,10 +4211,10 @@ function rs(e, t) {
4207
4211
  return {
4208
4212
  id: e.id,
4209
4213
  name: e.name,
4210
- parentId: ae(e) ? e.parentId ?? void 0 : void 0,
4214
+ parentId: ie(e) ? e.parentId ?? void 0 : void 0,
4211
4215
  folderId: ke(e) ? e.folderId ?? void 0 : void 0,
4212
4216
  childOrder: e.childOrder,
4213
- sections: (t[e.id] || []).map(fe),
4217
+ sections: (t[e.id] || []).map(X),
4214
4218
  children: e.children.map(
4215
4219
  (o) => rs(o, t)
4216
4220
  )
@@ -4224,7 +4228,7 @@ async function fa(e, t) {
4224
4228
  limit: $.TASKS_BATCH_SIZE,
4225
4229
  cursor: r ?? void 0
4226
4230
  });
4227
- o = o.concat(n.map(P)), r = a ?? void 0;
4231
+ o = o.concat(n.map(_)), r = a ?? void 0;
4228
4232
  } while (r);
4229
4233
  return o;
4230
4234
  }
@@ -4233,7 +4237,7 @@ async function ba(e, t) {
4233
4237
  return o;
4234
4238
  }
4235
4239
  async function ga(e) {
4236
- const { results: t } = await e.getProjects({}), o = t.find((p) => ae(p) && p.inboxProject === !0), r = t.filter((p) => !ae(p) || p.inboxProject !== !0), n = ma(r), a = t.map((p) => p.id), i = await ha(e, a), c = ["# Personal Projects", ""];
4240
+ const { results: t } = await e.getProjects({}), o = t.find((p) => ie(p) && p.inboxProject === !0), r = t.filter((p) => !ie(p) || p.inboxProject !== !0), n = ma(r), a = t.map((p) => p.id), i = await ha(e, a), c = ["# Personal Projects", ""];
4237
4241
  if (o) {
4238
4242
  c.push(`- Inbox Project: ${o.name} (id=${o.id})`);
4239
4243
  for (const p of i[o.id] || [])
@@ -4256,7 +4260,7 @@ async function ga(e) {
4256
4260
  inbox: o ? {
4257
4261
  id: o.id,
4258
4262
  name: o.name,
4259
- sections: (i[o.id] || []).map(fe)
4263
+ sections: (i[o.id] || []).map(X)
4260
4264
  } : null,
4261
4265
  projects: n.map(
4262
4266
  (p) => rs(p, i)
@@ -4302,7 +4306,7 @@ async function ya(e, t) {
4302
4306
  id: o.id,
4303
4307
  name: o.name
4304
4308
  },
4305
- sections: r.map(fe),
4309
+ sections: r.map(X),
4306
4310
  tasks: n.map((u) => ({
4307
4311
  ...u,
4308
4312
  children: []
@@ -4329,7 +4333,7 @@ const ka = {
4329
4333
  structuredContent: o.structuredContent
4330
4334
  };
4331
4335
  }
4332
- }, Ta = {}, se = s.object({
4336
+ }, Ta = {}, oe = s.object({
4333
4337
  count: s.number().describe("Number of consecutive periods in this streak."),
4334
4338
  start: s.string().describe("Start date of the streak."),
4335
4339
  end: s.string().describe("End date of the streak.")
@@ -4356,12 +4360,12 @@ const ka = {
4356
4360
  goals: s.object({
4357
4361
  dailyGoal: s.number().describe("Daily task completion goal."),
4358
4362
  weeklyGoal: s.number().describe("Weekly task completion goal."),
4359
- currentDailyStreak: se.describe("Current daily goal streak."),
4360
- currentWeeklyStreak: se.describe("Current weekly goal streak."),
4361
- lastDailyStreak: se.describe("Previous daily goal streak."),
4362
- lastWeeklyStreak: se.describe("Previous weekly goal streak."),
4363
- maxDailyStreak: se.describe("Best daily goal streak ever."),
4364
- maxWeeklyStreak: se.describe("Best weekly goal streak ever."),
4363
+ currentDailyStreak: oe.describe("Current daily goal streak."),
4364
+ currentWeeklyStreak: oe.describe("Current weekly goal streak."),
4365
+ lastDailyStreak: oe.describe("Previous daily goal streak."),
4366
+ lastWeeklyStreak: oe.describe("Previous weekly goal streak."),
4367
+ maxDailyStreak: oe.describe("Best daily goal streak ever."),
4368
+ maxWeeklyStreak: oe.describe("Best weekly goal streak ever."),
4365
4369
  vacationMode: s.boolean().describe("Whether vacation mode is enabled."),
4366
4370
  karmaDisabled: s.boolean().describe("Whether karma tracking is disabled.")
4367
4371
  }).describe("Goal and streak information."),
@@ -4601,7 +4605,7 @@ function Ua(e, { progress: t, health: o, context: r }) {
4601
4605
  return n.join(`
4602
4606
  `);
4603
4607
  }
4604
- const _a = {
4608
+ const Pa = {
4605
4609
  name: f.GET_PROJECT_HEALTH,
4606
4610
  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 recommendations. Use includeContext=true for full detail including task data.",
4607
4611
  parameters: Da,
@@ -4648,7 +4652,7 @@ const _a = {
4648
4652
  }
4649
4653
  };
4650
4654
  }
4651
- }, Pa = {
4655
+ }, _a = {
4652
4656
  workspaceIdOrName: s.string().min(1).describe(
4653
4657
  "The workspace ID or name. Supports exact ID, exact name match (case-insensitive), or unique partial name match."
4654
4658
  ),
@@ -4673,7 +4677,7 @@ const _a = {
4673
4677
  }, Na = {
4674
4678
  name: f.GET_WORKSPACE_INSIGHTS,
4675
4679
  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.",
4676
- parameters: Pa,
4680
+ parameters: _a,
4677
4681
  outputSchema: La,
4678
4682
  annotations: {
4679
4683
  readOnlyHint: !0,
@@ -4899,7 +4903,7 @@ const qa = {
4899
4903
  newAssigneeId: void 0
4900
4904
  }));
4901
4905
  return {
4902
- textContent: Pe({
4906
+ textContent: _e({
4903
4907
  operation: o,
4904
4908
  results: I,
4905
4909
  dryRun: !0
@@ -4936,7 +4940,7 @@ const qa = {
4936
4940
  throw new Error(`All ${D.length} unassign operation(s) failed: ${I}`);
4937
4941
  }
4938
4942
  return {
4939
- textContent: Pe({
4943
+ textContent: _e({
4940
4944
  operation: o,
4941
4945
  results: D,
4942
4946
  dryRun: !1
@@ -5018,7 +5022,7 @@ const qa = {
5018
5022
  throw new Error(`All ${v.length} ${o} operation(s) failed: ${w}`);
5019
5023
  }
5020
5024
  return {
5021
- textContent: Pe({
5025
+ textContent: _e({
5022
5026
  operation: o,
5023
5027
  results: v,
5024
5028
  dryRun: i
@@ -5034,7 +5038,7 @@ const qa = {
5034
5038
  };
5035
5039
  }
5036
5040
  };
5037
- function Pe({
5041
+ function _e({
5038
5042
  operation: e,
5039
5043
  results: t,
5040
5044
  dryRun: o
@@ -5089,7 +5093,7 @@ const Qa = {
5089
5093
  action: s.enum(["archive", "unarchive"]).describe("The action to perform on the project."),
5090
5094
  projectId: s.string().min(1).describe("The ID of the project.")
5091
5095
  }, ei = {
5092
- project: le.describe("The updated project."),
5096
+ project: ue.describe("The updated project."),
5093
5097
  success: s.boolean().describe("Whether the action was successful.")
5094
5098
  }, ti = {
5095
5099
  name: f.PROJECT_MANAGEMENT,
@@ -5116,7 +5120,7 @@ const Qa = {
5116
5120
  "Optional access visibility for the project in the workspace (restricted, team, or public)."
5117
5121
  )
5118
5122
  }, oi = {
5119
- project: le.describe("The moved project."),
5123
+ project: ue.describe("The moved project."),
5120
5124
  success: s.boolean().describe("Whether the move was successful.")
5121
5125
  }, ri = {
5122
5126
  name: f.PROJECT_MOVE,
@@ -5280,7 +5284,7 @@ const Qa = {
5280
5284
  const l = d instanceof Error ? d.message : String(d);
5281
5285
  throw new Error(`Reschedule failed: ${l}`);
5282
5286
  }
5283
- const a = await Promise.all(o.map((d) => t.getTask(d.id))), i = a.map(P);
5287
+ const a = await Promise.all(o.map((d) => t.getTask(d.id))), i = a.map(_);
5284
5288
  return {
5285
5289
  textContent: nt("Rescheduled", i, {
5286
5290
  showDetails: i.length <= 5
@@ -5453,7 +5457,7 @@ const ji = s.object({
5453
5457
  query: s.string().min(1).optional().describe(
5454
5458
  'The new filter query string. Examples: "today & p1", "#Work & overdue", "@email & today".'
5455
5459
  ),
5456
- color: ce,
5460
+ color: de,
5457
5461
  isFavorite: s.boolean().optional().describe("Whether to mark the filter as a favorite.")
5458
5462
  }), Ci = {
5459
5463
  filters: s.array(ji).min(1).describe("The filters to update.")
@@ -5499,7 +5503,7 @@ const ji = s.object({
5499
5503
  id: m.id,
5500
5504
  name: m.name,
5501
5505
  query: m.query,
5502
- color: de.parse(m.color),
5506
+ color: le.parse(m.color),
5503
5507
  isFavorite: m.isFavorite,
5504
5508
  itemOrder: m.itemOrder
5505
5509
  }));
@@ -5534,16 +5538,16 @@ ${n}`;
5534
5538
  function Ai({ id: e, ...t }) {
5535
5539
  return Object.values(t).every((r) => r === void 0) ? "no-fields" : null;
5536
5540
  }
5537
- const re = "remove", Ke = "unassign", Ct = 25, Ei = s.object({
5541
+ const ne = "remove", Ke = "unassign", Ct = 25, Ei = s.object({
5538
5542
  id: s.string().min(1).describe("The ID of the goal to update."),
5539
5543
  name: s.string().min(1).optional().describe("New goal name."),
5540
5544
  description: s.preprocess(
5541
- (e) => e === null ? re : e,
5542
- s.string().describe(`New description. Use "${re}" to clear.`)
5545
+ (e) => e === null ? ne : e,
5546
+ s.string().describe(`New description. Use "${ne}" to clear.`)
5543
5547
  ).optional(),
5544
5548
  deadline: s.preprocess(
5545
- (e) => e === null ? re : e,
5546
- s.string().describe(`New deadline (YYYY-MM-DD). Use "${re}" to clear.`)
5549
+ (e) => e === null ? ne : e,
5550
+ s.string().describe(`New deadline (YYYY-MM-DD). Use "${ne}" to clear.`)
5547
5551
  ).optional(),
5548
5552
  responsibleUid: s.preprocess(
5549
5553
  (e) => e === null ? Ke : e,
@@ -5551,19 +5555,19 @@ const re = "remove", Ke = "unassign", Ct = 25, Ei = s.object({
5551
5555
  ).optional()
5552
5556
  }), Oi = ["no-fields", "no-valid-values"], Ui = {
5553
5557
  goals: s.array(Ei).min(1).max(Ct).describe(`The array of goals to update (max ${Ct}).`)
5554
- }, _i = s.object({
5558
+ }, Pi = s.object({
5555
5559
  id: s.string().describe("The ID of the goal that was skipped."),
5556
5560
  reason: s.enum(Oi).describe(
5557
5561
  '"no-fields" = only the id was supplied; "no-valid-values" = all updatable fields were undefined.'
5558
5562
  )
5559
- }), Pi = {
5563
+ }), _i = {
5560
5564
  goals: s.array(je).describe("The updated goals."),
5561
5565
  totalCount: s.number().describe("The total number of goals updated."),
5562
5566
  updatedGoalIds: s.array(s.string()).describe("The IDs of the updated goals."),
5563
5567
  appliedOperations: s.object({
5564
5568
  updateCount: s.number().describe("The number of goals actually updated."),
5565
5569
  skippedCount: s.number().describe("The number of goals skipped (no changes)."),
5566
- skipped: s.array(_i).describe("Per-goal skip details (id + reason).")
5570
+ skipped: s.array(Pi).describe("Per-goal skip details (id + reason).")
5567
5571
  }).describe("Summary of operations performed.")
5568
5572
  };
5569
5573
  function Re(e, t) {
@@ -5577,7 +5581,7 @@ const Li = {
5577
5581
  name: f.UPDATE_GOALS,
5578
5582
  description: "Update one or more goals by their IDs.",
5579
5583
  parameters: Ui,
5580
- outputSchema: Pi,
5584
+ outputSchema: _i,
5581
5585
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
5582
5586
  async execute({ goals: e }, t) {
5583
5587
  const o = await Promise.all(
@@ -5587,8 +5591,8 @@ const Li = {
5587
5591
  return { kind: "skipped", id: l.id, reason: u };
5588
5592
  const { id: p, description: m, deadline: h, responsibleUid: k, ...b } = l, j = await t.updateGoal(p, {
5589
5593
  ...b,
5590
- description: Re(m, re),
5591
- deadline: Re(h, re),
5594
+ description: Re(m, ne),
5595
+ deadline: Re(h, ne),
5592
5596
  responsibleUid: Re(k, Ke)
5593
5597
  });
5594
5598
  return { kind: "updated", goal: Ie(j) };
@@ -5630,7 +5634,7 @@ const Mi = s.object({
5630
5634
  labelType: s.literal("personal").describe("Update a personal label, identified by its ID."),
5631
5635
  id: s.string().min(1).describe("The ID of the personal label to update."),
5632
5636
  name: s.string().min(1).max(128).optional().describe("The new name of the label."),
5633
- color: ce,
5637
+ color: de,
5634
5638
  order: s.number().int().optional().describe("The new position of the label in the label list."),
5635
5639
  isFavorite: s.boolean().optional().describe("Whether to mark the label as a favorite.")
5636
5640
  }), Fi = s.object({
@@ -5650,7 +5654,7 @@ const Mi = s.object({
5650
5654
  name: s.string().describe("The previous name of the shared label."),
5651
5655
  newName: s.string().describe("The new name of the shared label.")
5652
5656
  }), Bi = {
5653
- updatedLabels: s.array(ue).describe("The updated personal labels."),
5657
+ updatedLabels: s.array(pe).describe("The updated personal labels."),
5654
5658
  renamedSharedLabels: s.array(Gi).describe("The shared labels that were renamed."),
5655
5659
  totalCount: s.number().describe("The total number of successful operations (personal + shared)."),
5656
5660
  appliedOperations: s.object({
@@ -5678,7 +5682,7 @@ const Mi = s.object({
5678
5682
  newName: u.newName
5679
5683
  }) ? { kind: "renamed", name: u.name, newName: u.newName } : { kind: "skipped", reason: "not-found" };
5680
5684
  })
5681
- ), n = r.filter((u) => u.kind === "updated").map((u) => ue.parse(u.label)), a = r.filter(
5685
+ ), n = r.filter((u) => u.kind === "updated").map((u) => pe.parse(u.label)), a = r.filter(
5682
5686
  (u) => u.kind === "renamed"
5683
5687
  ).map(({ name: u, newName: p }) => ({ name: u, newName: p })), i = r.filter((u) => u.kind === "skipped").length, c = r.filter(
5684
5688
  (u) => u.kind === "skipped" && u.reason === "no-fields"
@@ -5739,11 +5743,20 @@ const Ki = s.object({
5739
5743
  name: s.string().min(1).optional().describe("The new name of the project."),
5740
5744
  isFavorite: s.boolean().optional().describe("Whether the project is a favorite."),
5741
5745
  viewStyle: s.enum(["list", "board", "calendar"]).optional().describe("The project view style."),
5742
- color: ce
5746
+ description: s.preprocess(
5747
+ // `null` is the advertised clear value; the param schema stays a
5748
+ // plain string (Gemini forbids nullable schemas, not preprocessing),
5749
+ // so `null` is normalised to "" before the project wire clear.
5750
+ (e) => e === null ? "" : e,
5751
+ s.string().describe(
5752
+ "The description of the project (Markdown). Pass null (or an empty string) to clear it."
5753
+ )
5754
+ ).optional(),
5755
+ color: de
5743
5756
  }), Vi = {
5744
5757
  projects: s.array(Ki).min(1).describe("The projects to update.")
5745
5758
  }, Ji = {
5746
- projects: s.array(le).describe("The updated projects."),
5759
+ projects: s.array(ue).describe("The updated projects."),
5747
5760
  totalCount: s.number().describe("The total number of projects updated."),
5748
5761
  updatedProjectIds: s.array(s.string()).describe("The IDs of the updated projects."),
5749
5762
  appliedOperations: s.object({
@@ -5867,7 +5880,7 @@ const ec = s.object({
5867
5880
  return await t.updateLocationReminder(l, p);
5868
5881
  }
5869
5882
  }
5870
- }), a = (await Promise.all(r)).map(me), i = a.length === 1 ? "reminder" : "reminders";
5883
+ }), a = (await Promise.all(r)).map(he), i = a.length === 1 ? "reminder" : "reminders";
5871
5884
  return {
5872
5885
  textContent: `Updated ${a.length} ${i}`,
5873
5886
  structuredContent: {
@@ -5879,11 +5892,23 @@ const ec = s.object({
5879
5892
  }
5880
5893
  }, ic = s.object({
5881
5894
  id: s.string().min(1).describe("The ID of the section to update."),
5882
- name: s.string().min(1).describe("The new name of the section.")
5895
+ name: s.string().min(1).optional().describe("The new name of the section."),
5896
+ description: s.preprocess(
5897
+ // `null` is the advertised clear value; the param schema stays a
5898
+ // plain string (Gemini forbids nullable schemas, not preprocessing),
5899
+ // so `null` is normalised to "" and then mapped to the section
5900
+ // wire clear (`null`) at execute.
5901
+ (e) => e === null ? "" : e,
5902
+ s.string().describe(
5903
+ "The description of the section (Markdown). Pass null (or an empty string) to clear it."
5904
+ )
5905
+ ).optional()
5906
+ }).refine((e) => e.name !== void 0 || e.description !== void 0, {
5907
+ message: 'Provide at least one of "name" or "description" to update.'
5883
5908
  }), cc = {
5884
5909
  sections: s.array(ic).min(1).describe("The sections to update.")
5885
5910
  }, dc = {
5886
- sections: s.array(ie).describe("The updated sections."),
5911
+ sections: s.array(ce).describe("The updated sections."),
5887
5912
  totalCount: s.number().describe("The total number of sections updated."),
5888
5913
  updatedSectionIds: s.array(s.string()).describe("The IDs of the updated sections.")
5889
5914
  }, lc = {
@@ -5894,14 +5919,20 @@ const ec = s.object({
5894
5919
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5895
5920
  async execute({ sections: e }, t) {
5896
5921
  const o = await Promise.all(
5897
- e.map((n) => t.updateSection(n.id, { name: n.name }))
5922
+ e.map(({ id: n, name: a, description: i }) => {
5923
+ const c = {
5924
+ ...a !== void 0 ? { name: a } : {},
5925
+ ...i !== void 0 ? { description: i === "" ? null : i } : {}
5926
+ };
5927
+ return t.updateSection(n, c);
5928
+ })
5898
5929
  );
5899
5930
  return {
5900
5931
  textContent: uc({
5901
5932
  sections: o
5902
5933
  }),
5903
5934
  structuredContent: {
5904
- sections: o.map(fe),
5935
+ sections: o.map(X),
5905
5936
  totalCount: o.length,
5906
5937
  updatedSectionIds: o.map((n) => n.id)
5907
5938
  }
@@ -6035,11 +6066,11 @@ const pc = s.object({
6035
6066
  }
6036
6067
  if (!w && !u && !p)
6037
6068
  return await t.updateTask(d, y);
6038
- const I = _o(d, w, u, p), C = await t.moveTask(d, I);
6069
+ const I = Po(d, w, u, p), C = await t.moveTask(d, I);
6039
6070
  return Object.keys(y).length > 0 ? await t.updateTask(d, y) : C;
6040
6071
  }), n = (await Promise.all(r)).filter(
6041
6072
  (c) => c !== void 0
6042
- ), a = n.map(P);
6073
+ ), a = n.map(_);
6043
6074
  return {
6044
6075
  textContent: kc({
6045
6076
  tasks: a,
@@ -6150,8 +6181,8 @@ async function Ac(e) {
6150
6181
  "## Week Settings",
6151
6182
  `**Week Start Day:** ${c} (${i})`,
6152
6183
  `**Current Week:** Week ${m}`,
6153
- `**Week Start Date:** ${oe(u)}`,
6154
- `**Week End Date:** ${oe(p)}`,
6184
+ `**Week Start Date:** ${re(u)}`,
6185
+ `**Week End Date:** ${re(p)}`,
6155
6186
  "",
6156
6187
  "## Daily Progress",
6157
6188
  `**Completed Today:** ${t.completedToday}`,
@@ -6169,8 +6200,8 @@ async function Ac(e) {
6169
6200
  currentLocalTime: a,
6170
6201
  startDay: i,
6171
6202
  startDayName: c,
6172
- weekStartDate: oe(u),
6173
- weekEndDate: oe(p),
6203
+ weekStartDate: re(u),
6204
+ weekEndDate: re(p),
6174
6205
  currentWeekNumber: m,
6175
6206
  completedToday: t.completedToday,
6176
6207
  dailyGoal: t.dailyGoal,
@@ -6207,7 +6238,7 @@ const Ec = {
6207
6238
  "application/json",
6208
6239
  "application/xml",
6209
6240
  "text/xml"
6210
- ]), _c = {
6241
+ ]), Pc = {
6211
6242
  ".png": "image/png",
6212
6243
  ".jpg": "image/jpeg",
6213
6244
  ".jpeg": "image/jpeg",
@@ -6222,7 +6253,7 @@ const Ec = {
6222
6253
  ".xml": "application/xml",
6223
6254
  ".pdf": "application/pdf"
6224
6255
  };
6225
- function Pc(e) {
6256
+ function _c(e) {
6226
6257
  return Oc.has(e) ? "image" : Uc.has(e) || e.startsWith("text/") ? "text" : "binary";
6227
6258
  }
6228
6259
  function Rc(e) {
@@ -6233,7 +6264,7 @@ function Lc(e) {
6233
6264
  const t = new URL(e).pathname, o = t.lastIndexOf(".");
6234
6265
  if (o === -1) return;
6235
6266
  const r = t.slice(o).toLowerCase();
6236
- return _c[r];
6267
+ return Pc[r];
6237
6268
  } catch {
6238
6269
  return;
6239
6270
  }
@@ -6270,7 +6301,7 @@ const Mc = {
6270
6301
  return {
6271
6302
  textContent: `Attachment "${a ?? e}" is too large to display inline (${(u / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${d}`
6272
6303
  };
6273
- const p = Pc(d), m = [];
6304
+ const p = _c(d), m = [];
6274
6305
  return p === "image" ? m.push({
6275
6306
  type: "image",
6276
6307
  data: l.toString("base64"),
@@ -6315,7 +6346,7 @@ You have access to comprehensive Todoist management tools for personal productiv
6315
6346
  - **find-completed-tasks**: View completed tasks by completion date or original due date; if since/until are omitted, defaults to the last 7 days (returns all collaborators unless filtered)
6316
6347
 
6317
6348
  **Project & Organization:**
6318
- - **add-projects/update-projects/find-projects**: Manage project lifecycle with names, favorites, view styles (list/board/calendar), and workspace assignment for new projects (by name or ID)
6349
+ - **add-projects/update-projects/find-projects**: Manage project lifecycle with names, descriptions (Markdown), favorites, view styles (list/board/calendar), and workspace assignment for new projects (by name or ID)
6319
6350
  - **project-management**: Archive or unarchive projects by ID
6320
6351
  - **project-move**: Move projects between personal and workspace contexts
6321
6352
  - **add-sections/update-sections/find-sections**: Organize tasks within projects using sections
@@ -6415,14 +6446,14 @@ function td({
6415
6446
  };
6416
6447
  xs(r);
6417
6448
  const i = { server: r, client: n, features: o };
6418
- return g({ tool: Nr, ...i }), g({ tool: Jr, ...i }), g({ tool: yi, ...i }), g({ tool: yc, ...i }), g({ tool: ui, ...i }), g({ tool: da, ...i }), g({ tool: a, ...i }), g({ tool: Cn, ...i }), g({ tool: gr, ...i }), g({ tool: Xi, ...i }), g({ tool: Gn, ...i }), g({ tool: ti, ...i }), g({ tool: ri, ...i }), g({ tool: Ar, ...i }), g({ tool: lc, ...i }), g({ tool: Zn, ...i }), g({ tool: An, ...i }), g({ tool: nr, ...i }), g({ tool: Li, ...i }), g({ tool: zr, ...i }), g({ tool: Ha, ...i }), g({ tool: qo, ...i }), g({ tool: gn, ...i }), g({ tool: vi, ...i }), g({ tool: jr, ...i }), g({ tool: zn, ...i }), g({ tool: ac, ...i }), g({ tool: Fc, ...i }), g({ tool: dr, ...i }), g({ tool: Yi, ...i }), g({ tool: Un, ...i }), g({ tool: Jo, ...i }), g({ tool: tr, ...i }), g({ tool: Di, ...i }), g({ tool: ln, ...i }), g({ tool: Ia, ...i }), g({ tool: _a, ...i }), g({ tool: $a, ...i }), g({ tool: Br, ...i }), g({ tool: Na, ...i }), g({ tool: ka, ...i }), g({ tool: en, ...i }), g({ tool: on, ...i }), g({ tool: ii, ...i }), g({ tool: Ec, ...i }), g({ tool: Ln, ...i }), g({ tool: Za, ...i }), g({ tool: qa, ...i }), g({ tool: fi, ...i }), g({ tool: an, ...i }), r.registerPrompt(
6419
- pe.name,
6449
+ return g({ tool: Nr, ...i }), g({ tool: Jr, ...i }), g({ tool: yi, ...i }), g({ tool: yc, ...i }), g({ tool: ui, ...i }), g({ tool: da, ...i }), g({ tool: a, ...i }), g({ tool: Cn, ...i }), g({ tool: gr, ...i }), g({ tool: Xi, ...i }), g({ tool: Gn, ...i }), g({ tool: ti, ...i }), g({ tool: ri, ...i }), g({ tool: Ar, ...i }), g({ tool: lc, ...i }), g({ tool: Zn, ...i }), g({ tool: An, ...i }), g({ tool: nr, ...i }), g({ tool: Li, ...i }), g({ tool: zr, ...i }), g({ tool: Ha, ...i }), g({ tool: qo, ...i }), g({ tool: gn, ...i }), g({ tool: vi, ...i }), g({ tool: jr, ...i }), g({ tool: zn, ...i }), g({ tool: ac, ...i }), g({ tool: Fc, ...i }), g({ tool: dr, ...i }), g({ tool: Yi, ...i }), g({ tool: Un, ...i }), g({ tool: Jo, ...i }), g({ tool: tr, ...i }), g({ tool: Di, ...i }), g({ tool: ln, ...i }), g({ tool: Ia, ...i }), g({ tool: Pa, ...i }), g({ tool: $a, ...i }), g({ tool: Br, ...i }), g({ tool: Na, ...i }), g({ tool: ka, ...i }), g({ tool: en, ...i }), g({ tool: on, ...i }), g({ tool: ii, ...i }), g({ tool: Ec, ...i }), g({ tool: Ln, ...i }), g({ tool: Za, ...i }), g({ tool: qa, ...i }), g({ tool: fi, ...i }), g({ tool: an, ...i }), r.registerPrompt(
6450
+ me.name,
6420
6451
  {
6421
- title: pe.title,
6422
- description: pe.description,
6423
- argsSchema: pe.argsSchema
6452
+ title: me.title,
6453
+ description: me.description,
6454
+ argsSchema: me.argsSchema
6424
6455
  },
6425
- pe.callback
6456
+ me.callback
6426
6457
  ), r;
6427
6458
  }
6428
6459
  export {
@@ -6457,7 +6488,7 @@ export {
6457
6488
  an as f,
6458
6489
  td as g,
6459
6490
  $a as h,
6460
- _a as i,
6491
+ Pa as i,
6461
6492
  Ia as j,
6462
6493
  ln as k,
6463
6494
  qa as l,