todoist-mcp 1.3.1 → 1.3.3

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.
@@ -54,6 +54,10 @@ createApiHandler({
54
54
  section_id: z.string().optional().describe('Filter by section'),
55
55
  label: z.string().optional().describe('Filter by label'),
56
56
  ids: z.string().optional().describe('Comma-separated list of task IDs'),
57
+ cursor: z
58
+ .string()
59
+ .optional()
60
+ .describe('Cursor for pagination (from next_cursor in previous response)'),
57
61
  limit: z.number().optional().default(50),
58
62
  },
59
63
  method: 'GET',
@@ -66,6 +70,10 @@ createApiHandler({
66
70
  query: z
67
71
  .string()
68
72
  .describe('Todoist filter query. Examples: "today", "overdue", "today | overdue", "no date", "no time", "P1 | P2", "7 days & @waiting", "created before: -365 days", "assigned to: person", "added by: me", "#Project & !assigned", "subtask", "!subtask", "today & @email", "@work | @office", "(today | overdue) & #Work", "all & 7 days", "!assigned", "search: keyword"'),
73
+ cursor: z
74
+ .string()
75
+ .optional()
76
+ .describe('Cursor for pagination (from next_cursor in previous response)'),
69
77
  limit: z.number().optional().default(50),
70
78
  },
71
79
  method: 'GET',
@@ -53,8 +53,11 @@ export class TodoistClient {
53
53
  headers: this.getHeaders(),
54
54
  });
55
55
  const data = await this.handleResponse(response);
56
- // API v1 wraps list responses in { results: [...] }
56
+ // API v1 wraps list responses in { results: [...], next_cursor: ... }
57
57
  if (data && typeof data === 'object' && Array.isArray(data.results)) {
58
+ if (data.next_cursor) {
59
+ return { results: data.results, next_cursor: data.next_cursor };
60
+ }
58
61
  return data.results;
59
62
  }
60
63
  return data;
@@ -49,7 +49,7 @@ export function createHandler(name, description, paramsSchema, handler) {
49
49
  };
50
50
  }
51
51
  };
52
- // Crazy cast, if you can do it better, please, let me knows
52
+ // Cast needed: SDK uses Zod 4 types internally, project uses Zod 3
53
53
  server.tool(name, description, paramsSchema, mcpToolCallback);
54
54
  }
55
55
  export function createApiHandler(options) {
@@ -1,6 +1,5 @@
1
- import { CallToolRequestSchema, Result } from '@modelcontextprotocol/sdk/types.js';
2
- import z from 'zod';
3
- export type ToolHandlers = Record<string, (request: z.infer<typeof CallToolRequestSchema>) => Promise<Result>>;
1
+ import { CallToolRequest, Result } from '@modelcontextprotocol/sdk/types.js';
2
+ export type ToolHandlers = Record<string, (request: CallToolRequest) => Promise<Result>>;
4
3
  export type ToolResult = {
5
4
  content: Array<{
6
5
  type: string;
@@ -1 +1 @@
1
- export declare const version = "1.3.1";
1
+ export declare const version = "1.3.3";
@@ -1,2 +1,2 @@
1
1
  // Auto-generated file, do not edit
2
- export const version = '1.3.1';
2
+ export const version = '1.3.3';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "todoist-mcp",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "description": "Todoist MCP Server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",