@todoist/mcp 16.1.0 → 17.0.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.
@@ -454,7 +454,7 @@ function Tr(e) {
454
454
  const t = ft(e);
455
455
  return t ? gr(t) : _s(e);
456
456
  }
457
- const wr = "16.1.0", kr = {
457
+ const wr = "17.0.0", kr = {
458
458
  version: wr
459
459
  };
460
460
  function Wt(e, { queueTimeoutMs: t = Qe.QUEUE_WAIT_MS } = {}) {
@@ -691,7 +691,7 @@ async function Fs(e, t) {
691
691
  const s = await Br();
692
692
  return s ? (t.dispatcher = s.dispatcher, s.fetch ?? e) : e;
693
693
  }
694
- async function Zu(e, t) {
694
+ async function Ju(e, t) {
695
695
  const s = { ...t };
696
696
  return (await Fs(globalThis.fetch, s))(e, s);
697
697
  }
@@ -849,7 +849,7 @@ const y = {
849
849
  // OpenAI MCP tools
850
850
  SEARCH: "search",
851
851
  FETCH: "fetch"
852
- }, Qu = {
852
+ }, Xu = {
853
853
  /**
854
854
  * Strips email addresses from tool outputs that expose user data.
855
855
  * Affects: find-project-collaborators, find-completed-tasks
@@ -5440,19 +5440,8 @@ const Nc = {
5440
5440
  };
5441
5441
  }
5442
5442
  }, Lc = {
5443
- projectId: o.string().min(1).describe("The ID of the project to check health for."),
5444
- includeContext: o.boolean().default(!1).describe(
5445
- "Include detailed health context with project metrics and task-level data. May produce large output for projects with many tasks."
5446
- )
5447
- }, Mc = o.object({
5448
- id: o.string().describe("The task ID."),
5449
- content: o.string().describe("The task content/title."),
5450
- priority: o.string().describe("The task priority (1-4)."),
5451
- due: o.string().optional().describe("The due date string, if set."),
5452
- deadline: o.string().optional().describe("The deadline date string, if set."),
5453
- isCompleted: o.boolean().describe("Whether the task is completed."),
5454
- labels: o.array(o.string()).describe("Labels applied to this task.")
5455
- }), Fc = {
5443
+ projectId: o.string().min(1).describe("The ID of the project to check health for.")
5444
+ }, Mc = {
5456
5445
  projectId: o.string().describe("The project ID."),
5457
5446
  projectName: o.string().describe("The project name."),
5458
5447
  progress: o.object({
@@ -5467,105 +5456,52 @@ const Nc = {
5467
5456
  isStale: o.boolean().describe("Whether the health data is stale and may need refreshing."),
5468
5457
  updateInProgress: o.boolean().describe("Whether a health analysis update is currently in progress."),
5469
5458
  updatedAt: o.string().optional().describe("When the health assessment was last updated.")
5470
- }).describe("Project health assessment."),
5471
- context: o.object({
5472
- projectDescription: o.string().optional().describe("The project description, if any."),
5473
- projectMetrics: o.object({
5474
- totalTasks: o.number().describe("Total number of tasks in the project."),
5475
- completedTasks: o.number().describe("Number of completed tasks."),
5476
- overdueTasks: o.number().describe("Number of overdue tasks."),
5477
- tasksCreatedThisWeek: o.number().describe("Tasks created in the current week."),
5478
- tasksCompletedThisWeek: o.number().describe("Tasks completed in the current week."),
5479
- averageCompletionTime: o.number().optional().describe("Average task completion time in days, if available.")
5480
- }).describe("Aggregated project metrics."),
5481
- tasks: o.array(Mc).describe("Tasks in the project.")
5482
- }).optional().describe(
5483
- "Detailed project context with metrics and task data. Only included when includeContext is true."
5484
- )
5459
+ }).describe("Project health assessment.")
5485
5460
  };
5486
- async function Hc(e, t, s) {
5487
- if (s) {
5488
- const [i, a, c] = await Promise.all([
5489
- e.getProjectProgress(t),
5490
- e.getProjectHealth(t),
5491
- e.getProjectHealthContext(t)
5492
- ]);
5493
- return { progress: i, health: a, context: c };
5494
- }
5495
- const [r, n] = await Promise.all([
5496
- e.getProjectProgress(t),
5497
- e.getProjectHealth(t)
5498
- ]);
5499
- return { progress: r, health: n };
5500
- }
5501
- function Wc(e, { progress: t, health: s, context: r }) {
5502
- const n = [`# Project Health: ${e}`, ""];
5503
- if (n.push(`**Status:** ${s.status}`), s.isStale && n.push("**Note:** Health data is stale and may not reflect recent changes."), s.updateInProgress && n.push("**Note:** A health analysis update is currently in progress."), s.updatedAt && n.push(`**Last Updated:** ${s.updatedAt.toISOString()}`), n.push(""), n.push("## Progress"), n.push(
5461
+ function Fc(e, t, s) {
5462
+ const r = [`# Project Health: ${e}`, ""];
5463
+ return r.push(`**Status:** ${s.status}`), s.isStale && r.push("**Note:** Health data is stale and may not reflect recent changes."), s.updateInProgress && r.push("**Note:** A health analysis update is currently in progress."), s.updatedAt && r.push(`**Last Updated:** ${s.updatedAt.toISOString()}`), r.push(""), r.push("## Progress"), r.push(
5504
5464
  `**Completed:** ${t.completedCount} | **Active:** ${t.activeCount} | **Progress:** ${t.progressPercent}%`
5505
- ), s.description && (n.push(""), n.push("## Health Description"), n.push(s.description)), r) {
5506
- n.push(""), n.push("## Project Metrics");
5507
- const i = r.projectMetrics;
5508
- if (n.push(`- **Total Tasks:** ${i.totalTasks}`), n.push(`- **Completed:** ${i.completedTasks}`), n.push(`- **Overdue:** ${i.overdueTasks}`), n.push(`- **Created This Week:** ${i.tasksCreatedThisWeek}`), n.push(`- **Completed This Week:** ${i.tasksCompletedThisWeek}`), i.averageCompletionTime !== null && n.push(`- **Avg Completion Time:** ${i.averageCompletionTime} days`), r.tasks.length > 0) {
5509
- n.push(""), n.push(`## Tasks (${r.tasks.length})`);
5510
- for (const a of r.tasks) {
5511
- const c = [`id=${a.id}`, a.content];
5512
- a.due && c.push(`due=${a.due}`), a.deadline && c.push(`deadline=${a.deadline}`), a.isCompleted && c.push("(completed)"), n.push(`- ${c.join("; ")}`);
5513
- }
5514
- }
5515
- }
5516
- return n.join(`
5465
+ ), s.description && (r.push(""), r.push("## Health Description"), r.push(s.description)), r.join(`
5517
5466
  `);
5518
5467
  }
5519
- const Bc = {
5468
+ const Hc = {
5520
5469
  name: y.GET_PROJECT_HEALTH,
5521
- 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.",
5470
+ description: "Get a comprehensive health assessment for a project including completion progress, health status (EXCELLENT, ON_TRACK, AT_RISK, CRITICAL), and a written assessment. Use find-tasks and find-completed-tasks for task-level detail.",
5522
5471
  parameters: Lc,
5523
- outputSchema: Fc,
5472
+ outputSchema: Mc,
5524
5473
  annotations: {
5525
5474
  readOnlyHint: !0,
5526
5475
  destructiveHint: !1,
5527
5476
  idempotentHint: !0
5528
5477
  },
5529
5478
  async execute(e, t) {
5530
- const { projectId: s, includeContext: r } = e, n = await Hc(t, s, r), i = n.context?.projectName ?? `Project ${s}`, a = Wc(i, n), c = n.context ? {
5531
- projectDescription: n.context.projectDescription ?? void 0,
5532
- projectMetrics: {
5533
- ...n.context.projectMetrics,
5534
- averageCompletionTime: n.context.projectMetrics.averageCompletionTime ?? void 0
5535
- },
5536
- tasks: n.context.tasks.map((d) => ({
5537
- id: d.id,
5538
- content: d.content,
5539
- priority: d.priority,
5540
- due: d.due ?? void 0,
5541
- deadline: d.deadline ?? void 0,
5542
- isCompleted: d.isCompleted,
5543
- labels: d.labels
5544
- }))
5545
- } : void 0;
5479
+ const { projectId: s } = e, [r, n] = await Promise.all([
5480
+ t.getProjectProgress(s),
5481
+ t.getProjectHealth(s)
5482
+ ]), i = `Project ${s}`;
5546
5483
  return {
5547
- textContent: a,
5484
+ textContent: Fc(i, r, n),
5548
5485
  structuredContent: {
5549
5486
  projectId: s,
5550
5487
  projectName: i,
5551
5488
  progress: {
5552
- completedCount: n.progress.completedCount,
5553
- activeCount: n.progress.activeCount,
5554
- progressPercent: n.progress.progressPercent
5489
+ completedCount: r.completedCount,
5490
+ activeCount: r.activeCount,
5491
+ progressPercent: r.progressPercent
5555
5492
  },
5556
5493
  health: {
5557
- status: n.health.status,
5558
- description: n.health.description ?? void 0,
5559
- descriptionSummary: n.health.descriptionSummary ?? void 0,
5560
- isStale: n.health.isStale,
5561
- updateInProgress: n.health.updateInProgress,
5562
- updatedAt: n.health.updatedAt?.toISOString()
5563
- },
5564
- context: c
5494
+ status: n.status,
5495
+ description: n.description ?? void 0,
5496
+ descriptionSummary: n.descriptionSummary ?? void 0,
5497
+ isStale: n.isStale,
5498
+ updateInProgress: n.updateInProgress,
5499
+ updatedAt: n.updatedAt?.toISOString()
5500
+ }
5565
5501
  }
5566
5502
  };
5567
5503
  }
5568
- }, Kc = o.object({
5504
+ }, Wc = o.object({
5569
5505
  message: o.string().optional(),
5570
5506
  emoji: o.string().optional(),
5571
5507
  activeUntil: o.string().optional().describe("ISO 8601 end. Omitted when it has no end."),
@@ -5573,9 +5509,9 @@ const Bc = {
5573
5509
  pauseActivity: o.boolean().describe("Karma and streaks paused.")
5574
5510
  }), Co = {
5575
5511
  hasStatus: o.boolean(),
5576
- status: Kc.optional().describe("Omitted when there is no active status.")
5512
+ status: Wc.optional().describe("Omitted when there is no active status.")
5577
5513
  };
5578
- function qc(e) {
5514
+ function Bc(e) {
5579
5515
  if (!e.user)
5580
5516
  throw new Error("Todoist did not return the user, so the status is unknown.");
5581
5517
  return e.user.status ?? null;
@@ -5584,9 +5520,9 @@ async function jo(e) {
5584
5520
  const t = await j(
5585
5521
  () => e.sync({ resourceTypes: ["user"], syncToken: "*" })
5586
5522
  );
5587
- return qc(t);
5523
+ return Bc(t);
5588
5524
  }
5589
- function zc(e) {
5525
+ function Kc(e) {
5590
5526
  const t = e.activeUntil ? new Date(e.activeUntil).toISOString() : void 0;
5591
5527
  return {
5592
5528
  ...e.message ? { message: e.message } : {},
@@ -5602,7 +5538,7 @@ function ut(e, t) {
5602
5538
  textContent: `${t}: none`,
5603
5539
  structuredContent: { hasStatus: !1 }
5604
5540
  };
5605
- const s = zc(e), r = [`${t}: ${[s.emoji, s.message].filter(Boolean).join(" ")}`];
5541
+ const s = Kc(e), r = [`${t}: ${[s.emoji, s.message].filter(Boolean).join(" ")}`];
5606
5542
  r.push(s.activeUntil ? `Until: ${s.activeUntil}` : "Until: no end");
5607
5543
  const n = [
5608
5544
  s.pauseNotifications ? "Comms notifications paused" : void 0,
@@ -5614,21 +5550,21 @@ function ut(e, t) {
5614
5550
  structuredContent: { hasStatus: !0, status: s }
5615
5551
  };
5616
5552
  }
5617
- const Gc = {}, Yc = {
5553
+ const qc = {}, zc = {
5618
5554
  name: y.GET_USER_STATUS,
5619
5555
  description: "Get the user's status, the message and emoji shown next to their name in Todoist and Comms, with when it ends and whether it pauses Comms notifications or Karma and streaks. Returns no status when none is set or it has expired.",
5620
- parameters: Gc,
5556
+ parameters: qc,
5621
5557
  outputSchema: Co,
5622
5558
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
5623
5559
  async execute(e, t) {
5624
5560
  return ut(await jo(t), "Status");
5625
5561
  }
5626
- }, Vc = {
5562
+ }, Gc = {
5627
5563
  workspaceIdOrName: o.string().min(1).describe(
5628
5564
  "The workspace ID or name. Supports exact ID, exact name match (case-insensitive), or unique partial name match."
5629
5565
  ),
5630
5566
  projectIds: o.array(o.string().min(1)).min(1).max(E.FILTER_VALUES_MAX).optional().describe("Optional list of project IDs to scope insights to specific projects.")
5631
- }, Jc = o.object({
5567
+ }, Yc = o.object({
5632
5568
  projectId: o.string().describe("The project ID."),
5633
5569
  health: o.object({
5634
5570
  status: o.enum(ht).describe("The health status of the project."),
@@ -5640,15 +5576,15 @@ const Gc = {}, Yc = {
5640
5576
  activeCount: o.number().describe("Number of active tasks."),
5641
5577
  progressPercent: o.number().describe("Completion percentage (0-100).")
5642
5578
  }).optional().describe("Progress data for this project. Omitted when the project has none.")
5643
- }), Xc = {
5579
+ }), Vc = {
5644
5580
  workspaceId: o.string().describe("The resolved workspace ID."),
5645
5581
  workspaceName: o.string().describe("The resolved workspace name."),
5646
- projectInsights: o.array(Jc).describe("Health and progress insights for each project in the workspace.")
5647
- }, Zc = {
5582
+ projectInsights: o.array(Yc).describe("Health and progress insights for each project in the workspace.")
5583
+ }, Jc = {
5648
5584
  name: y.GET_WORKSPACE_INSIGHTS,
5649
5585
  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.",
5650
- parameters: Vc,
5651
- outputSchema: Xc,
5586
+ parameters: Gc,
5587
+ outputSchema: Vc,
5652
5588
  annotations: {
5653
5589
  readOnlyHint: !0,
5654
5590
  destructiveHint: !1,
@@ -5688,7 +5624,7 @@ const Gc = {}, Yc = {
5688
5624
  };
5689
5625
  }
5690
5626
  };
5691
- function Qc(e) {
5627
+ function Xc(e) {
5692
5628
  const t = e.trim();
5693
5629
  if (!/^https?:\/\//i.test(t))
5694
5630
  return t;
@@ -5698,7 +5634,7 @@ function Qc(e) {
5698
5634
  } catch {
5699
5635
  throw new Error(`Could not read a template ID from "${t}".`);
5700
5636
  }
5701
- if (!ed(s.hostname))
5637
+ if (!Zc(s.hostname))
5702
5638
  throw new Error(
5703
5639
  `"${s.hostname}" is not a Todoist domain. Pass a todoist.com template URL or the template ID itself.`
5704
5640
  );
@@ -5708,18 +5644,18 @@ function Qc(e) {
5708
5644
  throw new Error(`"${t}" is not a Todoist template URL.`);
5709
5645
  return r.id;
5710
5646
  }
5711
- function ed(e) {
5647
+ function Zc(e) {
5712
5648
  const t = e.toLowerCase();
5713
5649
  return t === "todoist.com" || t.endsWith(".todoist.com");
5714
5650
  }
5715
5651
  function ls(e) {
5716
5652
  return e.replace(/[a-z]/gi, (t) => `[${t.toUpperCase()}${t.toLowerCase()}]`).replace(/\./g, "\\.");
5717
5653
  }
5718
- const td = new RegExp(
5654
+ const Qc = new RegExp(
5719
5655
  String.raw`^\s*(?:[A-Za-z0-9_\-]+|${ls("https")}:\/\/(?:[A-Za-z0-9\-]+\.)*${ls("todoist.com")}(?:\/\S*)?)\s*$`
5720
- ), sd = {
5656
+ ), ed = {
5721
5657
  projectId: o.string().min(1).describe("The ID of the existing project to import the template into."),
5722
- templateId: o.string().regex(td, {
5658
+ templateId: o.string().regex(Qc, {
5723
5659
  error: 'Pass a template slug ("product-launch"), a template ID ("UT_..."), or an https URL on todoist.com or one of its subdomains.'
5724
5660
  }).optional().describe(
5725
5661
  '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.'
@@ -5728,16 +5664,16 @@ const td = new RegExp(
5728
5664
  "Raw CSV template content, as produced by export-project-template. Provide either this or `templateId`, not both."
5729
5665
  ),
5730
5666
  locale: o.string().optional().describe('Locale for the imported content when using `templateId`. Defaults to "en".')
5731
- }, od = {
5667
+ }, td = {
5732
5668
  sections: o.array(Q).describe("Sections created by the import."),
5733
5669
  tasks: o.array(J).describe("Tasks created by the import."),
5734
5670
  comments: o.array(Oe).describe("Comments created by the import."),
5735
5671
  totalCount: o.number().describe("The total number of objects created by the import.")
5736
- }, rd = {
5672
+ }, sd = {
5737
5673
  name: y.IMPORT_PROJECT_TEMPLATE,
5738
5674
  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.",
5739
- parameters: sd,
5740
- outputSchema: od,
5675
+ parameters: ed,
5676
+ outputSchema: td,
5741
5677
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
5742
5678
  async execute({ projectId: e, templateId: t, csvFileContent: s, locale: r }, n) {
5743
5679
  if (!!t == !!s)
@@ -5746,7 +5682,7 @@ const td = new RegExp(
5746
5682
  );
5747
5683
  const i = t ? await n.importTemplateFromId({
5748
5684
  projectId: e,
5749
- templateId: Qc(t),
5685
+ templateId: Xc(t),
5750
5686
  locale: r
5751
5687
  }) : await n.importTemplateIntoProject({
5752
5688
  projectId: e,
@@ -5755,7 +5691,7 @@ const td = new RegExp(
5755
5691
  fileName: "template.csv"
5756
5692
  }), a = i.sections.map(te), c = i.tasks.map(B), d = i.comments.map(xe), l = i.projects.length + a.length + c.length + d.length;
5757
5693
  return {
5758
- textContent: nd({
5694
+ textContent: od({
5759
5695
  projectId: e,
5760
5696
  counts: {
5761
5697
  projects: i.projects.length,
@@ -5769,7 +5705,7 @@ const td = new RegExp(
5769
5705
  };
5770
5706
  }
5771
5707
  };
5772
- function nd({
5708
+ function od({
5773
5709
  projectId: e,
5774
5710
  counts: t,
5775
5711
  totalCount: s
@@ -5779,7 +5715,7 @@ function nd({
5779
5715
  const r = Object.entries(t).filter(([, n]) => n > 0).map(([n, i]) => `${i} ${i === 1 ? n.replace(/s$/, "") : n}`);
5780
5716
  return `Imported template into project (id=${e}): ${r.join(", ")}.`;
5781
5717
  }
5782
- const id = {}, ad = {
5718
+ const rd = {}, nd = {
5783
5719
  id: o.string().describe("The unique identifier for the workspace."),
5784
5720
  name: o.string().describe("The name of the workspace."),
5785
5721
  plan: o.enum(Zo).describe("The workspace plan type."),
@@ -5788,12 +5724,12 @@ const id = {}, ad = {
5788
5724
  isGuestAllowed: o.boolean().describe("Whether guests are allowed in the workspace."),
5789
5725
  createdAt: o.string().optional().describe("The ISO 8601 timestamp when the workspace was created."),
5790
5726
  creatorId: o.string().describe("The ID of the user who created the workspace.")
5791
- }, cd = {
5727
+ }, id = {
5792
5728
  type: o.literal("workspaces").describe("The type of the response."),
5793
- workspaces: o.array(o.object(ad)).describe("List of workspaces."),
5729
+ workspaces: o.array(o.object(nd)).describe("List of workspaces."),
5794
5730
  count: o.number().describe("The total number of workspaces.")
5795
5731
  };
5796
- async function dd(e) {
5732
+ async function ad(e) {
5797
5733
  const s = (await e.getWorkspaces()).map((a) => ({
5798
5734
  id: a.id,
5799
5735
  name: a.name,
@@ -5824,20 +5760,20 @@ async function dd(e) {
5824
5760
  };
5825
5761
  return { textContent: n, structuredContent: i };
5826
5762
  }
5827
- const ld = {
5763
+ const cd = {
5828
5764
  name: y.LIST_WORKSPACES,
5829
5765
  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.",
5830
- parameters: id,
5831
- outputSchema: cd,
5766
+ parameters: rd,
5767
+ outputSchema: id,
5832
5768
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
5833
5769
  async execute(e, t) {
5834
- const s = await dd(t);
5770
+ const s = await ad(t);
5835
5771
  return {
5836
5772
  textContent: s.textContent,
5837
5773
  structuredContent: s.structuredContent
5838
5774
  };
5839
5775
  }
5840
- }, { FIND_TASKS: ud, FIND_PROJECT_COLLABORATORS: us, UPDATE_TASKS: pd } = y, $o = O.BULK_ACTIONS_PER_OPERATION, hd = {
5776
+ }, { FIND_TASKS: dd, FIND_PROJECT_COLLABORATORS: us, UPDATE_TASKS: ld } = y, $o = O.BULK_ACTIONS_PER_OPERATION, ud = {
5841
5777
  operation: o.enum(["assign", "unassign", "reassign"]).describe("The assignment operation to perform."),
5842
5778
  taskIds: o.array(o.string()).min(1).max($o).describe("The IDs of the tasks to operate on (max 50)."),
5843
5779
  responsibleUser: o.string().optional().describe(
@@ -5847,7 +5783,7 @@ const ld = {
5847
5783
  "For reassign operations: the current assignee to reassign from. Can be user ID, name, or email. Optional - if not provided, reassigns from any current assignee."
5848
5784
  ),
5849
5785
  dryRun: o.boolean().optional().default(!1).describe("If true, validates operations without executing them.")
5850
- }, md = {
5786
+ }, pd = {
5851
5787
  results: o.array(
5852
5788
  o.object({
5853
5789
  taskId: o.string().describe("The ID of the task."),
@@ -5863,11 +5799,11 @@ const ld = {
5863
5799
  failed: o.number().describe("Number of failed operations."),
5864
5800
  dryRun: o.boolean().describe("Whether this was a dry run.")
5865
5801
  }).optional().describe("Summary of the operation.")
5866
- }, fd = {
5802
+ }, hd = {
5867
5803
  name: y.MANAGE_ASSIGNMENTS,
5868
5804
  description: `Assign, unassign or reassign up to ${$o} 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.`,
5869
- parameters: hd,
5870
- outputSchema: md,
5805
+ parameters: ud,
5806
+ outputSchema: pd,
5871
5807
  // Open world: assigning a task notifies the new assignee.
5872
5808
  annotations: {
5873
5809
  readOnlyHint: !1,
@@ -6096,8 +6032,8 @@ function ze({
6096
6032
  `;
6097
6033
  }
6098
6034
  return !s && r.length > 0 ? (c += `**Next steps:**
6099
- `, c += `• Use ${ud} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
6100
- `, c += `• Use ${pd} for individual assignment changes
6035
+ `, c += `• Use ${dd} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
6036
+ `, c += `• Use ${ld} for individual assignment changes
6101
6037
  `, n.length > 0 && (c += `• Check failed tasks and use ${us} to verify collaborator access
6102
6038
  `)) : s ? (c += `**To execute:**
6103
6039
  `, c += `• Remove dryRun parameter and run again to execute changes
@@ -6109,26 +6045,26 @@ function ze({
6109
6045
  `, c += `• Use dryRun=true to validate before executing
6110
6046
  `), c;
6111
6047
  }
6112
- const { FIND_PROJECTS: bd } = y, gd = {
6048
+ const { FIND_PROJECTS: md } = y, fd = {
6113
6049
  action: o.enum(["archive", "unarchive", "join"]).describe("The action to perform on the project."),
6114
6050
  projectId: o.string().min(1).describe("The ID of the project.")
6115
- }, yd = {
6051
+ }, bd = {
6116
6052
  project: pe.describe("The updated project."),
6117
6053
  success: o.boolean().describe("Whether the action was successful.")
6118
- }, Td = {
6054
+ }, gd = {
6119
6055
  archive: "Archived",
6120
6056
  unarchive: "Unarchived",
6121
6057
  join: "Joined"
6122
- }, wd = {
6058
+ }, yd = {
6123
6059
  name: y.PROJECT_MANAGEMENT,
6124
- description: `Archive or unarchive a project by its ID, or join a workspace project the user hasn't joined (see ${bd} includeUnjoined) when they ask to.`,
6125
- parameters: gd,
6126
- outputSchema: yd,
6060
+ description: `Archive or unarchive a project by its ID, or join a workspace project the user hasn't joined (see ${md} includeUnjoined) when they ask to.`,
6061
+ parameters: fd,
6062
+ outputSchema: bd,
6127
6063
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
6128
6064
  async execute(e, t) {
6129
- const s = await kd(e, t), r = ue(s);
6065
+ const s = await Td(e, t), r = ue(s);
6130
6066
  return {
6131
- textContent: `${Td[e.action]} project: ${r.name} (id=${r.id})`,
6067
+ textContent: `${gd[e.action]} project: ${r.name} (id=${r.id})`,
6132
6068
  structuredContent: {
6133
6069
  project: r,
6134
6070
  success: !0
@@ -6136,7 +6072,7 @@ const { FIND_PROJECTS: bd } = y, gd = {
6136
6072
  };
6137
6073
  }
6138
6074
  };
6139
- async function kd({ action: e, projectId: t }, s) {
6075
+ async function Td({ action: e, projectId: t }, s) {
6140
6076
  switch (e) {
6141
6077
  case "archive":
6142
6078
  return s.archiveProject(t);
@@ -6153,7 +6089,7 @@ async function kd({ action: e, projectId: t }, s) {
6153
6089
  }
6154
6090
  }
6155
6091
  }
6156
- const vd = {
6092
+ const wd = {
6157
6093
  action: o.enum(["move-to-workspace", "move-to-personal"]).describe("The action to perform on the project."),
6158
6094
  projectId: o.string().min(1).describe("The ID of the project to move."),
6159
6095
  workspaceId: o.string().min(1).optional().describe("The target workspace ID. Required when action is move-to-workspace."),
@@ -6161,14 +6097,14 @@ const vd = {
6161
6097
  visibility: o.enum(["restricted", "team", "public"]).optional().describe(
6162
6098
  "Optional access visibility for the project in the workspace (restricted, team, or public)."
6163
6099
  )
6164
- }, Id = {
6100
+ }, kd = {
6165
6101
  project: pe.describe("The moved project."),
6166
6102
  success: o.boolean().describe("Whether the move was successful.")
6167
- }, Sd = {
6103
+ }, vd = {
6168
6104
  name: y.PROJECT_MOVE,
6169
6105
  description: "Move a project between personal and workspace contexts.",
6170
- parameters: vd,
6171
- outputSchema: Id,
6106
+ parameters: wd,
6107
+ outputSchema: kd,
6172
6108
  // Destructive: move-to-personal removes every collaborator from the project.
6173
6109
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !0 },
6174
6110
  async execute(e, t) {
@@ -6203,7 +6139,7 @@ function Eo(e, t) {
6203
6139
  for (const p of r)
6204
6140
  if (!s.has(p))
6205
6141
  throw new Error(`Sibling id=${p} is not in the list being reordered`);
6206
- const n = e.every((p) => p.key !== null), a = [...e].sort(n ? Ed : Ad).filter((p) => !r.has(p.id)), c = [...t].sort((p, m) => p.position - m.position);
6142
+ const n = e.every((p) => p.key !== null), a = [...e].sort(n ? jd : $d).filter((p) => !r.has(p.id)), c = [...t].sort((p, m) => p.position - m.position);
6207
6143
  let d;
6208
6144
  for (const { id: p, position: m } of c) {
6209
6145
  const b = s.get(p);
@@ -6211,8 +6147,8 @@ function Eo(e, t) {
6211
6147
  const f = d?.position === m ? d.index + 1 : m, g = Math.min(f, a.length);
6212
6148
  a.splice(g, 0, b), d = { position: m, index: g };
6213
6149
  }
6214
- if (!n || !jd(a, r))
6215
- return $d(a);
6150
+ if (!n || !Sd(a, r))
6151
+ return Cd(a);
6216
6152
  const l = /* @__PURE__ */ new Map();
6217
6153
  let u = [], h = null;
6218
6154
  for (const p of a) {
@@ -6225,7 +6161,7 @@ function Eo(e, t) {
6225
6161
  return ps(u, h, null, l), l;
6226
6162
  }
6227
6163
  function ps(e, t, s, r) {
6228
- if (e.length === 0 || Cd(e, t, s))
6164
+ if (e.length === 0 || Id(e, t, s))
6229
6165
  return;
6230
6166
  const n = Ds(t, s, e.length);
6231
6167
  e.forEach((i, a) => {
@@ -6233,7 +6169,7 @@ function ps(e, t, s, r) {
6233
6169
  c !== void 0 && c !== i.key && r.set(i.id, c);
6234
6170
  });
6235
6171
  }
6236
- function Cd(e, t, s) {
6172
+ function Id(e, t, s) {
6237
6173
  let r = t;
6238
6174
  for (const { key: n } of e) {
6239
6175
  if (n === null || r !== null && n <= r)
@@ -6242,7 +6178,7 @@ function Cd(e, t, s) {
6242
6178
  }
6243
6179
  return s === null || r !== null && r < s;
6244
6180
  }
6245
- function jd(e, t) {
6181
+ function Sd(e, t) {
6246
6182
  let s = null;
6247
6183
  for (const { id: r, key: n } of e)
6248
6184
  if (!t.has(r)) {
@@ -6252,21 +6188,21 @@ function jd(e, t) {
6252
6188
  }
6253
6189
  return !0;
6254
6190
  }
6255
- function $d(e) {
6191
+ function Cd(e) {
6256
6192
  const t = Ds(null, null, e.length), s = /* @__PURE__ */ new Map();
6257
6193
  return e.forEach((r, n) => {
6258
6194
  const i = t[n];
6259
6195
  i !== void 0 && i !== r.key && s.set(r.id, i);
6260
6196
  }), s;
6261
6197
  }
6262
- function Ed(e, t) {
6198
+ function jd(e, t) {
6263
6199
  const s = e.key ?? "", r = t.key ?? "";
6264
6200
  return s < r ? -1 : s > r ? 1 : 0;
6265
6201
  }
6266
- function Ad(e, t) {
6202
+ function $d(e, t) {
6267
6203
  return e.legacyOrder - t.legacyOrder;
6268
6204
  }
6269
- const Ao = ["project", "section"], Dd = o.object({
6205
+ const Ao = ["project", "section"], Ed = o.object({
6270
6206
  id: o.string().min(1).describe("The ID of the entity."),
6271
6207
  order: o.number().int().min(0).optional().describe(
6272
6208
  "0-based position among its siblings after the reorder: 0 is first, past the end is last. Unlisted siblings keep their relative order."
@@ -6274,25 +6210,25 @@ const Ao = ["project", "section"], Dd = o.object({
6274
6210
  parentId: o.string().min(1).optional().describe(
6275
6211
  'Move a personal project under this parent project ID, or "root" for the top level. Personal projects only.'
6276
6212
  )
6277
- }), xd = {
6213
+ }), Ad = {
6278
6214
  type: o.enum(Ao).describe(
6279
6215
  '"project": personal projects among the siblings under their parent, or workspace projects within their folder. "section": sections within their project.'
6280
6216
  ),
6281
- items: o.array(Dd).min(1).max(O.BULK_ACTIONS_PER_OPERATION).describe(
6217
+ items: o.array(Ed).min(1).max(O.BULK_ACTIONS_PER_OPERATION).describe(
6282
6218
  "Each item needs order and/or parentId. Moves happen first, so order is a position under the new parent."
6283
6219
  )
6284
- }, Od = {
6220
+ }, Dd = {
6285
6221
  type: o.enum(Ao).describe("The type of entity that was reordered/moved."),
6286
6222
  movedCount: o.number().describe("The number of entities moved to a new parent."),
6287
6223
  reorderedCount: o.number().describe("The number of entities reordered."),
6288
6224
  affectedIds: o.array(o.string()).describe("The IDs of the entities moved or reordered."),
6289
6225
  failures: o.array(P).describe("Entities that could not be moved or reordered, with the reason for each."),
6290
6226
  success: o.boolean().describe("Whether every entity was moved and reordered as asked.")
6291
- }, _d = {
6227
+ }, xd = {
6292
6228
  name: y.REORDER_OBJECTS,
6293
6229
  description: 'Reorder projects or sections, and optionally move personal projects to a new parent. Personal projects: order places a project among its siblings; parentId moves it ("root" for top level). Workspace projects: order places a project within its folder, in the shared default ordering every member sees; needs permission to reorder the workspace. Sections: order places a section within its project.',
6294
- parameters: xd,
6295
- outputSchema: Od,
6230
+ parameters: Ad,
6231
+ outputSchema: Dd,
6296
6232
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
6297
6233
  async execute(e, t) {
6298
6234
  const { type: s, items: r } = e, n = /* @__PURE__ */ new Set();
@@ -6308,7 +6244,7 @@ const Ao = ["project", "section"], Dd = o.object({
6308
6244
  `parentId is only supported when type is "project", but type is "${s}".`
6309
6245
  );
6310
6246
  }
6311
- const i = s === "project" ? await Ud(t, r) : await Pd(t, r);
6247
+ const i = s === "project" ? await Od(t, r) : await _d(t, r);
6312
6248
  U(y.REORDER_OBJECTS, r.length, i.failures);
6313
6249
  const a = s === "project" ? "projects" : "sections", c = r.map((u) => u.id).filter((u) => i.movedIds.has(u) || i.reorderedIds.has(u)), d = [];
6314
6250
  i.movedIds.size > 0 && d.push(`moved ${i.movedIds.size}`), (i.reorderedIds.size > 0 || d.length === 0) && d.push(`reordered ${i.reorderedIds.size}`);
@@ -6326,12 +6262,12 @@ const Ao = ["project", "section"], Dd = o.object({
6326
6262
  };
6327
6263
  }
6328
6264
  };
6329
- async function Ud(e, t) {
6265
+ async function Od(e, t) {
6330
6266
  const s = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), n = [];
6331
6267
  let i = await ms(e);
6332
6268
  const a = [];
6333
6269
  for (const b of t) {
6334
- const f = i.get(b.id), g = f ? Rd(f, b) : "Project not found, or you do not have access to it.";
6270
+ const f = i.get(b.id), g = f ? Ud(f, b) : "Project not found, or you do not have access to it.";
6335
6271
  g ? n.push({ item: b.id, error: g }) : a.push(b);
6336
6272
  }
6337
6273
  const c = a.filter((b) => b.parentId !== void 0), d = /* @__PURE__ */ new Set();
@@ -6367,7 +6303,7 @@ async function Ud(e, t) {
6367
6303
  });
6368
6304
  return { movedIds: s, reorderedIds: r, failures: n };
6369
6305
  }
6370
- const u = Do([...i.values()].filter(Nd), hs), h = /* @__PURE__ */ new Map(), p = [];
6306
+ const u = Do([...i.values()].filter(Pd), hs), h = /* @__PURE__ */ new Map(), p = [];
6371
6307
  for (const b of l) {
6372
6308
  const f = i.get(b.id);
6373
6309
  if (!f) {
@@ -6380,7 +6316,7 @@ async function Ud(e, t) {
6380
6316
  }
6381
6317
  const m = [];
6382
6318
  for (const [b, f] of h) {
6383
- const g = u.get(b) ?? [], w = Eo(g.map(Ld), f);
6319
+ const g = u.get(b) ?? [], w = Eo(g.map(Rd), f);
6384
6320
  for (const [I, k] of w) {
6385
6321
  const C = i.get(I);
6386
6322
  m.push({
@@ -6394,8 +6330,8 @@ async function Ud(e, t) {
6394
6330
  }
6395
6331
  return await xo(e, m, p, r, n), { movedIds: s, reorderedIds: r, failures: n };
6396
6332
  }
6397
- async function Pd(e, t) {
6398
- const s = /* @__PURE__ */ new Set(), r = [], n = await Md(e), i = Do(
6333
+ async function _d(e, t) {
6334
+ const s = /* @__PURE__ */ new Set(), r = [], n = await Nd(e), i = Do(
6399
6335
  [...n.values()].filter((u) => !u.isDeleted && !u.isArchived),
6400
6336
  (u) => u.projectId
6401
6337
  ), a = t.filter((u) => u.order !== void 0), c = /* @__PURE__ */ new Map(), d = [];
@@ -6454,7 +6390,7 @@ async function xo(e, t, s, r, n) {
6454
6390
  for (const { id: a } of s)
6455
6391
  i.has(a) || r.add(a);
6456
6392
  }
6457
- function Rd(e, t) {
6393
+ function Ud(e, t) {
6458
6394
  if (e.isDeleted)
6459
6395
  return "Project not found, or you do not have access to it.";
6460
6396
  if (e.isArchived)
@@ -6464,13 +6400,13 @@ function Rd(e, t) {
6464
6400
  if (H(e) && t.parentId !== void 0)
6465
6401
  return "parentId is only supported for personal projects. Workspace projects are ordered within their folder; omit parentId to reorder it there.";
6466
6402
  }
6467
- function Nd(e) {
6403
+ function Pd(e) {
6468
6404
  return e.isDeleted || e.isArchived ? !1 : H(e) || !e.inboxProject;
6469
6405
  }
6470
6406
  function hs(e) {
6471
6407
  return H(e) ? `workspace:${e.workspaceId}:${e.folderId ?? "root"}` : `personal:${e.parentId ?? "root"}`;
6472
6408
  }
6473
- function Ld(e) {
6409
+ function Rd(e) {
6474
6410
  return H(e) ? {
6475
6411
  id: e.id,
6476
6412
  key: e.defaultOrderKey ?? null,
@@ -6483,30 +6419,30 @@ async function ms(e) {
6483
6419
  );
6484
6420
  return new Map((t.projects ?? []).map((s) => [s.id, s]));
6485
6421
  }
6486
- async function Md(e) {
6422
+ async function Nd(e) {
6487
6423
  const t = await j(
6488
6424
  () => e.sync({ resourceTypes: ["sections"], syncToken: "*" })
6489
6425
  );
6490
6426
  return new Map((t.sections ?? []).map((s) => [s.id, s]));
6491
6427
  }
6492
- const Fd = o.object({
6428
+ const Ld = o.object({
6493
6429
  id: o.string().min(1).describe("The ID of the task to reschedule."),
6494
6430
  date: o.string().min(1).describe(
6495
6431
  "The new date for the task. Use YYYY-MM-DD for date-only, or YYYY-MM-DDTHH:MM:SS for datetime. If date-only is provided and the task already has a specific time, the existing time is preserved."
6496
6432
  ),
6497
6433
  duration: o.string().optional().describe('Optional new duration, e.g. for time-blocking: "15m", "1h", "2h30m".')
6498
- }), Hd = {
6499
- tasks: o.array(Fd).min(1).max(O.BULK_ACTIONS_PER_OPERATION).describe("The tasks to reschedule with their new dates.")
6500
- }, Wd = {
6434
+ }), Md = {
6435
+ tasks: o.array(Ld).min(1).max(O.BULK_ACTIONS_PER_OPERATION).describe("The tasks to reschedule with their new dates.")
6436
+ }, Fd = {
6501
6437
  tasks: o.array(J).describe("The rescheduled tasks."),
6502
6438
  totalCount: o.number().describe("The total number of tasks rescheduled."),
6503
6439
  rescheduledTaskIds: o.array(o.string()).describe("The IDs of the rescheduled tasks."),
6504
6440
  failures: o.array(P).describe("Tasks that could not be rescheduled, with reasons.")
6505
- }, Bd = {
6441
+ }, Hd = {
6506
6442
  name: y.RESCHEDULE_TASKS,
6507
6443
  description: "Reschedule tasks to new dates while preserving recurring schedules. Unlike update-tasks (which replaces the entire due string and can wipe recurrence), this tool changes only the date (and duration, if given), keeping recurrence patterns intact. Use this when moving recurring tasks to a different date or time without altering their repeat pattern. Without a due date, the deadline moves.",
6508
- parameters: Hd,
6509
- outputSchema: Wd,
6444
+ parameters: Md,
6445
+ outputSchema: Fd,
6510
6446
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6511
6447
  async execute(e, t) {
6512
6448
  const { tasks: s } = e, r = s.map(
@@ -6521,7 +6457,7 @@ const Fd = o.object({
6521
6457
  n.push({ item: b.id, error: D(p.reason) });
6522
6458
  return;
6523
6459
  }
6524
- const f = p.value, g = Kd(b.date, f);
6460
+ const f = p.value, g = Wd(b.date, f);
6525
6461
  g && a.push({
6526
6462
  id: b.id,
6527
6463
  command: ce("item_update", {
@@ -6577,11 +6513,11 @@ Could not read back ${l.join(", ")}: ${u}` : Et("Rescheduled", d, {
6577
6513
  };
6578
6514
  }
6579
6515
  };
6580
- function Kd(e, t) {
6516
+ function Wd(e, t) {
6581
6517
  if (t.due)
6582
6518
  return {
6583
6519
  due: {
6584
- date: qd(e, t.due),
6520
+ date: Bd(e, t.due),
6585
6521
  string: t.due.string,
6586
6522
  isRecurring: t.due.isRecurring,
6587
6523
  timezone: t.due.timezone ?? void 0,
@@ -6591,16 +6527,16 @@ function Kd(e, t) {
6591
6527
  if (t.deadline)
6592
6528
  return { deadline: { date: e.slice(0, 10) } };
6593
6529
  }
6594
- function qd(e, t) {
6530
+ function Bd(e, t) {
6595
6531
  if (/^\d{4}-\d{2}-\d{2}$/.test(e) && t.datetime) {
6596
6532
  const r = t.datetime.substring(10);
6597
6533
  return e + r;
6598
6534
  }
6599
6535
  return e;
6600
6536
  }
6601
- const zd = {
6537
+ const Kd = {
6602
6538
  query: o.string().min(1).describe("The search query string to find tasks and projects.")
6603
- }, Gd = {
6539
+ }, qd = {
6604
6540
  results: o.array(
6605
6541
  o.object({
6606
6542
  id: o.string().describe("The ID of the result."),
@@ -6609,11 +6545,11 @@ const zd = {
6609
6545
  })
6610
6546
  ).describe("The search results."),
6611
6547
  totalCount: o.number().describe("Total number of results found.")
6612
- }, Yd = {
6548
+ }, zd = {
6613
6549
  name: y.SEARCH,
6614
6550
  description: "Search across tasks and projects in Todoist. Returns a list of relevant results with IDs, titles, and URLs.",
6615
- parameters: zd,
6616
- outputSchema: Gd,
6551
+ parameters: Kd,
6552
+ outputSchema: qd,
6617
6553
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
6618
6554
  async execute(e, t) {
6619
6555
  const { query: s } = e, [r, n] = await Promise.all([
@@ -6642,8 +6578,8 @@ const zd = {
6642
6578
  structuredContent: { results: i, totalCount: i.length }
6643
6579
  };
6644
6580
  }
6645
- }, Vd = 80, Jd = {
6646
- message: o.string().trim().min(1).max(Vd).optional().describe("Omit for an emoji-only status."),
6581
+ }, Gd = 80, Yd = {
6582
+ message: o.string().trim().min(1).max(Gd).optional().describe("Omit for an emoji-only status."),
6647
6583
  emoji: o.string().trim().min(1).optional().describe("A Unicode emoji, such as 🏝️."),
6648
6584
  activeUntil: o.string().trim().optional().describe(
6649
6585
  "When it ends: a future ISO 8601 timestamp with Z or an offset, e.g. 2026-11-10T00:00:00+00:00. Omit for no end."
@@ -6651,20 +6587,20 @@ const zd = {
6651
6587
  pauseNotifications: o.boolean().optional().describe("Hold back Comms notifications while active. They are not sent later."),
6652
6588
  pauseActivity: o.boolean().optional().describe("Pause Karma and streaks while active."),
6653
6589
  clear: o.boolean().optional().describe("Remove the status. Use alone.")
6654
- }, Xd = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(Z|([+-])(\d{2}):(\d{2}))$/i, Zd = -720, Qd = 840;
6590
+ }, Vd = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(Z|([+-])(\d{2}):(\d{2}))$/i, Jd = -720, Xd = 840;
6655
6591
  function Ge(e) {
6656
6592
  return new Error(
6657
6593
  `activeUntil must be an ISO 8601 timestamp with Z or an offset, such as "2026-11-10T00:00:00+00:00". Got "${e}".`
6658
6594
  );
6659
6595
  }
6660
- function el(e, t) {
6661
- const s = Xd.exec(e);
6596
+ function Zd(e, t) {
6597
+ const s = Vd.exec(e);
6662
6598
  if (!s)
6663
6599
  throw Ge(e);
6664
6600
  const [, r, n, i, a, c, d = "0", l = ""] = s, [u, h, p, m, b, f] = [r, n, i, a, c, d].map(Number), g = /* @__PURE__ */ new Date(0);
6665
6601
  g.setUTCFullYear(u, h - 1, p), g.setUTCHours(m, b, f);
6666
6602
  const w = g.getUTCFullYear() === u && g.getUTCMonth() === h - 1 && g.getUTCDate() === p && g.getUTCHours() === m && g.getUTCMinutes() === b && g.getUTCSeconds() === f, I = l.toUpperCase() === "Z" ? 0 : ho(l);
6667
- if (!w || I < Zd || I > Qd)
6603
+ if (!w || I < Jd || I > Xd)
6668
6604
  throw Ge(e);
6669
6605
  const k = new Date(e);
6670
6606
  if (Number.isNaN(k.getTime()))
@@ -6674,7 +6610,7 @@ function el(e, t) {
6674
6610
  return k.toISOString();
6675
6611
  }
6676
6612
  const fs = { scope: { mode: "all" } };
6677
- function tl(e, t) {
6613
+ function Qd(e, t) {
6678
6614
  const { clear: s, message: r, emoji: n, activeUntil: i, pauseNotifications: a, pauseActivity: c } = e;
6679
6615
  if (s) {
6680
6616
  if (r !== void 0 || n !== void 0 || i !== void 0 || a === !0 || c === !0)
@@ -6688,7 +6624,7 @@ function tl(e, t) {
6688
6624
  return {
6689
6625
  message: r ?? null,
6690
6626
  emoji: n ?? null,
6691
- activeUntil: i !== void 0 ? el(i, t) : null,
6627
+ activeUntil: i !== void 0 ? Zd(i, t) : null,
6692
6628
  effects: a || c ? {
6693
6629
  pauseNotifications: a ? fs : null,
6694
6630
  pauseActivity: c ? fs : null
@@ -6698,17 +6634,17 @@ function tl(e, t) {
6698
6634
  function bs(e) {
6699
6635
  return e ? e.replace(/\uFE0F/g, "") : null;
6700
6636
  }
6701
- function sl(e, t) {
6637
+ function el(e, t) {
6702
6638
  const s = e.activeUntil ? new Date(e.activeUntil).getTime() : null, r = t.activeUntil ? new Date(t.activeUntil).getTime() : null;
6703
6639
  return (
6704
6640
  // An emoji-only status may be held with its message null or left out.
6705
6641
  (e.message ?? null) === (t.message ?? null) && bs(e.emoji) === bs(t.emoji) && s === r && !!e.effects?.pauseNotifications == !!t.effects?.pauseNotifications && !!e.effects?.pauseActivity == !!t.effects?.pauseActivity
6706
6642
  );
6707
6643
  }
6708
- const ol = {
6644
+ const tl = {
6709
6645
  name: y.SET_USER_STATUS,
6710
6646
  description: "Set or clear the user's status, shown next to their name in Todoist and Comms. It needs a message, an emoji or both. Replaces the whole status: any field omitted is removed, not kept. Use clear to remove the status.",
6711
- parameters: Jd,
6647
+ parameters: Yd,
6712
6648
  outputSchema: Co,
6713
6649
  annotations: {
6714
6650
  readOnlyHint: !1,
@@ -6717,7 +6653,7 @@ const ol = {
6717
6653
  openWorldHint: !0
6718
6654
  },
6719
6655
  async execute(e, t) {
6720
- const s = tl(e, /* @__PURE__ */ new Date()), {
6656
+ const s = Qd(e, /* @__PURE__ */ new Date()), {
6721
6657
  outcomes: [r]
6722
6658
  } = await Ce(t, [ce("user_update", { status: s })]);
6723
6659
  if (r?.status !== "fulfilled")
@@ -6738,25 +6674,25 @@ const ol = {
6738
6674
  throw new Error(
6739
6675
  "Todoist accepted the status but reports no active status, so it may have expired already."
6740
6676
  );
6741
- if (!sl(n, s))
6677
+ if (!el(n, s))
6742
6678
  throw new Error(
6743
6679
  `Todoist accepted the status but reports a different one. Another app may have changed it at the same moment; use ${y.GET_USER_STATUS} to see it.`
6744
6680
  );
6745
6681
  return ut(n, "Status set");
6746
6682
  }
6747
- }, rl = {
6683
+ }, sl = {
6748
6684
  ids: o.array(o.string().min(1)).min(1).max(O.BULK_ACTIONS_PER_OPERATION).describe("The IDs of the tasks to uncomplete.")
6749
- }, nl = {
6685
+ }, ol = {
6750
6686
  uncompleted: o.array(o.string()).describe("The IDs of successfully uncompleted tasks."),
6751
6687
  failures: o.array(P).describe("Failed task uncompletion with error details."),
6752
6688
  totalRequested: o.number().describe("The total number of tasks requested to uncomplete."),
6753
6689
  successCount: o.number().describe("The number of successfully uncompleted tasks."),
6754
6690
  failureCount: o.number().describe("The number of failed task uncompletions.")
6755
- }, il = {
6691
+ }, rl = {
6756
6692
  name: y.UNCOMPLETE_TASKS,
6757
6693
  description: "Uncomplete (reopen) one or more completed tasks by their IDs.",
6758
- parameters: rl,
6759
- outputSchema: nl,
6694
+ parameters: sl,
6695
+ outputSchema: ol,
6760
6696
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
6761
6697
  async execute(e, t) {
6762
6698
  const s = [], r = [];
@@ -6770,7 +6706,7 @@ const ol = {
6770
6706
  });
6771
6707
  }
6772
6708
  return U(y.UNCOMPLETE_TASKS, e.ids.length, r), {
6773
- textContent: al({
6709
+ textContent: nl({
6774
6710
  uncompleted: s,
6775
6711
  failures: r,
6776
6712
  args: e
@@ -6785,7 +6721,7 @@ const ol = {
6785
6721
  };
6786
6722
  }
6787
6723
  };
6788
- function al({
6724
+ function nl({
6789
6725
  uncompleted: e,
6790
6726
  failures: t,
6791
6727
  args: s
@@ -6799,12 +6735,12 @@ function al({
6799
6735
  failures: t
6800
6736
  });
6801
6737
  }
6802
- const cl = o.object({
6738
+ const il = o.object({
6803
6739
  id: o.string().min(1).describe("The ID of the comment to update."),
6804
6740
  content: o.string().min(1).describe("The new content for the comment.")
6805
- }), dl = {
6806
- comments: o.array(cl).min(1).max(O.ITEMS_PER_OPERATION).describe("The comments to update.")
6807
- }, ll = {
6741
+ }), al = {
6742
+ comments: o.array(il).min(1).max(O.ITEMS_PER_OPERATION).describe("The comments to update.")
6743
+ }, cl = {
6808
6744
  comments: o.array(Oe).describe("The updated comments."),
6809
6745
  totalCount: o.number().describe("The total number of comments updated."),
6810
6746
  updatedCommentIds: o.array(o.string()).describe("The IDs of the updated comments."),
@@ -6813,11 +6749,11 @@ const cl = o.object({
6813
6749
  updateCount: o.number().describe("The number of comments updated."),
6814
6750
  failureCount: o.number()
6815
6751
  }).describe("Summary of operations performed.")
6816
- }, ul = {
6752
+ }, dl = {
6817
6753
  name: y.UPDATE_COMMENTS,
6818
6754
  description: "Update multiple existing comments with new content.",
6819
- parameters: dl,
6820
- outputSchema: ll,
6755
+ parameters: al,
6756
+ outputSchema: cl,
6821
6757
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6822
6758
  async execute(e, t) {
6823
6759
  const { comments: s } = e, r = await Promise.allSettled(
@@ -6834,7 +6770,7 @@ const cl = o.object({
6834
6770
  });
6835
6771
  }), U(y.UPDATE_COMMENTS, s.length, i), {
6836
6772
  textContent: N(
6837
- pl({ comments: n }),
6773
+ ll({ comments: n }),
6838
6774
  i
6839
6775
  ),
6840
6776
  structuredContent: {
@@ -6850,7 +6786,7 @@ const cl = o.object({
6850
6786
  };
6851
6787
  }
6852
6788
  };
6853
- function pl({ comments: e }) {
6789
+ function ll({ comments: e }) {
6854
6790
  const t = e.filter((i) => i.taskId).length, s = e.filter((i) => i.projectId).length, r = [];
6855
6791
  if (t > 0) {
6856
6792
  const i = t > 1 ? "comments" : "comment";
@@ -6862,7 +6798,7 @@ function pl({ comments: e }) {
6862
6798
  }
6863
6799
  return r.length > 0 ? `Updated ${r.join(" and ")}` : "No comments updated";
6864
6800
  }
6865
- const hl = o.object({
6801
+ const ul = o.object({
6866
6802
  id: o.string().min(1).describe("The ID of the filter to update."),
6867
6803
  name: o.string().min(1).optional().describe("The new name of the filter."),
6868
6804
  query: o.string().min(1).optional().describe(
@@ -6877,9 +6813,9 @@ const hl = o.object({
6877
6813
  ).optional(),
6878
6814
  color: ve,
6879
6815
  isFavorite: o.boolean().optional().describe("Whether to mark the filter as a favorite.")
6880
- }), ml = {
6881
- filters: o.array(hl).min(1).max(O.ITEMS_PER_OPERATION).describe("The filters to update.")
6882
- }, fl = {
6816
+ }), pl = {
6817
+ filters: o.array(ul).min(1).max(O.ITEMS_PER_OPERATION).describe("The filters to update.")
6818
+ }, hl = {
6883
6819
  filters: o.array(Dt).describe(
6884
6820
  "The updated filters, as read back after the update. Empty if they could not be read back; updatedFilterIds still lists what was updated."
6885
6821
  ),
@@ -6891,15 +6827,15 @@ const hl = o.object({
6891
6827
  skippedCount: o.number().describe("The number of filters skipped (no changes)."),
6892
6828
  failureCount: o.number()
6893
6829
  }).describe("Summary of operations performed.")
6894
- }, bl = {
6830
+ }, ml = {
6895
6831
  name: y.UPDATE_FILTERS,
6896
6832
  description: "Update one or more existing personal filters with new values.",
6897
- parameters: ml,
6898
- outputSchema: fl,
6833
+ parameters: pl,
6834
+ outputSchema: hl,
6899
6835
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6900
6836
  async execute(e, t) {
6901
6837
  const { filters: s } = e, r = [], i = s.map((m) => {
6902
- const b = Tl(m);
6838
+ const b = gl(m);
6903
6839
  return b !== null ? { kind: "skipped", reason: b } : (r.push(m), { kind: "updated", filter: m });
6904
6840
  }).filter((m) => m.kind === "skipped").length;
6905
6841
  if (r.length === 0)
@@ -6940,11 +6876,11 @@ const hl = o.object({
6940
6876
  error: h
6941
6877
  });
6942
6878
  }
6943
- m && (u = gl(m, new Set(d)));
6879
+ m && (u = fl(m, new Set(d)));
6944
6880
  }
6945
6881
  return {
6946
6882
  textContent: N(
6947
- yl({
6883
+ bl({
6948
6884
  filters: u,
6949
6885
  updatedIds: d,
6950
6886
  skippedCount: i,
@@ -6966,7 +6902,7 @@ const hl = o.object({
6966
6902
  };
6967
6903
  }
6968
6904
  };
6969
- function gl(e, t) {
6905
+ function fl(e, t) {
6970
6906
  return e.filter((s) => !s.isDeleted && t.has(s.id)).map((s) => ({
6971
6907
  id: s.id,
6972
6908
  name: s.name,
@@ -6977,7 +6913,7 @@ function gl(e, t) {
6977
6913
  itemOrder: s.itemOrder
6978
6914
  }));
6979
6915
  }
6980
- function yl({
6916
+ function bl({
6981
6917
  filters: e,
6982
6918
  updatedIds: t,
6983
6919
  skippedCount: s,
@@ -6996,35 +6932,35 @@ ${a}`;
6996
6932
  }
6997
6933
  return i;
6998
6934
  }
6999
- function Tl({ id: e, ...t }) {
6935
+ function gl({ id: e, ...t }) {
7000
6936
  return Object.values(t).every((r) => r === void 0) ? "no-fields" : null;
7001
6937
  }
7002
- const wl = o.object({
6938
+ const yl = o.object({
7003
6939
  labelType: o.literal("personal").describe("Update a personal label, identified by its ID."),
7004
6940
  id: o.string().min(1).describe("The ID of the personal label to update."),
7005
6941
  name: o.string().min(1).max(128).optional().describe("The new name of the label."),
7006
6942
  color: ve,
7007
6943
  order: o.number().int().optional().describe("The new position of the label in the label list."),
7008
6944
  isFavorite: o.boolean().optional().describe("Whether to mark the label as a favorite.")
7009
- }), kl = o.object({
6945
+ }), Tl = o.object({
7010
6946
  labelType: o.literal("shared").describe(
7011
6947
  "Rename a shared label across all tasks. Shared labels are identified by name; only renaming is supported (no color, order, or favorite)."
7012
6948
  ),
7013
6949
  name: o.string().min(1).describe("The current name of the shared label."),
7014
6950
  newName: o.string().min(1).describe("The new name for the shared label.")
7015
- }), vl = o.discriminatedUnion("labelType", [
7016
- wl,
7017
- kl
7018
- ]), Il = {
7019
- labels: o.array(vl).min(1).max(O.ITEMS_PER_OPERATION).describe(
6951
+ }), wl = o.discriminatedUnion("labelType", [
6952
+ yl,
6953
+ Tl
6954
+ ]), kl = {
6955
+ labels: o.array(wl).min(1).max(O.ITEMS_PER_OPERATION).describe(
7020
6956
  'The labels to update. Use labelType="personal" with an ID to update a personal label, or labelType="shared" with name+newName to rename a shared label.'
7021
6957
  )
7022
- }, Sl = o.object({
6958
+ }, vl = o.object({
7023
6959
  name: o.string().describe("The previous name of the shared label."),
7024
6960
  newName: o.string().describe("The new name of the shared label.")
7025
- }), Cl = {
6961
+ }), Il = {
7026
6962
  updatedLabels: o.array(Se).describe("The updated personal labels."),
7027
- renamedSharedLabels: o.array(Sl).describe("The shared labels that were renamed."),
6963
+ renamedSharedLabels: o.array(vl).describe("The shared labels that were renamed."),
7028
6964
  totalCount: o.number().describe("The total number of successful operations (personal + shared)."),
7029
6965
  failures: o.array(P).describe(
7030
6966
  "Labels that could not be updated, identified by ID (personal) or name (shared), with the reason for each."
@@ -7035,17 +6971,17 @@ const wl = o.object({
7035
6971
  skippedCount: o.number().describe("Number of operations skipped (no changes or shared label not found)."),
7036
6972
  failureCount: o.number()
7037
6973
  }).describe("Summary of operations performed.")
7038
- }, jl = {
6974
+ }, Sl = {
7039
6975
  name: y.UPDATE_LABELS,
7040
6976
  description: "Update one or more existing labels. Personal labels (identified by ID) can have their name, color, order, and favorite flag updated. Shared labels (identified by name) can only be renamed.",
7041
- parameters: Il,
7042
- outputSchema: Cl,
6977
+ parameters: kl,
6978
+ outputSchema: Il,
7043
6979
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
7044
6980
  async execute(e, t) {
7045
6981
  const { labels: s } = e, r = await Promise.allSettled(
7046
6982
  s.map(async (p) => {
7047
6983
  if (p.labelType === "personal") {
7048
- const b = El(p);
6984
+ const b = jl(p);
7049
6985
  if (b !== null) return { kind: "skipped", reason: b };
7050
6986
  const { id: f, labelType: g, ...w } = p;
7051
6987
  return { kind: "updated", label: await j(() => t.updateLabel(f, w)) };
@@ -7075,7 +7011,7 @@ const wl = o.object({
7075
7011
  ).length;
7076
7012
  return {
7077
7013
  textContent: N(
7078
- $l({
7014
+ Cl({
7079
7015
  updatedLabels: a,
7080
7016
  renamedSharedLabels: c,
7081
7017
  skippedNoFields: l,
@@ -7098,7 +7034,7 @@ const wl = o.object({
7098
7034
  };
7099
7035
  }
7100
7036
  };
7101
- function $l({
7037
+ function Cl({
7102
7038
  updatedLabels: e,
7103
7039
  renamedSharedLabels: t,
7104
7040
  skippedNoFields: s,
@@ -7120,14 +7056,14 @@ function $l({
7120
7056
  return c.join(`
7121
7057
  `);
7122
7058
  }
7123
- function El({
7059
+ function jl({
7124
7060
  id: e,
7125
7061
  labelType: t,
7126
7062
  ...s
7127
7063
  }) {
7128
7064
  return Object.values(s).every((n) => n === void 0) ? "no-fields" : null;
7129
7065
  }
7130
- const Al = o.object({
7066
+ const $l = o.object({
7131
7067
  id: o.string().min(1).describe("The ID of the project to update."),
7132
7068
  name: o.string().min(1).optional().describe("The new name of the project."),
7133
7069
  isFavorite: o.boolean().optional().describe("Whether the project is a favorite."),
@@ -7142,9 +7078,9 @@ const Al = o.object({
7142
7078
  )
7143
7079
  ).optional(),
7144
7080
  color: ve
7145
- }), Dl = {
7146
- projects: o.array(Al).min(1).max(O.ITEMS_PER_OPERATION).describe("The projects to update.")
7147
- }, xl = {
7081
+ }), El = {
7082
+ projects: o.array($l).min(1).max(O.ITEMS_PER_OPERATION).describe("The projects to update.")
7083
+ }, Al = {
7148
7084
  projects: o.array(pe).describe("The updated projects."),
7149
7085
  totalCount: o.number().describe("The total number of projects updated."),
7150
7086
  updatedProjectIds: o.array(o.string()).describe("The IDs of the updated projects."),
@@ -7154,16 +7090,16 @@ const Al = o.object({
7154
7090
  skippedCount: o.number().describe("The number of projects skipped (no changes)."),
7155
7091
  failureCount: o.number()
7156
7092
  }).describe("Summary of operations performed.")
7157
- }, Ol = {
7093
+ }, Dl = {
7158
7094
  name: y.UPDATE_PROJECTS,
7159
7095
  description: "Update multiple existing projects with new values.",
7160
- parameters: Dl,
7161
- outputSchema: xl,
7096
+ parameters: El,
7097
+ outputSchema: Al,
7162
7098
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
7163
7099
  async execute(e, t) {
7164
7100
  const { projects: s } = e, r = await Promise.allSettled(
7165
7101
  s.map(async (l) => {
7166
- const u = Ul(l);
7102
+ const u = Ol(l);
7167
7103
  if (u !== null) return { kind: "skipped", reason: u };
7168
7104
  const { id: h, ...p } = l;
7169
7105
  return { kind: "updated", project: await j(() => t.updateProject(h, p)) };
@@ -7181,7 +7117,7 @@ const Al = o.object({
7181
7117
  u.value.kind === "updated" ? n.push(ue(u.value.project)) : u.value.reason === "no-fields" ? a++ : c++;
7182
7118
  }
7183
7119
  return U(y.UPDATE_PROJECTS, s.length, i), {
7184
- textContent: _l({
7120
+ textContent: xl({
7185
7121
  projects: n,
7186
7122
  skippedNoFields: a,
7187
7123
  skippedNoValidValues: c,
@@ -7201,7 +7137,7 @@ const Al = o.object({
7201
7137
  };
7202
7138
  }
7203
7139
  };
7204
- function _l({
7140
+ function xl({
7205
7141
  projects: e,
7206
7142
  skippedNoFields: t,
7207
7143
  skippedNoValidValues: s,
@@ -7214,25 +7150,25 @@ function _l({
7214
7150
  return t > 0 && c.push(`${t} skipped - no changes`), s > 0 && c.push(`${s} skipped - no valid field values`), c.length > 0 && (a += ` (${c.join(", ")})`), n > 0 && (a += `:
7215
7151
  ${i}`), N(a, r);
7216
7152
  }
7217
- function Ul({ id: e, ...t }) {
7153
+ function Ol({ id: e, ...t }) {
7218
7154
  const s = Object.values(t);
7219
7155
  return s.length === 0 ? "no-fields" : s.every((r) => r === void 0) ? "no-valid-values" : null;
7220
7156
  }
7221
- const Pl = o.object({
7157
+ const _l = o.object({
7222
7158
  type: o.literal("relative"),
7223
7159
  id: o.string().min(1).describe("The ID of the relative reminder to update."),
7224
7160
  minuteOffset: o.number().int().min(0).optional().describe("New minute offset before task due time."),
7225
7161
  service: Me.optional().describe('New delivery method: "email" or "push".'),
7226
7162
  isUrgent: Fe,
7227
7163
  notifyUser: Ut
7228
- }), Rl = o.object({
7164
+ }), Ul = o.object({
7229
7165
  type: o.literal("absolute"),
7230
7166
  id: o.string().min(1).describe("The ID of the absolute reminder to update."),
7231
7167
  due: no.optional().describe("New due date/time for the reminder."),
7232
7168
  service: Me.optional().describe('New delivery method: "email" or "push".'),
7233
7169
  isUrgent: Fe,
7234
7170
  notifyUser: Ut
7235
- }), Nl = o.object({
7171
+ }), Pl = o.object({
7236
7172
  type: o.literal("location"),
7237
7173
  id: o.string().min(1).describe("The ID of the location reminder to update."),
7238
7174
  name: o.string().optional().describe("New location name."),
@@ -7243,15 +7179,15 @@ const Pl = o.object({
7243
7179
  ),
7244
7180
  radius: o.number().int().optional().describe("New radius in meters."),
7245
7181
  notifyUser: Ut
7246
- }), Ll = o.discriminatedUnion("type", [
7247
- Pl,
7248
- Rl,
7249
- Nl
7250
- ]), Ml = {
7251
- reminders: o.array(Ll).min(1).max(Pe).describe(
7182
+ }), Rl = o.discriminatedUnion("type", [
7183
+ _l,
7184
+ Ul,
7185
+ Pl
7186
+ ]), Nl = {
7187
+ reminders: o.array(Rl).min(1).max(Pe).describe(
7252
7188
  `Array of reminders to update (max ${Pe}). Each must include the reminder type and ID. Only include fields that need to change.`
7253
7189
  )
7254
- }, Fl = {
7190
+ }, Ll = {
7255
7191
  reminders: o.array($t).describe("The updated reminders."),
7256
7192
  totalCount: o.number().describe("Total reminders updated."),
7257
7193
  updatedReminderIds: o.array(o.string()).describe("IDs of updated reminders."),
@@ -7260,11 +7196,11 @@ const Pl = o.object({
7260
7196
  updateCount: o.number(),
7261
7197
  failureCount: o.number()
7262
7198
  })
7263
- }, Hl = {
7199
+ }, Ml = {
7264
7200
  name: y.UPDATE_REMINDERS,
7265
7201
  description: 'Update existing reminders. Each reminder must specify its type ("relative", "absolute", or "location") and ID. Only include fields that need to change.',
7266
- parameters: Ml,
7267
- outputSchema: Fl,
7202
+ parameters: Nl,
7203
+ outputSchema: Ll,
7268
7204
  annotations: {
7269
7205
  readOnlyHint: !1,
7270
7206
  destructiveHint: !0,
@@ -7344,7 +7280,7 @@ const Pl = o.object({
7344
7280
  }
7345
7281
  };
7346
7282
  }
7347
- }, Wl = o.object({
7283
+ }, Fl = o.object({
7348
7284
  id: o.string().min(1).describe("The ID of the section to update."),
7349
7285
  name: o.string().min(1).optional().describe("The new name of the section."),
7350
7286
  description: o.preprocess(
@@ -7359,9 +7295,9 @@ const Pl = o.object({
7359
7295
  ).optional()
7360
7296
  }).refine((e) => e.name !== void 0 || e.description !== void 0, {
7361
7297
  message: 'Provide at least one of "name" or "description" to update.'
7362
- }), Bl = {
7363
- sections: o.array(Wl).min(1).max(O.ITEMS_PER_OPERATION).describe("The sections to update.")
7364
- }, Kl = {
7298
+ }), Hl = {
7299
+ sections: o.array(Fl).min(1).max(O.ITEMS_PER_OPERATION).describe("The sections to update.")
7300
+ }, Wl = {
7365
7301
  sections: o.array(Q).describe("The updated sections."),
7366
7302
  totalCount: o.number().describe("The total number of sections updated."),
7367
7303
  updatedSectionIds: o.array(o.string()).describe("The IDs of the updated sections."),
@@ -7370,11 +7306,11 @@ const Pl = o.object({
7370
7306
  updateCount: o.number(),
7371
7307
  failureCount: o.number()
7372
7308
  })
7373
- }, ql = {
7309
+ }, Bl = {
7374
7310
  name: y.UPDATE_SECTIONS,
7375
7311
  description: "Update multiple existing sections with new values.",
7376
- parameters: Bl,
7377
- outputSchema: Kl,
7312
+ parameters: Hl,
7313
+ outputSchema: Wl,
7378
7314
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
7379
7315
  async execute({ sections: e }, t) {
7380
7316
  const s = await Promise.allSettled(
@@ -7392,7 +7328,7 @@ const Pl = o.object({
7392
7328
  error: D(a.reason)
7393
7329
  });
7394
7330
  }), U(y.UPDATE_SECTIONS, e.length, n), {
7395
- textContent: zl({
7331
+ textContent: Kl({
7396
7332
  sections: r,
7397
7333
  failures: n
7398
7334
  }),
@@ -7409,7 +7345,7 @@ const Pl = o.object({
7409
7345
  };
7410
7346
  }
7411
7347
  };
7412
- function zl({
7348
+ function Kl({
7413
7349
  sections: e,
7414
7350
  failures: t
7415
7351
  }) {
@@ -7421,27 +7357,27 @@ ${r}` : "Updated 0 sections";
7421
7357
  function Oo(e, t) {
7422
7358
  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;
7423
7359
  }
7424
- function Gl(e, t) {
7360
+ function ql(e, t) {
7425
7361
  return t.projectId !== void 0 ? e.projectId === t.projectId : t.sectionId !== void 0 ? e.sectionId === t.sectionId : e.parentId === t.parentId;
7426
7362
  }
7427
- function Yl(e) {
7363
+ function zl(e) {
7428
7364
  return e.projectId !== void 0 ? `project:${e.projectId}` : e.sectionId !== void 0 ? `section:${e.sectionId}` : `parent:${e.parentId}`;
7429
7365
  }
7430
- function Vl(e) {
7366
+ function Gl(e) {
7431
7367
  const t = [];
7432
7368
  return e.projectId && t.push({ projectId: e.projectId }), e.sectionId && t.push({ sectionId: e.sectionId }), e.parentId && t.push({ parentId: e.parentId }), t;
7433
7369
  }
7434
- function Jl({
7370
+ function Yl({
7435
7371
  taskId: e,
7436
7372
  request: t,
7437
7373
  current: s
7438
7374
  }) {
7439
- const r = Vl(t);
7375
+ const r = Gl(t);
7440
7376
  if (r.length === 0)
7441
7377
  return { redundantMoveSkipped: !1 };
7442
7378
  let n = r, i = !1;
7443
7379
  if (s) {
7444
- const a = r.length === 1 ? (c) => Oo(s, c) : (c) => Gl(s, c);
7380
+ const a = r.length === 1 ? (c) => Oo(s, c) : (c) => ql(s, c);
7445
7381
  n = r.filter((c) => !a(c)), i = n.length < r.length;
7446
7382
  }
7447
7383
  if (n.length === 0)
@@ -7452,7 +7388,7 @@ function Jl({
7452
7388
  );
7453
7389
  return { move: n[0], redundantMoveSkipped: i };
7454
7390
  }
7455
- const Xl = o.object({
7391
+ const Vl = o.object({
7456
7392
  id: o.string().min(1).describe("The ID of the task to update."),
7457
7393
  content: o.string().optional().describe(
7458
7394
  'The new 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.'
@@ -7498,9 +7434,9 @@ const Xl = o.object({
7498
7434
  isUncompletable: o.boolean().optional().describe(
7499
7435
  "Whether this task should be uncompletable (organizational header). Tasks with isUncompletable: true appear as organizational headers and cannot be completed."
7500
7436
  )
7501
- }), Zl = (e) => !!(e.projectId || e.sectionId || e.parentId), _o = (e) => Object.keys(e).length > 0, Ql = ["remove", "no date"], eu = ["remove", "no date", "no deadline"], gs = "no date", pt = O.TASKS_PER_OPERATION, ys = {
7502
- tasks: o.array(Xl).min(1).max(pt).describe(`The tasks to update (max ${pt}).`)
7503
- }, tu = {
7437
+ }), Jl = (e) => !!(e.projectId || e.sectionId || e.parentId), _o = (e) => Object.keys(e).length > 0, Xl = ["remove", "no date"], Zl = ["remove", "no date", "no deadline"], gs = "no date", pt = O.TASKS_PER_OPERATION, ys = {
7438
+ tasks: o.array(Vl).min(1).max(pt).describe(`The tasks to update (max ${pt}).`)
7439
+ }, Ql = {
7504
7440
  tasks: o.array(J).describe("The updated tasks."),
7505
7441
  totalCount: o.number().describe("The total number of tasks updated."),
7506
7442
  updatedTaskIds: o.array(o.string()).describe("The IDs of the updated tasks."),
@@ -7513,11 +7449,11 @@ const Xl = o.object({
7513
7449
  "Moves not performed because the task was already in the requested destination. A non-zero count means container fields were sent that did not need to be."
7514
7450
  )
7515
7451
  }).describe("Summary of operations performed.")
7516
- }, su = {
7452
+ }, eu = {
7517
7453
  name: y.UPDATE_TASKS,
7518
7454
  description: "Update existing tasks including content, dates, priorities, and assignments. Send only the fields that change.",
7519
7455
  parameters: ys,
7520
- outputSchema: tu,
7456
+ outputSchema: Ql,
7521
7457
  // Open world: assigning a task notifies the new assignee.
7522
7458
  annotations: {
7523
7459
  readOnlyHint: !1,
@@ -7530,11 +7466,11 @@ const Xl = o.object({
7530
7466
  r[T] = { kind: "failed", error: v };
7531
7467
  }, i = (T, v) => {
7532
7468
  n(T, D(v));
7533
- }, a = s.map((T, v) => ({ task: T, index: v })).filter(({ task: T }) => pu(T)), c = await ru(
7469
+ }, a = s.map((T, v) => ({ task: T, index: v })).filter(({ task: T }) => lu(T)), c = await su(
7534
7470
  a.map(({ task: T }) => T),
7535
7471
  t
7536
7472
  ), d = await Promise.allSettled(
7537
- a.map(({ task: T, index: v }) => du({ task: T, index: v, client: t, inbox: c }))
7473
+ a.map(({ task: T, index: v }) => au({ task: T, index: v, client: t, inbox: c }))
7538
7474
  ), l = [];
7539
7475
  for (const [T, v] of d.entries()) {
7540
7476
  const A = a[T]?.index ?? T;
@@ -7544,14 +7480,14 @@ const Xl = o.object({
7544
7480
  client: t,
7545
7481
  ids: [
7546
7482
  ...new Set(
7547
- l.filter((T) => Zl(T.moveRequest) || T.checkRecurrence).map((T) => T.id)
7483
+ l.filter((T) => Jl(T.moveRequest) || T.checkRecurrence).map((T) => T.id)
7548
7484
  )
7549
7485
  ]
7550
7486
  });
7551
7487
  for (const T of l) {
7552
7488
  if (!T.checkRecurrence)
7553
7489
  continue;
7554
- const v = nu({
7490
+ const v = ou({
7555
7491
  id: T.id,
7556
7492
  current: u.get(T.id),
7557
7493
  readFailed: h
@@ -7562,7 +7498,7 @@ const Xl = o.object({
7562
7498
  for (const T of l)
7563
7499
  if (!T.failed)
7564
7500
  try {
7565
- const v = Jl({
7501
+ const v = Yl({
7566
7502
  taskId: T.id,
7567
7503
  request: T.moveRequest,
7568
7504
  current: u.get(T.id)
@@ -7574,7 +7510,7 @@ const Xl = o.object({
7574
7510
  const m = /* @__PURE__ */ new Map(), b = [], f = (T) => {
7575
7511
  const v = T.filter((A) => !A.failed);
7576
7512
  v.length !== 0 && b.push(
7577
- cu({
7513
+ iu({
7578
7514
  client: t,
7579
7515
  items: v,
7580
7516
  onUpdated: (A, x) => {
@@ -7595,7 +7531,7 @@ const Xl = o.object({
7595
7531
  })
7596
7532
  );
7597
7533
  }, g = new Set(p.map(({ item: T }) => T.index));
7598
- f(l.filter((T) => !g.has(T.index))), await iu({
7534
+ f(l.filter((T) => !g.has(T.index))), await ru({
7599
7535
  client: t,
7600
7536
  moving: p,
7601
7537
  results: m,
@@ -7618,9 +7554,9 @@ const Xl = o.object({
7618
7554
  const v = m.get(T.index);
7619
7555
  v && "task" in v && (r[T.index] = { kind: "updated", task: v.task });
7620
7556
  }
7621
- const { updatedTasks: w, failures: I, skippedCount: k } = ou({ tasks: s, outcomes: r }), C = l.filter((T) => T.redundantMoveSkipped).length, $ = w.map(B);
7557
+ const { updatedTasks: w, failures: I, skippedCount: k } = tu({ tasks: s, outcomes: r }), C = l.filter((T) => T.redundantMoveSkipped).length, $ = w.map(B);
7622
7558
  return U(y.UPDATE_TASKS, s.length, I), {
7623
- textContent: uu({
7559
+ textContent: du({
7624
7560
  tasks: $,
7625
7561
  failures: I,
7626
7562
  skippedCount: k,
@@ -7641,7 +7577,7 @@ const Xl = o.object({
7641
7577
  };
7642
7578
  }
7643
7579
  };
7644
- function ou({ tasks: e, outcomes: t }) {
7580
+ function tu({ tasks: e, outcomes: t }) {
7645
7581
  const s = [], r = [];
7646
7582
  let n = 0;
7647
7583
  for (const [i, a] of t.entries()) {
@@ -7658,7 +7594,7 @@ function ou({ tasks: e, outcomes: t }) {
7658
7594
  }
7659
7595
  return { updatedTasks: s, failures: r, skippedCount: n };
7660
7596
  }
7661
- async function ru(e, t) {
7597
+ async function su(e, t) {
7662
7598
  if (!e.some((s) => V(s.projectId)))
7663
7599
  return {};
7664
7600
  try {
@@ -7683,7 +7619,7 @@ async function Uo({
7683
7619
  }
7684
7620
  return { states: s, readFailed: !1 };
7685
7621
  }
7686
- function nu({
7622
+ function ou({
7687
7623
  id: e,
7688
7624
  current: t,
7689
7625
  readFailed: s
@@ -7693,7 +7629,7 @@ function nu({
7693
7629
  if (t?.due?.isRecurring)
7694
7630
  return `Task ${e} recurs ("${t.due.string}"). dueString would replace that rule and make it a one-time task, so nothing was changed. To move it to another date or time, use ${y.RESCHEDULE_TASKS} (it also accepts duration). To change or drop the recurrence on purpose, resend with replaceRecurrence: true.`;
7695
7631
  }
7696
- async function iu({
7632
+ async function ru({
7697
7633
  client: e,
7698
7634
  moving: t,
7699
7635
  results: s,
@@ -7703,7 +7639,7 @@ async function iu({
7703
7639
  return;
7704
7640
  const n = /* @__PURE__ */ new Map();
7705
7641
  for (const c of t) {
7706
- const d = Yl(c.move), l = n.get(d);
7642
+ const d = zl(c.move), l = n.get(d);
7707
7643
  l ? l.push(c) : n.set(d, [c]);
7708
7644
  }
7709
7645
  const i = _r(e), a = [];
@@ -7734,12 +7670,12 @@ async function iu({
7734
7670
  }
7735
7671
  }
7736
7672
  if (a.length > 0) {
7737
- await au({ client: e, unresolved: a, results: s });
7673
+ await nu({ client: e, unresolved: a, results: s });
7738
7674
  for (const { group: c } of a)
7739
7675
  r(c);
7740
7676
  }
7741
7677
  }
7742
- async function au({
7678
+ async function nu({
7743
7679
  client: e,
7744
7680
  unresolved: t,
7745
7681
  results: s
@@ -7757,7 +7693,7 @@ async function au({
7757
7693
  }
7758
7694
  }
7759
7695
  }
7760
- async function cu({
7696
+ async function iu({
7761
7697
  client: e,
7762
7698
  items: t,
7763
7699
  onUpdated: s,
@@ -7777,7 +7713,7 @@ async function cu({
7777
7713
  })
7778
7714
  );
7779
7715
  }
7780
- async function du({
7716
+ async function au({
7781
7717
  task: e,
7782
7718
  index: t,
7783
7719
  client: s,
@@ -7807,18 +7743,18 @@ async function du({
7807
7743
  h && (w.priority = Bs(h));
7808
7744
  const I = Ts(
7809
7745
  d,
7810
- Ql,
7746
+ Xl,
7811
7747
  gs
7812
7748
  );
7813
7749
  I !== void 0 && (w = { ...w, dueString: I });
7814
- const k = Ts(m, eu, null);
7750
+ const k = Ts(m, Zl, null);
7815
7751
  if (k !== void 0 && (w = { ...w, deadlineDate: k }), l) {
7816
7752
  const { amount: C, unit: $ } = wt(`Task ${n}`, l);
7817
7753
  w = { ...w, duration: C, durationUnit: $ };
7818
7754
  }
7819
7755
  return u !== void 0 && (w = {
7820
7756
  ...w,
7821
- assigneeId: await lu(s, n, u)
7757
+ assigneeId: await cu(s, n, u)
7822
7758
  }), {
7823
7759
  index: t,
7824
7760
  id: n,
@@ -7833,7 +7769,7 @@ async function du({
7833
7769
  failed: !1
7834
7770
  };
7835
7771
  }
7836
- async function lu(e, t, s) {
7772
+ async function cu(e, t, s) {
7837
7773
  if (s === null || s === "unassign")
7838
7774
  return null;
7839
7775
  const r = await Pt.validateTaskUpdateAssignment(
@@ -7847,7 +7783,7 @@ async function lu(e, t, s) {
7847
7783
  }
7848
7784
  return r.resolvedUser?.userId;
7849
7785
  }
7850
- function uu({
7786
+ function du({
7851
7787
  tasks: e,
7852
7788
  failures: t,
7853
7789
  skippedCount: s,
@@ -7868,7 +7804,7 @@ function uu({
7868
7804
  Failed (${t.length}) - address or drop these items:
7869
7805
  ${l}${u}`;
7870
7806
  }
7871
- function pu({
7807
+ function lu({
7872
7808
  id: e,
7873
7809
  replaceRecurrence: t,
7874
7810
  ...s
@@ -7883,7 +7819,7 @@ function Ts(e, t, s) {
7883
7819
  const r = e.trim().toLowerCase();
7884
7820
  return t.includes(r) ? s : e;
7885
7821
  }
7886
- const hu = {}, mu = {
7822
+ const uu = {}, pu = {
7887
7823
  type: o.literal("user_info").describe("The type of the response."),
7888
7824
  userId: o.string().describe("The user ID."),
7889
7825
  fullName: o.string().describe("The full name of the user."),
@@ -7900,25 +7836,25 @@ const hu = {}, mu = {
7900
7836
  email: o.string().describe("The email address of the user."),
7901
7837
  plan: o.enum(["Todoist Free", "Todoist Pro", "Todoist Business"]).describe("The user plan.")
7902
7838
  };
7903
- function fu(e) {
7839
+ function hu(e) {
7904
7840
  return e.businessAccountId ? "Todoist Business" : e.isPremium ? "Todoist Pro" : "Todoist Free";
7905
7841
  }
7906
- function bu(e, t) {
7842
+ function mu(e, t) {
7907
7843
  const r = ((e.getDay() || 7) - t + 7) % 7, n = new Date(e);
7908
7844
  return n.setDate(e.getDate() - r), n;
7909
7845
  }
7910
- function gu(e) {
7846
+ function fu(e) {
7911
7847
  const t = new Date(e);
7912
7848
  return t.setDate(e.getDate() + 6), t;
7913
7849
  }
7914
- function yu(e) {
7850
+ function bu(e) {
7915
7851
  const t = new Date(e.getFullYear(), 0, 1), s = (e.getTime() - t.getTime()) / 864e5;
7916
7852
  return Math.ceil((s + t.getDay() + 1) / 7);
7917
7853
  }
7918
- function Tu(e) {
7854
+ function gu(e) {
7919
7855
  return ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][e === 7 ? 0 : e] ?? "Unknown";
7920
7856
  }
7921
- function wu(e) {
7857
+ function yu(e) {
7922
7858
  try {
7923
7859
  return new Intl.DateTimeFormat("en-US", { timeZone: e }), !0;
7924
7860
  } catch {
@@ -7926,9 +7862,9 @@ function wu(e) {
7926
7862
  }
7927
7863
  }
7928
7864
  function Po(e) {
7929
- return wu(e) ? e : "UTC";
7865
+ return yu(e) ? e : "UTC";
7930
7866
  }
7931
- function ku(e, t) {
7867
+ function Tu(e, t) {
7932
7868
  const s = Po(t);
7933
7869
  return e.toLocaleString("en-US", {
7934
7870
  timeZone: s,
@@ -7941,8 +7877,8 @@ function ku(e, t) {
7941
7877
  hour12: !1
7942
7878
  });
7943
7879
  }
7944
- async function vu(e) {
7945
- const t = await e.getUser(), s = t.tzInfo?.timezone ?? "UTC", r = Po(s), n = /* @__PURE__ */ new Date(), i = ku(n, r), a = t.startDay ?? 1, c = Tu(a), d = fu(t), l = new Date(n.toLocaleString("en-US", { timeZone: r })), u = bu(l, a), h = gu(u), p = yu(l), b = [
7880
+ async function wu(e) {
7881
+ const t = await e.getUser(), s = t.tzInfo?.timezone ?? "UTC", r = Po(s), n = /* @__PURE__ */ new Date(), i = Tu(n, r), a = t.startDay ?? 1, c = gu(a), d = hu(t), l = new Date(n.toLocaleString("en-US", { timeZone: r })), u = mu(l, a), h = fu(u), p = bu(l), b = [
7946
7882
  "# User Information",
7947
7883
  "",
7948
7884
  `**User ID:** ${t.id}`,
@@ -7984,26 +7920,26 @@ async function vu(e) {
7984
7920
  };
7985
7921
  return { textContent: b, structuredContent: f };
7986
7922
  }
7987
- const Iu = {
7923
+ const ku = {
7988
7924
  name: y.USER_INFO,
7989
7925
  description: "Get comprehensive user information including user ID, full name, email, timezone with current local time, week start day preferences, current week dates, daily/weekly goal progress, and user plan (Free/Pro/Business).",
7990
- parameters: hu,
7991
- outputSchema: mu,
7926
+ parameters: uu,
7927
+ outputSchema: pu,
7992
7928
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
7993
7929
  async execute(e, t) {
7994
- const s = await vu(t);
7930
+ const s = await wu(t);
7995
7931
  return {
7996
7932
  textContent: s.textContent,
7997
7933
  structuredContent: s.structuredContent
7998
7934
  };
7999
7935
  }
8000
- }, ws = 10 * 1024 * 1024, Su = /* @__PURE__ */ new Set([
7936
+ }, ws = 10 * 1024 * 1024, vu = /* @__PURE__ */ new Set([
8001
7937
  "image/png",
8002
7938
  "image/jpeg",
8003
7939
  "image/gif",
8004
7940
  "image/webp",
8005
7941
  "image/svg+xml"
8006
- ]), Cu = /* @__PURE__ */ new Set([
7942
+ ]), Iu = /* @__PURE__ */ new Set([
8007
7943
  "text/plain",
8008
7944
  "text/csv",
8009
7945
  "text/html",
@@ -8011,7 +7947,7 @@ const Iu = {
8011
7947
  "application/json",
8012
7948
  "application/xml",
8013
7949
  "text/xml"
8014
- ]), ju = {
7950
+ ]), Su = {
8015
7951
  ".png": "image/png",
8016
7952
  ".jpg": "image/jpeg",
8017
7953
  ".jpeg": "image/jpeg",
@@ -8026,23 +7962,23 @@ const Iu = {
8026
7962
  ".xml": "application/xml",
8027
7963
  ".pdf": "application/pdf"
8028
7964
  };
8029
- function $u(e) {
8030
- return Su.has(e) ? "image" : Cu.has(e) || e.startsWith("text/") ? "text" : "binary";
7965
+ function Cu(e) {
7966
+ return vu.has(e) ? "image" : Iu.has(e) || e.startsWith("text/") ? "text" : "binary";
8031
7967
  }
8032
- function Eu(e) {
7968
+ function ju(e) {
8033
7969
  return (e.split(";")[0] ?? e).trim().toLowerCase();
8034
7970
  }
8035
- function Au(e) {
7971
+ function $u(e) {
8036
7972
  try {
8037
7973
  const t = new URL(e).pathname, s = t.lastIndexOf(".");
8038
7974
  if (s === -1) return;
8039
7975
  const r = t.slice(s).toLowerCase();
8040
- return ju[r];
7976
+ return Su[r];
8041
7977
  } catch {
8042
7978
  return;
8043
7979
  }
8044
7980
  }
8045
- function Du(e) {
7981
+ function Eu(e) {
8046
7982
  try {
8047
7983
  const t = new URL(e).pathname, s = t.lastIndexOf("/");
8048
7984
  return s === -1 ? void 0 : t.slice(s + 1) || void 0;
@@ -8050,23 +7986,23 @@ function Du(e) {
8050
7986
  return;
8051
7987
  }
8052
7988
  }
8053
- const xu = /^https:\/\/(?:files\.todoist\.com|todoist\.b-cdn\.net|d1ysz50cxb9zwl\.cloudfront\.net)\/\S*$/, Ou = {
8054
- fileUrl: o.url().regex(xu, {
7989
+ const Au = /^https:\/\/(?:files\.todoist\.com|todoist\.b-cdn\.net|d1ysz50cxb9zwl\.cloudfront\.net)\/\S*$/, Du = {
7990
+ fileUrl: o.url().regex(Au, {
8055
7991
  error: "Pass the fileUrl from a comment's fileAttachment: an https URL on files.todoist.com, todoist.b-cdn.net or d1ysz50cxb9zwl.cloudfront.net."
8056
7992
  }).describe(
8057
7993
  "The URL of the attachment file to view. Get this from the fileUrl field in a comment's fileAttachment."
8058
7994
  )
8059
- }, _u = {
7995
+ }, xu = {
8060
7996
  name: y.VIEW_ATTACHMENT,
8061
7997
  description: "View a file attachment from a Todoist comment. Pass the fileUrl from a comment's fileAttachment field. Supports images (returned inline), text files (returned as text), and binary files like PDFs (returned as embedded resources).",
8062
- parameters: Ou,
7998
+ parameters: Du,
8063
7999
  annotations: {
8064
8000
  readOnlyHint: !0,
8065
8001
  destructiveHint: !1,
8066
8002
  idempotentHint: !0
8067
8003
  },
8068
8004
  async execute({ fileUrl: e }, t) {
8069
- const s = await t.viewAttachment(e), r = s.headers["content-length"], n = r ? Number.parseInt(r, 10) : void 0, i = Du(e), a = s.headers["content-type"], c = a ? Eu(a) : void 0, d = c && c !== "application/octet-stream" ? c : Au(e) ?? c ?? "application/octet-stream";
8005
+ const s = await t.viewAttachment(e), r = s.headers["content-length"], n = r ? Number.parseInt(r, 10) : void 0, i = Eu(e), a = s.headers["content-type"], c = a ? ju(a) : void 0, d = c && c !== "application/octet-stream" ? c : $u(e) ?? c ?? "application/octet-stream";
8070
8006
  if (n && n > ws)
8071
8007
  return {
8072
8008
  textContent: `Attachment "${i ?? e}" is too large to display inline (${(n / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${d}`
@@ -8076,7 +8012,7 @@ const xu = /^https:\/\/(?:files\.todoist\.com|todoist\.b-cdn\.net|d1ysz50cxb9zwl
8076
8012
  return {
8077
8013
  textContent: `Attachment "${i ?? e}" is too large to display inline (${(u / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${d}`
8078
8014
  };
8079
- const h = $u(d), p = [];
8015
+ const h = Cu(d), p = [];
8080
8016
  return h === "image" ? p.push({
8081
8017
  type: "image",
8082
8018
  data: l.toString("base64"),
@@ -8096,79 +8032,79 @@ const xu = /^https:\/\/(?:files\.todoist\.com|todoist\.b-cdn\.net|d1ysz50cxb9zwl
8096
8032
  contentItems: p
8097
8033
  };
8098
8034
  }
8099
- }, Uu = {
8035
+ }, Ou = {
8100
8036
  ...pc,
8101
8037
  _meta: {
8102
8038
  ui: {
8103
8039
  resourceUri: et
8104
8040
  }
8105
8041
  }
8106
- }, Pu = {
8042
+ }, _u = {
8107
8043
  // Task management tools
8108
8044
  addTasks: Wi,
8109
8045
  completeTasks: Xi,
8110
- uncompleteTasks: il,
8111
- updateTasks: su,
8112
- rescheduleTasks: Bd,
8046
+ uncompleteTasks: rl,
8047
+ updateTasks: eu,
8048
+ rescheduleTasks: Hd,
8113
8049
  findTasks: Tc,
8114
- findTasksByDate: Uu,
8050
+ findTasksByDate: Ou,
8115
8051
  findCompletedTasks: Pa,
8116
8052
  // Project management tools
8117
8053
  addProjects: vi,
8118
- updateProjects: Ol,
8054
+ updateProjects: Dl,
8119
8055
  findProjects: Xa,
8120
- projectManagement: wd,
8121
- projectMove: Sd,
8056
+ projectManagement: yd,
8057
+ projectMove: vd,
8122
8058
  // Section management tools
8123
8059
  addSections: Ni,
8124
- updateSections: ql,
8060
+ updateSections: Bl,
8125
8061
  findSections: cc,
8126
8062
  // Comment management tools
8127
8063
  addComments: Zn,
8128
8064
  findComments: $a,
8129
- updateComments: ul,
8065
+ updateComments: dl,
8130
8066
  // Reminder management tools
8131
8067
  addReminders: Oi,
8132
8068
  findReminders: oc,
8133
- updateReminders: Hl,
8069
+ updateReminders: Ml,
8134
8070
  // Attachment tools
8135
- viewAttachment: _u,
8071
+ viewAttachment: xu,
8136
8072
  // Label management tools
8137
8073
  addLabels: mi,
8138
- updateLabels: jl,
8074
+ updateLabels: Sl,
8139
8075
  findLabels: Fa,
8140
8076
  // Filter management tools
8141
8077
  findFilters: ni,
8142
8078
  addFilters: li,
8143
- updateFilters: bl,
8079
+ updateFilters: ml,
8144
8080
  // Activity and audit tools
8145
8081
  findActivity: wa,
8146
8082
  getProductivityStats: Oc,
8147
8083
  // Health and insights tools
8148
- getProjectHealth: Bc,
8084
+ getProjectHealth: Hc,
8149
8085
  getProjectActivityStats: Nc,
8150
8086
  analyzeProjectHealth: Yi,
8151
- getWorkspaceInsights: Zc,
8087
+ getWorkspaceInsights: Jc,
8152
8088
  // General tools
8153
8089
  getOverview: Ac,
8154
8090
  deleteObject: ta,
8155
8091
  fetchObject: ha,
8156
- reorderObjects: _d,
8157
- userInfo: Iu,
8158
- getUserStatus: Yc,
8159
- setUserStatus: ol,
8092
+ reorderObjects: xd,
8093
+ userInfo: ku,
8094
+ getUserStatus: zc,
8095
+ setUserStatus: tl,
8160
8096
  // Assignment and collaboration tools
8161
8097
  findProjectCollaborators: Ka,
8162
- manageAssignments: fd,
8098
+ manageAssignments: hd,
8163
8099
  // Template tools
8164
8100
  exportProjectTemplate: ra,
8165
- importProjectTemplate: rd,
8101
+ importProjectTemplate: sd,
8166
8102
  // Workspace tools
8167
- listWorkspaces: ld,
8103
+ listWorkspaces: cd,
8168
8104
  // OpenAI MCP tools
8169
- search: Yd,
8105
+ search: zd,
8170
8106
  fetch: ba
8171
- }, Ru = Object.values(Pu), Nu = `
8107
+ }, Uu = Object.values(_u), Pu = `
8172
8108
  ## Todoist Task and Project Management Tools
8173
8109
 
8174
8110
  You have access to comprehensive Todoist management tools for personal productivity and team collaboration. Use these tools to help users manage tasks, projects, sections, comments, and assignments effectively.
@@ -8226,7 +8162,7 @@ For a productivity review, call **get-productivity-stats**, then find what the u
8226
8162
 
8227
8163
  Always provide clear, actionable task titles and descriptions. Use the overview tools to give users context about their workload and project status.
8228
8164
  `, Ee = { ttlMs: mt, cacheScope: "private" };
8229
- function ep({
8165
+ function Zu({
8230
8166
  token: e,
8231
8167
  baseUrl: t,
8232
8168
  features: s = []
@@ -8238,7 +8174,7 @@ function ep({
8238
8174
  tools: { listChanged: !0 },
8239
8175
  prompts: { listChanged: !0 }
8240
8176
  },
8241
- instructions: Nu,
8177
+ instructions: Pu,
8242
8178
  cacheHints: {
8243
8179
  "server/discover": Ee,
8244
8180
  "tools/list": Ee,
@@ -8248,7 +8184,7 @@ function ep({
8248
8184
  }
8249
8185
  }
8250
8186
  ), n = Gr(e, { baseUrl: t });
8251
- return dr(r), ln({ tools: Ru, server: r, client: n, features: s }), r.registerPrompt(
8187
+ return dr(r), ln({ tools: Uu, server: r, client: n, features: s }), r.registerPrompt(
8252
8188
  je.name,
8253
8189
  {
8254
8190
  title: je.title,
@@ -8259,34 +8195,34 @@ function ep({
8259
8195
  ), r;
8260
8196
  }
8261
8197
  export {
8262
- Zu as $,
8198
+ Ju as $,
8263
8199
  Ac as A,
8264
8200
  Oc as B,
8265
8201
  Nc as C,
8266
- Bc as D,
8267
- Yc as E,
8268
- Qu as F,
8269
- Zc as G,
8270
- rd as H,
8271
- ld as I,
8272
- fd as J,
8273
- wd as K,
8274
- Sd as L,
8275
- Ru as M,
8276
- _d as N,
8277
- Bd as O,
8278
- Yd as P,
8279
- ol as Q,
8280
- il as R,
8281
- ul as S,
8282
- bl as T,
8283
- jl as U,
8284
- Ol as V,
8285
- Hl as W,
8286
- ql as X,
8287
- su as Y,
8288
- Iu as Z,
8289
- _u as _,
8202
+ Hc as D,
8203
+ zc as E,
8204
+ Xu as F,
8205
+ Jc as G,
8206
+ sd as H,
8207
+ cd as I,
8208
+ hd as J,
8209
+ yd as K,
8210
+ vd as L,
8211
+ Uu as M,
8212
+ xd as N,
8213
+ Hd as O,
8214
+ zd as P,
8215
+ tl as Q,
8216
+ rl as R,
8217
+ dl as S,
8218
+ ml as T,
8219
+ Sl as U,
8220
+ Dl as V,
8221
+ Ml as W,
8222
+ Bl as X,
8223
+ eu as Y,
8224
+ ku as Z,
8225
+ xu as _,
8290
8226
  Zn as a,
8291
8227
  Fr as a0,
8292
8228
  li as b,
@@ -8294,7 +8230,7 @@ export {
8294
8230
  vi as d,
8295
8231
  Oi as e,
8296
8232
  Ni as f,
8297
- ep as g,
8233
+ Zu as g,
8298
8234
  Wi as h,
8299
8235
  Yi as i,
8300
8236
  Xi as j,
@@ -8307,7 +8243,7 @@ export {
8307
8243
  Pa as q,
8308
8244
  ni as r,
8309
8245
  Fa as s,
8310
- Pu as t,
8246
+ _u as t,
8311
8247
  Ka as u,
8312
8248
  Xa as v,
8313
8249
  oc as w,