togello-mcp-server 1.0.43 → 1.0.45
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 +4 -2
- package/build/client.js +13 -0
- package/build/handlers/tool/deleteTaskHandler.js +13 -0
- package/build/handlers/tool/getActiveGathersHandler.js +34 -0
- package/build/mcpServer.js +17 -0
- package/package.json +13 -11
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ https://togello.com/sign
|
|
|
6
6
|
|
|
7
7
|
## Requirements
|
|
8
8
|
|
|
9
|
-
- Node.js 22 or later
|
|
9
|
+
- Node.js 24.22.1 or later
|
|
10
10
|
- A Togello API token
|
|
11
11
|
|
|
12
12
|
## Protocol compatibility
|
|
@@ -77,12 +77,14 @@ All tools set MCP `readOnlyHint`, `openWorldHint`, and `destructiveHint` annotat
|
|
|
77
77
|
- `get-today-calendar`: Retrieves linked Google Calendar events and scheduled tasks.
|
|
78
78
|
- `get-activity-item-list`: Retrieves enabled activity items.
|
|
79
79
|
- `get-activity-log-list`: Retrieves activity logs.
|
|
80
|
+
- `get-active-gathers`: Retrieves active scheduling polls created or previously viewed by the authenticated user, using `GET /v2/gathers`. Takes no arguments. Unconfirmed polls are active through their adjustment end time; confirmed events and recruitments are active through their start time, inclusive. Already-started events are excluded even if they have not ended. Missing or invalid eligibility dates are excluded. Results retain API ordering and contain only UUID, title, mode, adjustment and confirmed timestamps, participant counts, and relationship type. Returns `{ "gathers": [] }` when none qualify; API failures are errors.
|
|
80
81
|
- `get-japan-current-time`: Returns the current time in Japan.
|
|
81
82
|
|
|
82
83
|
Write tools return JSON. Failed tool responses also return JSON and are marked with `isError: true`. Tools that can overwrite existing private Togello data set `destructiveHint: true`; create/start tools set `destructiveHint: false`.
|
|
83
84
|
|
|
84
85
|
- `create-task`: Creates a TODO task.
|
|
85
86
|
- `update-task`: Updates a TODO task, including category assignment or removal.
|
|
87
|
+
- `delete-task`: Permanently deletes one TODO task by `todoUUID` from `get-tasks-list`. Use `update-task` with `status: "DONE"` to complete a task. To find completed tasks for deletion, use `completionStatus: "COMPLETED"`. This destructive, idempotent tool returns `{ "todoUUID": "...", "deleted": true }` after a successful API response, including when no task owned by the caller matches. Success does not prove that a task previously existed. Ambiguous targets must be clarified before deletion.
|
|
86
88
|
- `update-calendar-date-memo`: Updates or clears a calendar date memo.
|
|
87
89
|
- `start-activity-log`: Starts an activity log.
|
|
88
90
|
- `complete-activity-log`: Completes an activity log.
|
|
@@ -94,7 +96,7 @@ npm ci
|
|
|
94
96
|
npm test
|
|
95
97
|
```
|
|
96
98
|
|
|
97
|
-
The protocol tests exercise SDK v2 modern clients and SDK v1.
|
|
99
|
+
The protocol tests exercise SDK v2 modern clients and SDK v1.32.2 legacy clients over stdio, Streamable HTTP, and legacy SSE against a local mock API. They verify the 12 existing tool contracts and the added deletion and active scheduling poll tools, read/write/delete results, request credential isolation, protocol header errors, body limits, metadata, and legacy session lifecycle. `test/fixtures/v1-tools.json` records `tools/list` from server 1.0.42 at commit `558c2c2fda81f7c8b20f443afa1bf5e554a72dad`; comparisons allow the SDK's JSON Schema dialect and wire-format changes.
|
|
98
100
|
|
|
99
101
|
SDK-facing schemas use Zod 4. UUID fields retain the prior permissive UUID syntax, and date-time fields retain their previous Zod 3 validation through the compatibility export included in the Zod package.
|
|
100
102
|
|
package/build/client.js
CHANGED
|
@@ -8,6 +8,19 @@ function getApiTokenOrThrow() {
|
|
|
8
8
|
return token;
|
|
9
9
|
}
|
|
10
10
|
export const httpClient = {
|
|
11
|
+
delete: async ({ path }) => {
|
|
12
|
+
const token = getApiTokenOrThrow();
|
|
13
|
+
const response = await fetch(`${API_BASE_URL}${path}`, {
|
|
14
|
+
method: 'DELETE',
|
|
15
|
+
headers: {
|
|
16
|
+
Authorization: `Bearer ${token}`,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
if (!response.ok) {
|
|
20
|
+
throw new Error(`response status: ${response.status}`);
|
|
21
|
+
}
|
|
22
|
+
await response.arrayBuffer();
|
|
23
|
+
},
|
|
11
24
|
fetchURL: async ({ path }) => {
|
|
12
25
|
const token = getApiTokenOrThrow();
|
|
13
26
|
const url = `${API_BASE_URL}${path}`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { httpClient } from '../../client.js';
|
|
2
|
+
import { errorToolResponse, jsonToolResponse } from './toolResponse.js';
|
|
3
|
+
export const deleteTaskHandler = async ({ todoUUID }) => {
|
|
4
|
+
try {
|
|
5
|
+
await httpClient.delete({
|
|
6
|
+
path: `/v2/integration/todo/${encodeURIComponent(todoUUID)}`,
|
|
7
|
+
});
|
|
8
|
+
return jsonToolResponse({ todoUUID, deleted: true });
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return errorToolResponse('Error deleting task');
|
|
12
|
+
}
|
|
13
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { httpClient } from '../../client.js';
|
|
2
|
+
import { errorToolResponse, jsonToolResponse } from './toolResponse.js';
|
|
3
|
+
export const getActiveGathersHandler = async () => {
|
|
4
|
+
const now = Date.now();
|
|
5
|
+
try {
|
|
6
|
+
const gathers = await httpClient.fetchURL({
|
|
7
|
+
path: '/v2/gathers',
|
|
8
|
+
});
|
|
9
|
+
return jsonToolResponse({
|
|
10
|
+
gathers: gathers
|
|
11
|
+
.filter((gather) => {
|
|
12
|
+
const date = gather.confirmedStartDateTime == null
|
|
13
|
+
? gather.adjustmentEndDateTime
|
|
14
|
+
: gather.confirmedStartDateTime;
|
|
15
|
+
return typeof date === 'string' && Date.parse(date) >= now;
|
|
16
|
+
})
|
|
17
|
+
.map((gather) => ({
|
|
18
|
+
gatherUUID: gather.gatherUUID,
|
|
19
|
+
title: gather.title,
|
|
20
|
+
mode: gather.mode,
|
|
21
|
+
adjustmentStartDateTime: gather.adjustmentStartDateTime,
|
|
22
|
+
adjustmentEndDateTime: gather.adjustmentEndDateTime,
|
|
23
|
+
confirmedStartDateTime: gather.confirmedStartDateTime,
|
|
24
|
+
confirmedEndDateTime: gather.confirmedEndDateTime,
|
|
25
|
+
numberOfParticipants: gather.numberOfParticipants,
|
|
26
|
+
minNumberOfParticipants: gather.minNumberOfParticipants,
|
|
27
|
+
relationshipType: gather.relationshipType,
|
|
28
|
+
})),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return errorToolResponse('Error retrieving active gathers');
|
|
33
|
+
}
|
|
34
|
+
};
|
package/build/mcpServer.js
CHANGED
|
@@ -3,6 +3,8 @@ import { z } from 'zod';
|
|
|
3
3
|
import { z as legacyZod } from 'zod/v3';
|
|
4
4
|
import { completeActivityLogHandler } from './handlers/tool/completeActivityLogHandler.js';
|
|
5
5
|
import { createTaskHandler } from './handlers/tool/createTaskHandler.js';
|
|
6
|
+
import { deleteTaskHandler } from './handlers/tool/deleteTaskHandler.js';
|
|
7
|
+
import { getActiveGathersHandler } from './handlers/tool/getActiveGathersHandler.js';
|
|
6
8
|
import { getActivityItemListHandler } from './handlers/tool/getActivityItemListHandler.js';
|
|
7
9
|
import { getActivityLogListHandler } from './handlers/tool/getActivityLogListHandler.js';
|
|
8
10
|
import { getCalendarDateMemoHandler } from './handlers/tool/getCalendarDateMemoHandler.js';
|
|
@@ -161,6 +163,16 @@ export function createMcpServer(options = {}) {
|
|
|
161
163
|
}),
|
|
162
164
|
annotations: privateOverwriteToolAnnotations,
|
|
163
165
|
}, withUpstreamToken(updateTaskHandler, options.resolveUpstreamToken, options.requireUpstreamToken));
|
|
166
|
+
server.registerTool('delete-task', {
|
|
167
|
+
description: 'Permanently deletes a single task from the TODO feature. Use only when the user requests deletion or removal. Specify the todoUUID obtained from get-tasks-list; clarify the target if ambiguous. To complete a task, use update-task with status DONE. To find completed tasks, call get-tasks-list with completionStatus COMPLETED. Repeated deletion succeeds when no task owned by the caller matches; success does not confirm that a task previously existed.',
|
|
168
|
+
inputSchema: z.strictObject({
|
|
169
|
+
todoUUID: z.guid().describe('Task UUID obtained from get-tasks-list.'),
|
|
170
|
+
}),
|
|
171
|
+
annotations: {
|
|
172
|
+
...privateOverwriteToolAnnotations,
|
|
173
|
+
idempotentHint: true,
|
|
174
|
+
},
|
|
175
|
+
}, withUpstreamToken(deleteTaskHandler, options.resolveUpstreamToken, options.requireUpstreamToken));
|
|
164
176
|
server.registerTool('get-calendar-date-memo', {
|
|
165
177
|
description: 'Retrieves a calendar date memo for the specified date. Recognizes target date and memo content.',
|
|
166
178
|
inputSchema: z.object({
|
|
@@ -229,5 +241,10 @@ export function createMcpServer(options = {}) {
|
|
|
229
241
|
inputSchema: z.object({}),
|
|
230
242
|
annotations: readOnlyToolAnnotations,
|
|
231
243
|
}, withUpstreamToken(getJapanCurrentTimeHandler, options.resolveUpstreamToken, options.requireUpstreamToken));
|
|
244
|
+
server.registerTool('get-active-gathers', {
|
|
245
|
+
description: 'Retrieves active scheduling polls created or previously viewed by the authenticated user. Unconfirmed polls remain active until the adjustment end time; confirmed events and recruitments remain active until their start time, inclusive. Events that have already started are excluded.',
|
|
246
|
+
inputSchema: z.strictObject({}),
|
|
247
|
+
annotations: readOnlyToolAnnotations,
|
|
248
|
+
}, withUpstreamToken(getActiveGathersHandler, options.resolveUpstreamToken, options.requireUpstreamToken));
|
|
232
249
|
return server;
|
|
233
250
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "togello-mcp-server",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.45",
|
|
5
5
|
"description": "MCP server for Togello tasks, calendar memos, calendar events, and activity logs.",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -30,23 +30,25 @@
|
|
|
30
30
|
"url": "https://github.com/Toru-Takagi/togello-mcp-server/issues"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
|
-
"node": ">=22"
|
|
33
|
+
"node": ">=24.22.1"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@modelcontextprotocol/node": "^2.1.
|
|
37
|
-
"@modelcontextprotocol/server": "^2.
|
|
38
|
-
"@modelcontextprotocol/server-legacy": "^2.
|
|
39
|
-
"zod": "^4.6.
|
|
36
|
+
"@modelcontextprotocol/node": "^2.1.2",
|
|
37
|
+
"@modelcontextprotocol/server": "^2.4.0",
|
|
38
|
+
"@modelcontextprotocol/server-legacy": "^2.4.0",
|
|
39
|
+
"zod": "^4.6.7"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@modelcontextprotocol/client": "^2.
|
|
43
|
-
"@types/node": "^
|
|
44
|
-
"mcp-sdk-v1": "npm:@modelcontextprotocol/sdk@1.
|
|
45
|
-
"typescript": "^
|
|
42
|
+
"@modelcontextprotocol/client": "^2.4.0",
|
|
43
|
+
"@types/node": "^24.19.2",
|
|
44
|
+
"mcp-sdk-v1": "npm:@modelcontextprotocol/sdk@1.32.2",
|
|
45
|
+
"typescript": "^7.0.2"
|
|
46
46
|
},
|
|
47
47
|
"bin": {
|
|
48
48
|
"togello": "build/index.js",
|
|
49
49
|
"togello-mcp-server": "build/index.js"
|
|
50
50
|
},
|
|
51
|
-
"files": [
|
|
51
|
+
"files": [
|
|
52
|
+
"build"
|
|
53
|
+
]
|
|
52
54
|
}
|