@doist/todoist-mcp 13.10.2 → 13.11.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.
- package/README.md +12 -0
- package/dist/index.js +3 -3
- package/dist/main-http.js +2 -2
- package/dist/main.js +1 -1
- package/dist/mcp-helpers.d.ts +9 -4
- package/dist/mcp-helpers.d.ts.map +1 -1
- package/dist/{mcp-server-cg7S50xk.js → mcp-server-BhPX7dvL.js} +1187 -1260
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/{require-valid-todoist-token-DABuHNWL.js → require-valid-todoist-token-BOCa8T4B.js} +1 -1
- package/dist/todoist-tool.d.ts +7 -69
- package/dist/todoist-tool.d.ts.map +1 -1
- package/package.json +2 -1
- package/scripts/bump-plugin-version.mjs +5 -1
- package/dist/utils/sanitize-data.d.ts +0 -10
- package/dist/utils/sanitize-data.d.ts.map +0 -1
package/dist/mcp-server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAExD,OAAO,EACH,aAAa,EACb,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,QAAQ,EAEhB,MAAM,kBAAkB,CAAA;AAMzB,eAAO,MAAM,YAAY,qhJAyDxB,CAAA;AAgBD;;;;;;GAMG;AAEH,iBAAS,YAAY,CAAC,EAClB,aAAa,EACb,OAAO,EACP,QAAa,GAChB,EAAE;IACC,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACtB,
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAExD,OAAO,EACH,aAAa,EACb,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,QAAQ,EAEhB,MAAM,kBAAkB,CAAA;AAMzB,eAAO,MAAM,YAAY,qhJAyDxB,CAAA;AAgBD;;;;;;GAMG;AAEH,iBAAS,YAAY,CAAC,EAClB,aAAa,EACb,OAAO,EACP,QAAa,GAChB,EAAE;IACC,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACtB,aA+CA;AAED,OAAO,EAAE,aAAa,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,YAAY,EAAE,CAAA"}
|
package/dist/todoist-tool.d.ts
CHANGED
|
@@ -1,77 +1,15 @@
|
|
|
1
|
+
import { AnyMcpTool, ExecuteResult, McpTool, RequiredToolAnnotations } from '@doist/mcp-core';
|
|
1
2
|
import { TodoistApi } from '@doist/todoist-sdk';
|
|
2
|
-
import { ContentBlock, ToolAnnotations } from '@modelcontextprotocol/server';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
type ExecuteResult<Output extends z.ZodRawShape> = Promise<{
|
|
5
|
-
textContent?: string;
|
|
6
|
-
structuredContent?: z.infer<z.ZodObject<Output>>;
|
|
7
|
-
contentItems?: ContentBlock[];
|
|
8
|
-
}>;
|
|
9
|
-
type RequiredToolAnnotations = ToolAnnotations & {
|
|
10
|
-
readOnlyHint: boolean;
|
|
11
|
-
destructiveHint: boolean;
|
|
12
|
-
idempotentHint: boolean;
|
|
13
|
-
};
|
|
14
4
|
/**
|
|
15
|
-
* A Todoist tool that can be used in an MCP server or other conversational AI interfaces
|
|
5
|
+
* A Todoist tool that can be used in an MCP server or other conversational AI interfaces: an
|
|
6
|
+
* `McpTool` whose `execute` receives the Todoist API client.
|
|
16
7
|
*/
|
|
17
|
-
type TodoistTool<Params extends z.ZodRawShape, Output extends z.ZodRawShape = Record<string, never>> =
|
|
18
|
-
/**
|
|
19
|
-
* The name of the tool.
|
|
20
|
-
*/
|
|
21
|
-
name: string;
|
|
22
|
-
/**
|
|
23
|
-
* The description of the tool. This is important for the LLM to understand what the tool does,
|
|
24
|
-
* and how to use it.
|
|
25
|
-
*/
|
|
26
|
-
description: string;
|
|
27
|
-
/**
|
|
28
|
-
* The schema of the parameters of the tool.
|
|
29
|
-
*
|
|
30
|
-
* This is used to validate the parameters of the tool, as well as to let the LLM know what the
|
|
31
|
-
* parameters are.
|
|
32
|
-
*/
|
|
33
|
-
parameters: Params;
|
|
34
|
-
/**
|
|
35
|
-
* The schema of the output of the tool.
|
|
36
|
-
*
|
|
37
|
-
* This is used to describe the structured output format that the tool will return.
|
|
38
|
-
*/
|
|
39
|
-
outputSchema?: Output;
|
|
40
|
-
/**
|
|
41
|
-
* MCP ToolAnnotations hints for this tool.
|
|
42
|
-
*/
|
|
43
|
-
annotations: RequiredToolAnnotations;
|
|
44
|
-
/**
|
|
45
|
-
* The meta data of the tool.
|
|
46
|
-
*
|
|
47
|
-
* This is used to store additional information about the tool.
|
|
48
|
-
*/
|
|
49
|
-
_meta?: Record<string, unknown>;
|
|
50
|
-
/**
|
|
51
|
-
* The function that executes the tool.
|
|
52
|
-
*
|
|
53
|
-
* This is the main function that will be called when the tool is used.
|
|
54
|
-
*
|
|
55
|
-
* @param args - The arguments of the tool.
|
|
56
|
-
* @param client - The Todoist API client used to make requests to the Todoist API.
|
|
57
|
-
* @returns The result of the tool.
|
|
58
|
-
*/
|
|
59
|
-
execute: (args: z.infer<z.ZodObject<Params>>, client: TodoistApi) => ExecuteResult<Output>;
|
|
60
|
-
};
|
|
8
|
+
type TodoistTool<Params extends z.ZodRawShape, Output extends z.ZodRawShape = Record<string, never>> = McpTool<Params, Output, TodoistApi>;
|
|
61
9
|
/**
|
|
62
|
-
* A tool of any parameter and output shape
|
|
63
|
-
*
|
|
64
|
-
* `TodoistTool` is generic over its schemas, and `execute` is contravariant in
|
|
65
|
-
* its argument, so no single instantiation of it accepts every tool. Declaring
|
|
66
|
-
* the argument as `never` does: `never` is assignable to any parameter type, so
|
|
67
|
-
* a tool taking concrete args satisfies this while a caller cannot invoke
|
|
68
|
-
* `execute` without narrowing back to the real tool type first.
|
|
69
|
-
*
|
|
70
|
-
* Use this for collections that hold tools of mixed shapes. Individual tools
|
|
71
|
-
* keep their precise types through their own `satisfies TodoistTool<...>`.
|
|
10
|
+
* A Todoist tool of any parameter and output shape, for collections that hold tools of mixed
|
|
11
|
+
* shapes. Individual tools keep their precise types through their own `satisfies TodoistTool<...>`.
|
|
72
12
|
*/
|
|
73
|
-
type AnyTodoistTool =
|
|
74
|
-
execute: (args: never, client: TodoistApi) => ExecuteResult<z.ZodRawShape>;
|
|
75
|
-
};
|
|
13
|
+
type AnyTodoistTool = AnyMcpTool<TodoistApi>;
|
|
76
14
|
export type { AnyTodoistTool, ExecuteResult, RequiredToolAnnotations, TodoistTool };
|
|
77
15
|
//# sourceMappingURL=todoist-tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"todoist-tool.d.ts","sourceRoot":"","sources":["../src/todoist-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"todoist-tool.d.ts","sourceRoot":"","sources":["../src/todoist-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAClG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B;;;GAGG;AACH,KAAK,WAAW,CACZ,MAAM,SAAS,CAAC,CAAC,WAAW,EAC5B,MAAM,SAAS,CAAC,CAAC,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IACpD,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAA;AAEvC;;;GAGG;AACH,KAAK,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC,CAAA;AAE5C,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,uBAAuB,EAAE,WAAW,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/todoist-mcp",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.11.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"prepare": "lefthook install --reset-hooks-path"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
+
"@doist/mcp-core": "0.1.1",
|
|
70
71
|
"@doist/todoist-sdk": "16.0.0",
|
|
71
72
|
"@modelcontextprotocol/ext-apps": "2.0.4",
|
|
72
73
|
"date-fns": "4.1.0",
|
|
@@ -10,7 +10,11 @@ if (!version) {
|
|
|
10
10
|
|
|
11
11
|
const paths = manifestPath
|
|
12
12
|
? [manifestPath]
|
|
13
|
-
: [
|
|
13
|
+
: [
|
|
14
|
+
'.claude-plugin/plugin.json',
|
|
15
|
+
'plugins/todoist/.claude-plugin/plugin.json',
|
|
16
|
+
'gemini-extension.json',
|
|
17
|
+
]
|
|
14
18
|
|
|
15
19
|
for (const path of paths) {
|
|
16
20
|
const manifest = JSON.parse(readFileSync(path, 'utf8'))
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Removes all null fields and empty objects from an object recursively.
|
|
3
|
-
* Empty arrays are preserved as they carry semantic meaning (e.g., "no results found").
|
|
4
|
-
* This ensures that data sent to agents doesn't include unnecessary empty values.
|
|
5
|
-
*
|
|
6
|
-
* @param obj - The object to sanitize
|
|
7
|
-
* @returns A new object with all null fields and empty objects removed
|
|
8
|
-
*/
|
|
9
|
-
export declare function removeNullFields<T>(obj: T): T;
|
|
10
|
-
//# sourceMappingURL=sanitize-data.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sanitize-data.d.ts","sourceRoot":"","sources":["../../src/utils/sanitize-data.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAiC7C"}
|