@doist/todoist-ai 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/index.d.ts +477 -0
  3. package/dist/cjs/index.d.ts.map +1 -0
  4. package/dist/cjs/index.js +49 -0
  5. package/dist/cjs/main.d.ts.map +1 -0
  6. package/dist/cjs/mcp-helpers.d.ts.map +1 -0
  7. package/dist/cjs/mcp-server.d.ts.map +1 -0
  8. package/dist/cjs/todoist-tool.d.ts.map +1 -0
  9. package/dist/cjs/tools/account-overview.d.ts.map +1 -0
  10. package/dist/cjs/tools/project-overview.d.ts.map +1 -0
  11. package/dist/cjs/tools/projects-add-one.d.ts.map +1 -0
  12. package/dist/cjs/tools/projects-delete-one.d.ts.map +1 -0
  13. package/dist/cjs/tools/projects-list.d.ts.map +1 -0
  14. package/dist/cjs/tools/projects-search.d.ts.map +1 -0
  15. package/dist/cjs/tools/projects-update-one.d.ts.map +1 -0
  16. package/dist/cjs/tools/sections-add-one.d.ts.map +1 -0
  17. package/dist/cjs/tools/sections-delete-one.d.ts.map +1 -0
  18. package/dist/cjs/tools/sections-search.d.ts.map +1 -0
  19. package/dist/cjs/tools/sections-update-one.d.ts.map +1 -0
  20. package/dist/cjs/tools/shared.d.ts.map +1 -0
  21. package/dist/cjs/tools/subtasks-list-for-parent-task.d.ts.map +1 -0
  22. package/dist/cjs/tools/tasks-add-multiple.d.ts.map +1 -0
  23. package/dist/cjs/tools/tasks-by-date-range.d.ts.map +1 -0
  24. package/dist/cjs/tools/tasks-by-project.d.ts.map +1 -0
  25. package/dist/cjs/tools/tasks-complete-multiple.d.ts.map +1 -0
  26. package/dist/cjs/tools/tasks-delete-one.d.ts.map +1 -0
  27. package/dist/cjs/tools/tasks-list-for-section.d.ts.map +1 -0
  28. package/dist/cjs/tools/tasks-list-overdue.d.ts.map +1 -0
  29. package/dist/cjs/tools/tasks-organize-multiple.d.ts.map +1 -0
  30. package/dist/cjs/tools/tasks-search.d.ts.map +1 -0
  31. package/dist/cjs/tools/tasks-update-one.d.ts.map +1 -0
  32. package/dist/esm/index.d.ts +477 -0
  33. package/dist/esm/index.d.ts.map +1 -0
  34. package/dist/esm/index.js +49 -0
  35. package/dist/esm/main.d.ts +2 -0
  36. package/dist/esm/main.d.ts.map +1 -0
  37. package/dist/esm/main.js +23 -0
  38. package/dist/esm/mcp-helpers.d.ts +13 -0
  39. package/dist/esm/mcp-helpers.d.ts.map +1 -0
  40. package/dist/esm/mcp-helpers.js +52 -0
  41. package/dist/esm/mcp-server.d.ts +11 -0
  42. package/dist/esm/mcp-server.d.ts.map +1 -0
  43. package/{src/mcp-server.ts → dist/esm/mcp-server.js} +31 -44
  44. package/dist/esm/todoist-tool.d.ts +35 -0
  45. package/dist/esm/todoist-tool.d.ts.map +1 -0
  46. package/dist/esm/todoist-tool.js +1 -0
  47. package/dist/esm/tools/account-overview.d.ts +9 -0
  48. package/dist/esm/tools/account-overview.d.ts.map +1 -0
  49. package/dist/esm/tools/account-overview.js +94 -0
  50. package/dist/esm/tools/project-overview.d.ts +14 -0
  51. package/dist/esm/tools/project-overview.d.ts.map +1 -0
  52. package/dist/esm/tools/project-overview.js +107 -0
  53. package/dist/esm/tools/projects-add-one.d.ts +22 -0
  54. package/dist/esm/tools/projects-add-one.d.ts.map +1 -0
  55. package/dist/esm/tools/projects-add-one.js +15 -0
  56. package/dist/esm/tools/projects-delete-one.d.ts +15 -0
  57. package/dist/esm/tools/projects-delete-one.d.ts.map +1 -0
  58. package/dist/esm/tools/projects-delete-one.js +14 -0
  59. package/dist/esm/tools/projects-list.d.ts +18 -0
  60. package/dist/esm/tools/projects-list.d.ts.map +1 -0
  61. package/dist/esm/tools/projects-list.js +30 -0
  62. package/dist/esm/tools/projects-search.d.ts +29 -0
  63. package/dist/esm/tools/projects-search.d.ts.map +1 -0
  64. package/dist/esm/tools/projects-search.js +39 -0
  65. package/dist/esm/tools/projects-update-one.d.ts +15 -0
  66. package/dist/esm/tools/projects-update-one.d.ts.map +1 -0
  67. package/dist/esm/tools/projects-update-one.js +16 -0
  68. package/dist/esm/tools/sections-add-one.d.ts +15 -0
  69. package/dist/esm/tools/sections-add-one.d.ts.map +1 -0
  70. package/dist/esm/tools/sections-add-one.js +21 -0
  71. package/dist/esm/tools/sections-delete-one.d.ts +15 -0
  72. package/dist/esm/tools/sections-delete-one.d.ts.map +1 -0
  73. package/dist/esm/tools/sections-delete-one.js +14 -0
  74. package/dist/esm/tools/sections-search.d.ts +18 -0
  75. package/dist/esm/tools/sections-search.d.ts.map +1 -0
  76. package/dist/esm/tools/sections-search.js +30 -0
  77. package/dist/esm/tools/sections-update-one.d.ts +15 -0
  78. package/dist/esm/tools/sections-update-one.d.ts.map +1 -0
  79. package/dist/esm/tools/sections-update-one.js +16 -0
  80. package/dist/esm/tools/shared.d.ts +55 -0
  81. package/dist/esm/tools/shared.d.ts.map +1 -0
  82. package/dist/esm/tools/shared.js +71 -0
  83. package/dist/esm/tools/subtasks-list-for-parent-task.d.ts +31 -0
  84. package/dist/esm/tools/subtasks-list-for-parent-task.d.ts.map +1 -0
  85. package/dist/esm/tools/subtasks-list-for-parent-task.js +37 -0
  86. package/dist/esm/tools/tasks-add-multiple.d.ts +50 -0
  87. package/dist/esm/tools/tasks-add-multiple.d.ts.map +1 -0
  88. package/dist/esm/tools/tasks-add-multiple.js +47 -0
  89. package/dist/esm/tools/tasks-by-date-range.d.ts +33 -0
  90. package/dist/esm/tools/tasks-by-date-range.d.ts.map +1 -0
  91. package/dist/esm/tools/tasks-by-date-range.js +47 -0
  92. package/dist/esm/tools/tasks-by-project.d.ts +31 -0
  93. package/dist/esm/tools/tasks-by-project.d.ts.map +1 -0
  94. package/dist/esm/tools/tasks-by-project.js +37 -0
  95. package/dist/esm/tools/tasks-complete-multiple.d.ts +16 -0
  96. package/dist/esm/tools/tasks-complete-multiple.d.ts.map +1 -0
  97. package/dist/esm/tools/tasks-complete-multiple.js +26 -0
  98. package/dist/esm/tools/tasks-delete-one.d.ts +15 -0
  99. package/dist/esm/tools/tasks-delete-one.d.ts.map +1 -0
  100. package/dist/esm/tools/tasks-delete-one.js +14 -0
  101. package/dist/esm/tools/tasks-list-for-section.d.ts +31 -0
  102. package/dist/esm/tools/tasks-list-for-section.d.ts.map +1 -0
  103. package/dist/esm/tools/tasks-list-for-section.js +37 -0
  104. package/dist/esm/tools/tasks-list-overdue.d.ts +29 -0
  105. package/dist/esm/tools/tasks-list-overdue.d.ts.map +1 -0
  106. package/dist/esm/tools/tasks-list-overdue.js +29 -0
  107. package/dist/esm/tools/tasks-organize-multiple.d.ts +37 -0
  108. package/dist/esm/tools/tasks-organize-multiple.d.ts.map +1 -0
  109. package/dist/esm/tools/tasks-organize-multiple.js +40 -0
  110. package/dist/esm/tools/tasks-search.d.ts +31 -0
  111. package/dist/esm/tools/tasks-search.d.ts.map +1 -0
  112. package/dist/esm/tools/tasks-search.js +30 -0
  113. package/dist/esm/tools/tasks-update-one.d.ts +27 -0
  114. package/dist/esm/tools/tasks-update-one.d.ts.map +1 -0
  115. package/dist/esm/tools/tasks-update-one.js +42 -0
  116. package/dist/types/index.d.ts +476 -0
  117. package/dist/types/main.d.ts +1 -0
  118. package/dist/types/mcp-helpers.d.ts +12 -0
  119. package/dist/types/mcp-server.d.ts +10 -0
  120. package/dist/types/todoist-tool.d.ts +34 -0
  121. package/dist/types/tools/account-overview.d.ts +8 -0
  122. package/dist/types/tools/project-overview.d.ts +13 -0
  123. package/dist/types/tools/projects-add-one.d.ts +21 -0
  124. package/dist/types/tools/projects-delete-one.d.ts +14 -0
  125. package/dist/types/tools/projects-list.d.ts +17 -0
  126. package/dist/types/tools/projects-search.d.ts +28 -0
  127. package/dist/types/tools/projects-update-one.d.ts +14 -0
  128. package/dist/types/tools/sections-add-one.d.ts +14 -0
  129. package/dist/types/tools/sections-delete-one.d.ts +14 -0
  130. package/dist/types/tools/sections-search.d.ts +17 -0
  131. package/dist/types/tools/sections-update-one.d.ts +14 -0
  132. package/dist/types/tools/shared.d.ts +54 -0
  133. package/dist/types/tools/subtasks-list-for-parent-task.d.ts +30 -0
  134. package/dist/types/tools/tasks-add-multiple.d.ts +49 -0
  135. package/dist/types/tools/tasks-by-date-range.d.ts +32 -0
  136. package/dist/types/tools/tasks-by-project.d.ts +30 -0
  137. package/dist/types/tools/tasks-complete-multiple.d.ts +15 -0
  138. package/dist/types/tools/tasks-delete-one.d.ts +14 -0
  139. package/dist/types/tools/tasks-list-for-section.d.ts +30 -0
  140. package/dist/types/tools/tasks-list-overdue.d.ts +28 -0
  141. package/dist/types/tools/tasks-organize-multiple.d.ts +36 -0
  142. package/dist/types/tools/tasks-search.d.ts +30 -0
  143. package/dist/types/tools/tasks-update-one.d.ts +26 -0
  144. package/package.json +20 -7
  145. package/dist/index.d.ts +0 -2
  146. package/dist/index.d.ts.map +0 -1
  147. package/dist/index.js +0 -1
  148. package/dist/main.d.ts.map +0 -1
  149. package/dist/mcp-helpers.d.ts.map +0 -1
  150. package/dist/mcp-server.d.ts.map +0 -1
  151. package/dist/todoist-tool.d.ts.map +0 -1
  152. package/dist/tools/account-overview.d.ts.map +0 -1
  153. package/dist/tools/index.d.ts +0 -23
  154. package/dist/tools/index.d.ts.map +0 -1
  155. package/dist/tools/index.js +0 -22
  156. package/dist/tools/project-overview.d.ts.map +0 -1
  157. package/dist/tools/projects-add-one.d.ts.map +0 -1
  158. package/dist/tools/projects-delete-one.d.ts.map +0 -1
  159. package/dist/tools/projects-list.d.ts.map +0 -1
  160. package/dist/tools/projects-search.d.ts.map +0 -1
  161. package/dist/tools/projects-update-one.d.ts.map +0 -1
  162. package/dist/tools/sections-add-one.d.ts.map +0 -1
  163. package/dist/tools/sections-delete-one.d.ts.map +0 -1
  164. package/dist/tools/sections-search.d.ts.map +0 -1
  165. package/dist/tools/sections-update-one.d.ts.map +0 -1
  166. package/dist/tools/shared.d.ts.map +0 -1
  167. package/dist/tools/subtasks-list-for-parent-task.d.ts.map +0 -1
  168. package/dist/tools/tasks-add-multiple.d.ts.map +0 -1
  169. package/dist/tools/tasks-by-date-range.d.ts.map +0 -1
  170. package/dist/tools/tasks-by-project.d.ts.map +0 -1
  171. package/dist/tools/tasks-complete-multiple.d.ts.map +0 -1
  172. package/dist/tools/tasks-delete-one.d.ts.map +0 -1
  173. package/dist/tools/tasks-list-for-section.d.ts.map +0 -1
  174. package/dist/tools/tasks-list-overdue.d.ts.map +0 -1
  175. package/dist/tools/tasks-organize-multiple.d.ts.map +0 -1
  176. package/dist/tools/tasks-search.d.ts.map +0 -1
  177. package/dist/tools/tasks-update-one.d.ts.map +0 -1
  178. package/src/index.ts +0 -1
  179. package/src/main.ts +0 -26
  180. package/src/mcp-helpers.ts +0 -76
  181. package/src/todoist-tool.ts +0 -42
  182. package/src/tools/account-overview.ts +0 -130
  183. package/src/tools/index.ts +0 -26
  184. package/src/tools/project-overview.ts +0 -130
  185. package/src/tools/projects-add-one.ts +0 -19
  186. package/src/tools/projects-delete-one.ts +0 -18
  187. package/src/tools/projects-list.ts +0 -36
  188. package/src/tools/projects-search.ts +0 -49
  189. package/src/tools/projects-update-one.ts +0 -20
  190. package/src/tools/sections-add-one.ts +0 -25
  191. package/src/tools/sections-delete-one.ts +0 -18
  192. package/src/tools/sections-search.ts +0 -39
  193. package/src/tools/sections-update-one.ts +0 -20
  194. package/src/tools/shared.ts +0 -94
  195. package/src/tools/subtasks-list-for-parent-task.ts +0 -43
  196. package/src/tools/tasks-add-multiple.ts +0 -53
  197. package/src/tools/tasks-by-date-range.ts +0 -58
  198. package/src/tools/tasks-by-project.ts +0 -43
  199. package/src/tools/tasks-complete-multiple.ts +0 -29
  200. package/src/tools/tasks-delete-one.ts +0 -18
  201. package/src/tools/tasks-list-for-section.ts +0 -43
  202. package/src/tools/tasks-list-overdue.ts +0 -35
  203. package/src/tools/tasks-organize-multiple.ts +0 -45
  204. package/src/tools/tasks-search.ts +0 -36
  205. package/src/tools/tasks-update-one.ts +0 -48
  206. /package/dist/{main.d.ts → cjs/main.d.ts} +0 -0
  207. /package/dist/{main.js → cjs/main.js} +0 -0
  208. /package/dist/{mcp-helpers.d.ts → cjs/mcp-helpers.d.ts} +0 -0
  209. /package/dist/{mcp-helpers.js → cjs/mcp-helpers.js} +0 -0
  210. /package/dist/{mcp-server.d.ts → cjs/mcp-server.d.ts} +0 -0
  211. /package/dist/{mcp-server.js → cjs/mcp-server.js} +0 -0
  212. /package/dist/{todoist-tool.d.ts → cjs/todoist-tool.d.ts} +0 -0
  213. /package/dist/{todoist-tool.js → cjs/todoist-tool.js} +0 -0
  214. /package/dist/{tools → cjs/tools}/account-overview.d.ts +0 -0
  215. /package/dist/{tools → cjs/tools}/account-overview.js +0 -0
  216. /package/dist/{tools → cjs/tools}/project-overview.d.ts +0 -0
  217. /package/dist/{tools → cjs/tools}/project-overview.js +0 -0
  218. /package/dist/{tools → cjs/tools}/projects-add-one.d.ts +0 -0
  219. /package/dist/{tools → cjs/tools}/projects-add-one.js +0 -0
  220. /package/dist/{tools → cjs/tools}/projects-delete-one.d.ts +0 -0
  221. /package/dist/{tools → cjs/tools}/projects-delete-one.js +0 -0
  222. /package/dist/{tools → cjs/tools}/projects-list.d.ts +0 -0
  223. /package/dist/{tools → cjs/tools}/projects-list.js +0 -0
  224. /package/dist/{tools → cjs/tools}/projects-search.d.ts +0 -0
  225. /package/dist/{tools → cjs/tools}/projects-search.js +0 -0
  226. /package/dist/{tools → cjs/tools}/projects-update-one.d.ts +0 -0
  227. /package/dist/{tools → cjs/tools}/projects-update-one.js +0 -0
  228. /package/dist/{tools → cjs/tools}/sections-add-one.d.ts +0 -0
  229. /package/dist/{tools → cjs/tools}/sections-add-one.js +0 -0
  230. /package/dist/{tools → cjs/tools}/sections-delete-one.d.ts +0 -0
  231. /package/dist/{tools → cjs/tools}/sections-delete-one.js +0 -0
  232. /package/dist/{tools → cjs/tools}/sections-search.d.ts +0 -0
  233. /package/dist/{tools → cjs/tools}/sections-search.js +0 -0
  234. /package/dist/{tools → cjs/tools}/sections-update-one.d.ts +0 -0
  235. /package/dist/{tools → cjs/tools}/sections-update-one.js +0 -0
  236. /package/dist/{tools → cjs/tools}/shared.d.ts +0 -0
  237. /package/dist/{tools → cjs/tools}/shared.js +0 -0
  238. /package/dist/{tools → cjs/tools}/subtasks-list-for-parent-task.d.ts +0 -0
  239. /package/dist/{tools → cjs/tools}/subtasks-list-for-parent-task.js +0 -0
  240. /package/dist/{tools → cjs/tools}/tasks-add-multiple.d.ts +0 -0
  241. /package/dist/{tools → cjs/tools}/tasks-add-multiple.js +0 -0
  242. /package/dist/{tools → cjs/tools}/tasks-by-date-range.d.ts +0 -0
  243. /package/dist/{tools → cjs/tools}/tasks-by-date-range.js +0 -0
  244. /package/dist/{tools → cjs/tools}/tasks-by-project.d.ts +0 -0
  245. /package/dist/{tools → cjs/tools}/tasks-by-project.js +0 -0
  246. /package/dist/{tools → cjs/tools}/tasks-complete-multiple.d.ts +0 -0
  247. /package/dist/{tools → cjs/tools}/tasks-complete-multiple.js +0 -0
  248. /package/dist/{tools → cjs/tools}/tasks-delete-one.d.ts +0 -0
  249. /package/dist/{tools → cjs/tools}/tasks-delete-one.js +0 -0
  250. /package/dist/{tools → cjs/tools}/tasks-list-for-section.d.ts +0 -0
  251. /package/dist/{tools → cjs/tools}/tasks-list-for-section.js +0 -0
  252. /package/dist/{tools → cjs/tools}/tasks-list-overdue.d.ts +0 -0
  253. /package/dist/{tools → cjs/tools}/tasks-list-overdue.js +0 -0
  254. /package/dist/{tools → cjs/tools}/tasks-organize-multiple.d.ts +0 -0
  255. /package/dist/{tools → cjs/tools}/tasks-organize-multiple.js +0 -0
  256. /package/dist/{tools → cjs/tools}/tasks-search.d.ts +0 -0
  257. /package/dist/{tools → cjs/tools}/tasks-search.js +0 -0
  258. /package/dist/{tools → cjs/tools}/tasks-update-one.d.ts +0 -0
  259. /package/dist/{tools → cjs/tools}/tasks-update-one.js +0 -0
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ const ArgsSchema = {
3
+ name: z.string().min(1).describe("The name of the section to add."),
4
+ projectId: z
5
+ .string()
6
+ .min(1)
7
+ .describe("The ID of the project to add the section to."),
8
+ };
9
+ const sectionsAddOne = {
10
+ name: "sections-add-one",
11
+ description: "Add a new section to a project.",
12
+ parameters: ArgsSchema,
13
+ async execute(args, client) {
14
+ const section = await client.addSection({
15
+ name: args.name,
16
+ projectId: args.projectId,
17
+ });
18
+ return section;
19
+ },
20
+ };
21
+ export { sectionsAddOne };
@@ -0,0 +1,15 @@
1
+ import { z } from "zod";
2
+ declare const sectionsDeleteOne: {
3
+ name: string;
4
+ description: string;
5
+ parameters: {
6
+ id: z.ZodString;
7
+ };
8
+ execute(args: {
9
+ id: string;
10
+ }, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
11
+ success: boolean;
12
+ }>;
13
+ };
14
+ export { sectionsDeleteOne };
15
+ //# sourceMappingURL=sections-delete-one.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sections-delete-one.d.ts","sourceRoot":"","sources":["../../../src/tools/sections-delete-one.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,QAAA,MAAM,iBAAiB;;;;;;;;;;;CAQmB,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { z } from "zod";
2
+ const ArgsSchema = {
3
+ id: z.string().min(1).describe("The ID of the section to delete."),
4
+ };
5
+ const sectionsDeleteOne = {
6
+ name: "sections-delete-one",
7
+ description: "Delete a section by its ID.",
8
+ parameters: ArgsSchema,
9
+ async execute(args, client) {
10
+ await client.deleteSection(args.id);
11
+ return { success: true };
12
+ },
13
+ };
14
+ export { sectionsDeleteOne };
@@ -0,0 +1,18 @@
1
+ import { z } from "zod";
2
+ declare const sectionsSearch: {
3
+ name: string;
4
+ description: string;
5
+ parameters: {
6
+ projectId: z.ZodString;
7
+ search: z.ZodOptional<z.ZodString>;
8
+ };
9
+ execute(args: {
10
+ projectId: string;
11
+ search?: string | undefined;
12
+ }, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
13
+ id: string;
14
+ name: string;
15
+ }[]>;
16
+ };
17
+ export { sectionsSearch };
18
+ //# sourceMappingURL=sections-search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sections-search.d.ts","sourceRoot":"","sources":["../../../src/tools/sections-search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;CAmBsB,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { z } from "zod";
2
+ const ArgsSchema = {
3
+ projectId: z
4
+ .string()
5
+ .min(1)
6
+ .describe("The ID of the project to search sections in."),
7
+ search: z
8
+ .string()
9
+ .optional()
10
+ .describe("Search for a section by name (partial and case insensitive match). If omitted, all sections in the project are returned."),
11
+ };
12
+ const sectionsSearch = {
13
+ name: "sections-search",
14
+ description: "Search for sections by name or other criteria in a project.",
15
+ parameters: ArgsSchema,
16
+ async execute(args, client) {
17
+ const { results } = await client.getSections({
18
+ projectId: args.projectId,
19
+ });
20
+ const searchLower = args.search ? args.search.toLowerCase() : undefined;
21
+ const filtered = searchLower
22
+ ? results.filter((section) => section.name.toLowerCase().includes(searchLower))
23
+ : results;
24
+ return filtered.map((section) => ({
25
+ id: section.id,
26
+ name: section.name,
27
+ }));
28
+ },
29
+ };
30
+ export { sectionsSearch };
@@ -0,0 +1,15 @@
1
+ import { z } from "zod";
2
+ declare const sectionsUpdateOne: {
3
+ name: string;
4
+ description: string;
5
+ parameters: {
6
+ id: z.ZodString;
7
+ name: z.ZodString;
8
+ };
9
+ execute(args: {
10
+ name: string;
11
+ id: string;
12
+ }, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<import("@doist/todoist-api-typescript").Section>;
13
+ };
14
+ export { sectionsUpdateOne };
15
+ //# sourceMappingURL=sections-update-one.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sections-update-one.d.ts","sourceRoot":"","sources":["../../../src/tools/sections-update-one.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,QAAA,MAAM,iBAAiB;;;;;;;;;;;CASmB,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { z } from "zod";
2
+ const ArgsSchema = {
3
+ id: z.string().min(1).describe("The ID of the section to update."),
4
+ name: z.string().min(1).describe("The new name for the section."),
5
+ };
6
+ const sectionsUpdateOne = {
7
+ name: "sections-update-one",
8
+ description: "Update a section's name by its ID.",
9
+ parameters: ArgsSchema,
10
+ async execute(args, client) {
11
+ const { id, name } = args;
12
+ const section = await client.updateSection(id, { name });
13
+ return section;
14
+ },
15
+ };
16
+ export { sectionsUpdateOne };
@@ -0,0 +1,55 @@
1
+ import { type Project, type Task, type TodoistApi } from "@doist/todoist-api-typescript";
2
+ /**
3
+ * Map a single Todoist task to a more structured format, for LLM consumption.
4
+ * @param task - The task to map.
5
+ * @returns The mapped task.
6
+ */
7
+ declare function mapTask(task: Task): {
8
+ id: string;
9
+ content: string;
10
+ description: string;
11
+ dueDate: string | undefined;
12
+ recurring: string | boolean;
13
+ priority: number;
14
+ projectId: string;
15
+ sectionId: string | null;
16
+ parentId: string | null;
17
+ labels: string[];
18
+ };
19
+ /**
20
+ * Map a single Todoist project to a more structured format, for LLM consumption.
21
+ * @param project - The project to map.
22
+ * @returns The mapped project.
23
+ */
24
+ declare function mapProject(project: Project): {
25
+ id: string;
26
+ name: string;
27
+ color: string;
28
+ isFavorite: boolean;
29
+ isShared: boolean;
30
+ parentId: string | null;
31
+ inboxProject: boolean;
32
+ viewStyle: string;
33
+ };
34
+ declare function getTasksByFilter({ client, query, limit, cursor, }: {
35
+ client: TodoistApi;
36
+ query: string;
37
+ limit: number | undefined;
38
+ cursor: string | undefined;
39
+ }): Promise<{
40
+ tasks: {
41
+ id: string;
42
+ content: string;
43
+ description: string;
44
+ dueDate: string | undefined;
45
+ recurring: string | boolean;
46
+ priority: number;
47
+ projectId: string;
48
+ sectionId: string | null;
49
+ parentId: string | null;
50
+ labels: string[];
51
+ }[];
52
+ nextCursor: string | null;
53
+ }>;
54
+ export { getTasksByFilter, mapTask, mapProject };
55
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/tools/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,UAAU,EAEf,MAAM,+BAA+B,CAAC;AAGvC;;;;GAIG;AACH,iBAAS,OAAO,CAAC,IAAI,EAAE,IAAI;;;;;;;;;;;EAc1B;AAED;;;;GAIG;AACH,iBAAS,UAAU,CAAC,OAAO,EAAE,OAAO;;;;;;;;;EAWnC;AAWD,iBAAe,gBAAgB,CAAC,EAC/B,MAAM,EACN,KAAK,EACL,KAAK,EACL,MAAM,GACN,EAAE;IACF,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;;;;;;;;;;;;;;GAyBA;AAED,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { getSanitizedContent, } from "@doist/todoist-api-typescript";
2
+ import z from "zod";
3
+ /**
4
+ * Map a single Todoist task to a more structured format, for LLM consumption.
5
+ * @param task - The task to map.
6
+ * @returns The mapped task.
7
+ */
8
+ function mapTask(task) {
9
+ return {
10
+ id: task.id,
11
+ content: getSanitizedContent(task.content),
12
+ description: getSanitizedContent(task.description),
13
+ dueDate: task.due?.date,
14
+ recurring: task.due?.isRecurring && task.due.string ? task.due.string : false,
15
+ priority: task.priority,
16
+ projectId: task.projectId,
17
+ sectionId: task.sectionId,
18
+ parentId: task.parentId,
19
+ labels: task.labels,
20
+ };
21
+ }
22
+ /**
23
+ * Map a single Todoist project to a more structured format, for LLM consumption.
24
+ * @param project - The project to map.
25
+ * @returns The mapped project.
26
+ */
27
+ function mapProject(project) {
28
+ return {
29
+ id: project.id,
30
+ name: project.name,
31
+ color: project.color,
32
+ isFavorite: project.isFavorite,
33
+ isShared: project.isShared,
34
+ parentId: project.parentId ?? null,
35
+ inboxProject: project.isInboxProject ?? false,
36
+ viewStyle: project.viewStyle,
37
+ };
38
+ }
39
+ const ErrorSchema = z.object({
40
+ httpStatusCode: z.number(),
41
+ responseData: z.object({
42
+ error: z.string(),
43
+ errorCode: z.number(),
44
+ errorTag: z.string(),
45
+ }),
46
+ });
47
+ async function getTasksByFilter({ client, query, limit, cursor, }) {
48
+ try {
49
+ const { results, nextCursor } = await client.getTasksByFilter({
50
+ query,
51
+ cursor,
52
+ limit,
53
+ });
54
+ return {
55
+ tasks: results.map(mapTask),
56
+ nextCursor,
57
+ };
58
+ }
59
+ catch (error) {
60
+ const parsedError = ErrorSchema.safeParse(error);
61
+ if (!parsedError.success) {
62
+ throw error;
63
+ }
64
+ const { responseData } = parsedError.data;
65
+ if (responseData.errorTag === "INVALID_SEARCH_QUERY") {
66
+ throw new Error(`Invalid filter query: ${query}`);
67
+ }
68
+ throw new Error(`${responseData.error} (tag: ${responseData.errorTag}, code: ${responseData.errorCode})`);
69
+ }
70
+ }
71
+ export { getTasksByFilter, mapTask, mapProject };
@@ -0,0 +1,31 @@
1
+ import { z } from "zod";
2
+ declare const subtasksListForParentTask: {
3
+ name: string;
4
+ description: string;
5
+ parameters: {
6
+ parentId: z.ZodString;
7
+ limit: z.ZodDefault<z.ZodNumber>;
8
+ cursor: z.ZodOptional<z.ZodString>;
9
+ };
10
+ execute(args: {
11
+ limit: number;
12
+ parentId: string;
13
+ cursor?: string | undefined;
14
+ }, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
15
+ tasks: {
16
+ id: string;
17
+ content: string;
18
+ description: string;
19
+ dueDate: string | undefined;
20
+ recurring: string | boolean;
21
+ priority: number;
22
+ projectId: string;
23
+ sectionId: string | null;
24
+ parentId: string | null;
25
+ labels: string[];
26
+ }[];
27
+ nextCursor: string | null;
28
+ }>;
29
+ };
30
+ export { subtasksListForParentTask };
31
+ //# sourceMappingURL=subtasks-list-for-parent-task.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subtasks-list-for-parent-task.d.ts","sourceRoot":"","sources":["../../../src/tools/subtasks-list-for-parent-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBW,CAAC;AAE3C,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { z } from "zod";
2
+ import { mapTask } from "./shared.js";
3
+ const ArgsSchema = {
4
+ parentId: z
5
+ .string()
6
+ .min(1)
7
+ .describe("The ID of the parent task to get subtasks for."),
8
+ limit: z
9
+ .number()
10
+ .int()
11
+ .min(1)
12
+ .max(50)
13
+ .default(10)
14
+ .describe("The maximum number of subtasks to return."),
15
+ cursor: z
16
+ .string()
17
+ .optional()
18
+ .describe("The cursor to get the next page of subtasks (from previous call)."),
19
+ };
20
+ const subtasksListForParentTask = {
21
+ name: "subtasks-list-for-parent-task",
22
+ description: "List subtasks for a given parent task.",
23
+ parameters: ArgsSchema,
24
+ async execute(args, client) {
25
+ const { parentId, limit, cursor } = args;
26
+ const { results, nextCursor } = await client.getTasks({
27
+ parentId,
28
+ limit,
29
+ cursor: cursor ?? null,
30
+ });
31
+ return {
32
+ tasks: results.map(mapTask),
33
+ nextCursor,
34
+ };
35
+ },
36
+ };
37
+ export { subtasksListForParentTask };
@@ -0,0 +1,50 @@
1
+ import { z } from "zod";
2
+ declare const tasksAddMultiple: {
3
+ name: string;
4
+ description: string;
5
+ parameters: {
6
+ projectId: z.ZodOptional<z.ZodString>;
7
+ sectionId: z.ZodOptional<z.ZodString>;
8
+ parentId: z.ZodOptional<z.ZodString>;
9
+ tasks: z.ZodArray<z.ZodObject<{
10
+ content: z.ZodString;
11
+ description: z.ZodOptional<z.ZodString>;
12
+ priority: z.ZodOptional<z.ZodNumber>;
13
+ dueString: z.ZodOptional<z.ZodString>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ content: string;
16
+ description?: string | undefined;
17
+ priority?: number | undefined;
18
+ dueString?: string | undefined;
19
+ }, {
20
+ content: string;
21
+ description?: string | undefined;
22
+ priority?: number | undefined;
23
+ dueString?: string | undefined;
24
+ }>, "many">;
25
+ };
26
+ execute(args: {
27
+ tasks: {
28
+ content: string;
29
+ description?: string | undefined;
30
+ priority?: number | undefined;
31
+ dueString?: string | undefined;
32
+ }[];
33
+ projectId?: string | undefined;
34
+ parentId?: string | undefined;
35
+ sectionId?: string | undefined;
36
+ }, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
37
+ id: string;
38
+ content: string;
39
+ description: string;
40
+ dueDate: string | undefined;
41
+ recurring: string | boolean;
42
+ priority: number;
43
+ projectId: string;
44
+ sectionId: string | null;
45
+ parentId: string | null;
46
+ labels: string[];
47
+ }[]>;
48
+ };
49
+ export { tasksAddMultiple };
50
+ //# sourceMappingURL=tasks-add-multiple.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks-add-multiple.d.ts","sourceRoot":"","sources":["../../../src/tools/tasks-add-multiple.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoCxB,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAaoB,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { z } from "zod";
2
+ import { mapTask } from "./shared.js";
3
+ const TaskSchema = z.object({
4
+ content: z.string().min(1).describe("The content of the task to create."),
5
+ description: z.string().optional().describe("The description of the task."),
6
+ priority: z
7
+ .number()
8
+ .int()
9
+ .min(1)
10
+ .max(4)
11
+ .optional()
12
+ .describe("The priority of the task (1-4)."),
13
+ dueString: z
14
+ .string()
15
+ .optional()
16
+ .describe("The due date for the task, in natural language."),
17
+ });
18
+ const ArgsSchema = {
19
+ projectId: z
20
+ .string()
21
+ .optional()
22
+ .describe("The project ID to add the tasks to."),
23
+ sectionId: z
24
+ .string()
25
+ .optional()
26
+ .describe("The section ID to add the tasks to."),
27
+ parentId: z
28
+ .string()
29
+ .optional()
30
+ .describe("The parent task ID (for subtasks)."),
31
+ tasks: z.array(TaskSchema).min(1).describe("The array of tasks to add."),
32
+ };
33
+ const tasksAddMultiple = {
34
+ name: "tasks-add-multiple",
35
+ description: "Add one or more tasks to a project, section, or parent.",
36
+ parameters: ArgsSchema,
37
+ async execute(args, client) {
38
+ const { projectId, sectionId, parentId, tasks } = args;
39
+ const newTasks = [];
40
+ for (const task of tasks) {
41
+ const taskArgs = { ...task, projectId, sectionId, parentId };
42
+ newTasks.push(await client.addTask(taskArgs));
43
+ }
44
+ return newTasks.map(mapTask);
45
+ },
46
+ };
47
+ export { tasksAddMultiple };
@@ -0,0 +1,33 @@
1
+ import { z } from "zod";
2
+ declare const tasksListByDate: {
3
+ name: string;
4
+ description: string;
5
+ parameters: {
6
+ startDate: z.ZodString;
7
+ daysCount: z.ZodDefault<z.ZodNumber>;
8
+ limit: z.ZodDefault<z.ZodNumber>;
9
+ cursor: z.ZodOptional<z.ZodString>;
10
+ };
11
+ execute(args: {
12
+ limit: number;
13
+ startDate: string;
14
+ daysCount: number;
15
+ cursor?: string | undefined;
16
+ }, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
17
+ tasks: {
18
+ id: string;
19
+ content: string;
20
+ description: string;
21
+ dueDate: string | undefined;
22
+ recurring: string | boolean;
23
+ priority: number;
24
+ projectId: string;
25
+ sectionId: string | null;
26
+ parentId: string | null;
27
+ labels: string[];
28
+ }[];
29
+ nextCursor: string | null;
30
+ }>;
31
+ };
32
+ export { tasksListByDate };
33
+ //# sourceMappingURL=tasks-by-date-range.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks-by-date-range.d.ts","sourceRoot":"","sources":["../../../src/tools/tasks-by-date-range.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmCxB,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBqB,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { addDays, formatISO } from "date-fns";
2
+ import { z } from "zod";
3
+ import { getTasksByFilter } from "./shared.js";
4
+ const ArgsSchema = {
5
+ startDate: z
6
+ .string()
7
+ .regex(/^(\d{4}-\d{2}-\d{2}|today)$/)
8
+ .describe("The start date to get the tasks for. Format: YYYY-MM-DD or 'today'."),
9
+ daysCount: z
10
+ .number()
11
+ .int()
12
+ .min(1)
13
+ .max(30)
14
+ .default(1)
15
+ .describe("The number of days to get the tasks for, starting from the start date."),
16
+ limit: z
17
+ .number()
18
+ .int()
19
+ .min(1)
20
+ .max(50)
21
+ .default(10)
22
+ .describe("The maximum number of tasks to return."),
23
+ cursor: z
24
+ .string()
25
+ .optional()
26
+ .describe("The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters)."),
27
+ };
28
+ const tasksListByDate = {
29
+ name: "tasks-list-by-date",
30
+ description: "Get tasks by date range.",
31
+ parameters: ArgsSchema,
32
+ async execute(args, client) {
33
+ const startDate = args.startDate === "today"
34
+ ? formatISO(new Date(), { representation: "date" })
35
+ : args.startDate;
36
+ const endDate = addDays(startDate, args.daysCount + 1);
37
+ const endDateStr = formatISO(endDate, { representation: "date" });
38
+ const query = `(due after: ${startDate} | due: ${startDate}) & due before: ${endDateStr}`;
39
+ return await getTasksByFilter({
40
+ client,
41
+ query,
42
+ cursor: args.cursor,
43
+ limit: args.limit,
44
+ });
45
+ },
46
+ };
47
+ export { tasksListByDate };
@@ -0,0 +1,31 @@
1
+ import { z } from "zod";
2
+ declare const tasksListForProject: {
3
+ name: string;
4
+ description: string;
5
+ parameters: {
6
+ projectId: z.ZodString;
7
+ limit: z.ZodDefault<z.ZodNumber>;
8
+ cursor: z.ZodOptional<z.ZodString>;
9
+ };
10
+ execute(args: {
11
+ limit: number;
12
+ projectId: string;
13
+ cursor?: string | undefined;
14
+ }, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
15
+ tasks: {
16
+ id: string;
17
+ content: string;
18
+ description: string;
19
+ dueDate: string | undefined;
20
+ recurring: string | boolean;
21
+ priority: number;
22
+ projectId: string;
23
+ sectionId: string | null;
24
+ parentId: string | null;
25
+ labels: string[];
26
+ }[];
27
+ nextCursor: string | null;
28
+ }>;
29
+ };
30
+ export { tasksListForProject };
31
+ //# sourceMappingURL=tasks-by-project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks-by-project.d.ts","sourceRoot":"","sources":["../../../src/tools/tasks-by-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBiB,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { z } from "zod";
2
+ import { mapTask } from "./shared.js";
3
+ const ArgsSchema = {
4
+ projectId: z
5
+ .string()
6
+ .min(1)
7
+ .describe("The ID of the project to get tasks for."),
8
+ limit: z
9
+ .number()
10
+ .int()
11
+ .min(1)
12
+ .max(50)
13
+ .default(10)
14
+ .describe("The maximum number of tasks to return."),
15
+ cursor: z
16
+ .string()
17
+ .optional()
18
+ .describe("The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters)."),
19
+ };
20
+ const tasksListForProject = {
21
+ name: "tasks-list-for-project",
22
+ description: "Get tasks by project ID.",
23
+ parameters: ArgsSchema,
24
+ async execute(args, client) {
25
+ const { projectId, limit, cursor } = args;
26
+ const { results, nextCursor } = await client.getTasks({
27
+ projectId,
28
+ limit,
29
+ cursor: cursor ?? null,
30
+ });
31
+ return {
32
+ tasks: results.map(mapTask),
33
+ nextCursor,
34
+ };
35
+ },
36
+ };
37
+ export { tasksListForProject };
@@ -0,0 +1,16 @@
1
+ import { z } from "zod";
2
+ declare const tasksCompleteMultiple: {
3
+ name: string;
4
+ description: string;
5
+ parameters: {
6
+ ids: z.ZodArray<z.ZodString, "many">;
7
+ };
8
+ execute(args: {
9
+ ids: string[];
10
+ }, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
11
+ success: boolean;
12
+ completed: string[];
13
+ }>;
14
+ };
15
+ export { tasksCompleteMultiple };
16
+ //# sourceMappingURL=tasks-complete-multiple.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks-complete-multiple.d.ts","sourceRoot":"","sources":["../../../src/tools/tasks-complete-multiple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,QAAA,MAAM,qBAAqB;;;;;;;;;;;;CAgBe,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { z } from "zod";
2
+ const ArgsSchema = {
3
+ ids: z
4
+ .array(z.string().min(1))
5
+ .min(1)
6
+ .describe("The IDs of the tasks to complete."),
7
+ };
8
+ const tasksCompleteMultiple = {
9
+ name: "tasks-complete-multiple",
10
+ description: "Complete one or more tasks by their IDs.",
11
+ parameters: ArgsSchema,
12
+ async execute(args, client) {
13
+ const completed = [];
14
+ for (const id of args.ids) {
15
+ try {
16
+ await client.closeTask(id);
17
+ completed.push(id);
18
+ }
19
+ catch {
20
+ // Ignore errors for individual tasks, continue with others
21
+ }
22
+ }
23
+ return { success: true, completed };
24
+ },
25
+ };
26
+ export { tasksCompleteMultiple };