@todoist/mcp 21.0.3 → 22.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.
package/dist/index.d.ts CHANGED
@@ -2580,15 +2580,15 @@ declare const tools: {
2580
2580
  name: "view-attachment";
2581
2581
  description: string;
2582
2582
  parameters: {
2583
- fileUrl: import('zod').ZodURL;
2583
+ commentId: import('zod').ZodString;
2584
2584
  };
2585
2585
  annotations: {
2586
2586
  readOnlyHint: true;
2587
2587
  destructiveHint: false;
2588
2588
  idempotentHint: true;
2589
2589
  };
2590
- execute({ fileUrl }: {
2591
- fileUrl: string;
2590
+ execute({ commentId }: {
2591
+ commentId: string;
2592
2592
  }, client: import('@todoist/sdk').TodoistApi): Promise<{
2593
2593
  textContent: string;
2594
2594
  contentItems?: undefined;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, V as S, W as C, X as w, Y as T, Z as E, _ as D, a as O, at as k, b as A, c as j, d as M, et as N, f as P, g as F, h as I, i as L, it as R, j as z, k as B, l as V, m as H, n as U, nt as W, o as G, p as K, q, r as J, rt as Y, s as X, t as Z, tt as Q, u as $, v as ee, w as te, x as ne, y as re, z as ie } from "./mcp-server-ChWKreV9.js";
2
- import { n as ae, t as oe } from "./require-valid-todoist-token-Cn1BF5bs.js";
1
+ import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, V as S, W as C, X as w, Y as T, Z as E, _ as D, a as O, at as k, b as A, c as j, d as M, et as N, f as P, g as F, h as I, i as L, it as R, j as z, k as B, l as V, m as H, n as U, nt as W, o as G, p as K, q, r as J, rt as Y, s as X, t as Z, tt as Q, u as $, v as ee, w as te, x as ne, y as re, z as ie } from "./mcp-server-Byv_m8qA.js";
2
+ import { n as ae, t as oe } from "./require-valid-todoist-token-B4aM6lXt.js";
3
3
  // src/index.ts
4
4
  var se = J;
5
5
  export { k as FEATURE_NAMES, R as addComments, W as addFilters, Q as addFolders, N as addLabels, e as addProjects, _ as addReminders, E as addSections, w as addTasks, T as addTemplate, u as analyzeProjectHealth, q as completeTasks, d as deleteObject, s as exportProject, x as fetch, C as fetchObject, c as findActivity, S as findComments, n as findCompletedTasks, Y as findFilters, ie as findFolders, v as findLabels, f as findProjectCollaborators, l as findProjects, o as findReminders, g as findSections, p as findTasks, m as findTasksByDate, z as findTemplates, Z as getMcpServer, t as getOverview, B as getProductivityStats, h as getProjectActivityStats, i as getProjectHealth, a as getUserStatus, b as getWorkspaceInsights, te as importIntoProject, r as listWorkspaces, y as manageAssignments, ne as projectManagement, A as projectMove, U as registeredTools, re as reorderObjects, oe as requireValidTodoistToken, ee as rescheduleTasks, D as search, F as setUserStatus, se as tools, I as uncompleteTasks, H as updateComments, K as updateFilters, P as updateFolders, M as updateLabels, $ as updateProjects, V as updateReminders, j as updateSections, X as updateTasks, G as updateTemplate, O as userInfo, ae as validateTodoistToken, L as viewAttachment };
package/dist/main-http.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { t as e } from "./mcp-server-ChWKreV9.js";
3
- import { t } from "./require-valid-todoist-token-Cn1BF5bs.js";
2
+ import { t as e } from "./mcp-server-Byv_m8qA.js";
3
+ import { t } from "./require-valid-todoist-token-B4aM6lXt.js";
4
4
  import n from "dotenv";
5
5
  import { createMcpHandler as r } from "@modelcontextprotocol/server";
6
6
  import { isIP as i } from "node:net";
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as e } from "./mcp-server-ChWKreV9.js";
2
+ import { t as e } from "./mcp-server-Byv_m8qA.js";
3
3
  import { serveStdio as t } from "@modelcontextprotocol/server/stdio";
4
4
  import n from "dotenv";
5
5
  // src/main.ts
@@ -351,7 +351,7 @@ function ft(e) {
351
351
  }
352
352
  var pt = {
353
353
  name: "@todoist/mcp",
354
- version: "21.0.3",
354
+ version: "22.0.0",
355
355
  type: "module",
356
356
  main: "./dist/index.js",
357
357
  types: "./dist/index.d.ts",
@@ -8527,38 +8527,40 @@ function Ip(e) {
8527
8527
  return;
8528
8528
  }
8529
8529
  }
8530
- var Lp = { fileUrl: p.url().regex(/^https:\/\/(?:files\.todoist\.com|todoist\.b-cdn\.net|d1ysz50cxb9zwl\.cloudfront\.net)\/\S*$/, { error: "Pass the fileUrl from a comment's fileAttachment: an https URL on files.todoist.com, todoist.b-cdn.net or d1ysz50cxb9zwl.cloudfront.net." }).describe("The fileUrl from a comment's fileAttachment. Allowed hosts (https only): files.todoist.com, todoist.b-cdn.net, d1ysz50cxb9zwl.cloudfront.net.") }, Rp = {
8530
+ var Lp = { commentId: p.string().min(1).describe("The ID of the comment whose attached file to view.") }, Rp = {
8531
8531
  name: B.VIEW_ATTACHMENT,
8532
- 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).",
8532
+ description: "View the file attached to a Todoist comment. Images are returned inline, text files as text, and other files such as PDFs as embedded resources.",
8533
8533
  parameters: Lp,
8534
8534
  annotations: {
8535
8535
  readOnlyHint: !0,
8536
8536
  destructiveHint: !1,
8537
8537
  idempotentHint: !0
8538
8538
  },
8539
- async execute({ fileUrl: e }, t) {
8540
- let n = await t.viewAttachment(e), r = n.headers["content-length"], i = r ? Number.parseInt(r, 10) : void 0, a = Ip(e), o = n.headers["content-type"], s = o ? Pp(o) : void 0, c = s && s !== "application/octet-stream" ? s : Fp(e) ?? s ?? "application/octet-stream";
8541
- if (i && i > kp) return { textContent: `Attachment "${a ?? e}" is too large to display inline (${(i / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${c}` };
8542
- let l = Buffer.from(await n.arrayBuffer()), u = l.byteLength;
8543
- if (u > kp) return { textContent: `Attachment "${a ?? e}" is too large to display inline (${(u / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${c}` };
8544
- let d = Np(c), f = [];
8545
- return d === "image" ? f.push({
8539
+ async execute({ commentId: e }, t) {
8540
+ let n = await t.getComment(e), r = n.fileAttachment?.fileUrl;
8541
+ if (!r) throw Error(`Comment ${e} has no file attachment to view.`);
8542
+ let i = await t.viewAttachment(n), a = i.headers["content-length"], o = a ? Number.parseInt(a, 10) : void 0, s = Ip(r), c = i.headers["content-type"], l = c ? Pp(c) : void 0, u = l && l !== "application/octet-stream" ? l : Fp(r) ?? l ?? "application/octet-stream";
8543
+ if (o && o > kp) return { textContent: `Attachment "${s ?? r}" is too large to display inline (${(o / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${u}` };
8544
+ let d = Buffer.from(await i.arrayBuffer()), f = d.byteLength;
8545
+ if (f > kp) return { textContent: `Attachment "${s ?? r}" is too large to display inline (${(f / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${u}` };
8546
+ let p = Np(u), m = [];
8547
+ return p === "image" ? m.push({
8546
8548
  type: "image",
8547
- data: l.toString("base64"),
8548
- mimeType: c
8549
- }) : d === "text" ? f.push({
8549
+ data: d.toString("base64"),
8550
+ mimeType: u
8551
+ }) : p === "text" ? m.push({
8550
8552
  type: "text",
8551
- text: l.toString("utf-8")
8552
- }) : f.push({
8553
+ text: d.toString("utf-8")
8554
+ }) : m.push({
8553
8555
  type: "resource",
8554
8556
  resource: {
8555
- uri: e,
8556
- mimeType: c,
8557
- blob: l.toString("base64")
8557
+ uri: r,
8558
+ mimeType: u,
8559
+ blob: d.toString("base64")
8558
8560
  }
8559
8561
  }), {
8560
- textContent: `Attachment: ${a ?? "unknown"} (${c}, ${(u / 1024).toFixed(1)}KB)`,
8561
- contentItems: f
8562
+ textContent: `Attachment: ${s ?? "unknown"} (${u}, ${(f / 1024).toFixed(1)}KB)`,
8563
+ contentItems: m
8562
8564
  };
8563
8565
  }
8564
8566
  }, zp = {
@@ -1,4 +1,4 @@
1
- import { ot as e, st as t } from "./mcp-server-ChWKreV9.js";
1
+ import { ot as e, st as t } from "./mcp-server-Byv_m8qA.js";
2
2
  import { buildBearerChallenge as n, createTokenVerdictCache as r, getValidationRateLimit as i, validateBearerToken as a } from "@todoist/mcp-core/host";
3
3
  // src/utils/validate-todoist-token.ts
4
4
  var o = "https://api.todoist.com", s = (n, r) => a({
@@ -2527,15 +2527,15 @@ declare const toolRegistry: {
2527
2527
  name: "view-attachment";
2528
2528
  description: string;
2529
2529
  parameters: {
2530
- fileUrl: import('zod').ZodURL;
2530
+ commentId: import('zod').ZodString;
2531
2531
  };
2532
2532
  annotations: {
2533
2533
  readOnlyHint: true;
2534
2534
  destructiveHint: false;
2535
2535
  idempotentHint: true;
2536
2536
  };
2537
- execute({ fileUrl }: {
2538
- fileUrl: string;
2537
+ execute({ commentId }: {
2538
+ commentId: string;
2539
2539
  }, client: import('@todoist/sdk').TodoistApi): Promise<{
2540
2540
  textContent: string;
2541
2541
  contentItems?: undefined;
@@ -4,15 +4,15 @@ declare const viewAttachment: {
4
4
  name: "view-attachment";
5
5
  description: string;
6
6
  parameters: {
7
- fileUrl: z.ZodURL;
7
+ commentId: z.ZodString;
8
8
  };
9
9
  annotations: {
10
10
  readOnlyHint: true;
11
11
  destructiveHint: false;
12
12
  idempotentHint: true;
13
13
  };
14
- execute({ fileUrl }: {
15
- fileUrl: string;
14
+ execute({ commentId }: {
15
+ commentId: string;
16
16
  }, client: import('@todoist/sdk').TodoistApi): Promise<{
17
17
  textContent: string;
18
18
  contentItems?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"view-attachment.d.ts","sourceRoot":"","sources":["../../src/tools/view-attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAkGvB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;CAuEsB,CAAA;AAE1C,OAAO,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"view-attachment.d.ts","sourceRoot":"","sources":["../../src/tools/view-attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAmFvB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;CA6EsB,CAAA;AAE1C,OAAO,EAAE,cAAc,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todoist/mcp",
3
- "version": "21.0.3",
3
+ "version": "22.0.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",