togello-mcp-server 1.0.18 → 1.0.19
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { httpClient } from '../../client.js';
|
|
2
|
-
export const createTaskHandler = async ({ taskName, categoryUUID, scheduledStartDate, url, }) => {
|
|
2
|
+
export const createTaskHandler = async ({ taskName, categoryUUID, scheduledStartDate, scheduledEndDate, url, }) => {
|
|
3
3
|
try {
|
|
4
4
|
await httpClient.postJson({
|
|
5
5
|
path: '/v2/integration/todo',
|
|
@@ -7,6 +7,7 @@ export const createTaskHandler = async ({ taskName, categoryUUID, scheduledStart
|
|
|
7
7
|
label: taskName,
|
|
8
8
|
categoryUUID: categoryUUID,
|
|
9
9
|
scheduledStartDate: scheduledStartDate,
|
|
10
|
+
scheduledEndDate: scheduledEndDate,
|
|
10
11
|
url: url,
|
|
11
12
|
},
|
|
12
13
|
});
|
|
@@ -4,6 +4,10 @@ export const getTodayCalendarHandler = async () => {
|
|
|
4
4
|
const googleEvents = await httpClient.fetchURL({
|
|
5
5
|
path: '/v2/integration/google-calendar/event',
|
|
6
6
|
});
|
|
7
|
+
const tasks = await httpClient.fetchURL({
|
|
8
|
+
path: '/v2/integration/todo',
|
|
9
|
+
});
|
|
10
|
+
const filteredTasks = tasks.filter((task) => task.scheduledStartDate != null);
|
|
7
11
|
return {
|
|
8
12
|
content: [
|
|
9
13
|
{
|
|
@@ -21,6 +25,20 @@ export const getTodayCalendarHandler = async () => {
|
|
|
21
25
|
])
|
|
22
26
|
.join(','),
|
|
23
27
|
},
|
|
28
|
+
{
|
|
29
|
+
type: 'text',
|
|
30
|
+
text: 'en: The following is a task. The following is the order:[task name, scheduled start date, scheduled end date]',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: 'text',
|
|
34
|
+
text: filteredTasks
|
|
35
|
+
.map((task) => [
|
|
36
|
+
task.label,
|
|
37
|
+
task.scheduledStartDate,
|
|
38
|
+
task.scheduledEndDate,
|
|
39
|
+
])
|
|
40
|
+
.join(','),
|
|
41
|
+
},
|
|
24
42
|
],
|
|
25
43
|
};
|
|
26
44
|
}
|
package/build/index.js
CHANGED
|
@@ -43,6 +43,10 @@ async function main() {
|
|
|
43
43
|
.string()
|
|
44
44
|
.optional()
|
|
45
45
|
.describe('Scheduled start date in ISO format.'),
|
|
46
|
+
scheduledEndDate: z
|
|
47
|
+
.string()
|
|
48
|
+
.optional()
|
|
49
|
+
.describe('Scheduled end date in ISO format.'),
|
|
46
50
|
url: z
|
|
47
51
|
.string()
|
|
48
52
|
.optional()
|
|
@@ -54,19 +58,19 @@ async function main() {
|
|
|
54
58
|
.describe('Task UUID. Please specify the task uuid (todo uuid) obtained from get-tasks-list. You cannot use this tool without specifying it.'),
|
|
55
59
|
isCompleted: z
|
|
56
60
|
.boolean()
|
|
57
|
-
.describe('You can update the completion status of the task. If true, it is completed.
|
|
61
|
+
.describe('You can update the completion status of the task. If true, it is completed.'),
|
|
58
62
|
scheduledStartDate: z
|
|
59
63
|
.string()
|
|
60
64
|
.optional()
|
|
61
|
-
.describe('Scheduled start date in ISO format.'),
|
|
65
|
+
.describe('Scheduled start date in ISO format.If the user does not specify, the information obtained from get-tasks-list is passed.'),
|
|
62
66
|
scheduledEndDate: z
|
|
63
67
|
.string()
|
|
64
68
|
.optional()
|
|
65
|
-
.describe('Scheduled end date in ISO format.'),
|
|
69
|
+
.describe('Scheduled end date in ISO format.If the user does not specify, the information obtained from get-tasks-list is passed.'),
|
|
66
70
|
url: z
|
|
67
71
|
.string()
|
|
68
72
|
.optional()
|
|
69
|
-
.describe('Optional URL associated with the task.'),
|
|
73
|
+
.describe('Optional URL associated with the task.If the user does not specify, the information obtained from get-tasks-list is passed.'),
|
|
70
74
|
}, updateTaskHandler);
|
|
71
75
|
server.tool('get-todo-category-list', 'Retrieves the list of categories from the TODO feature. Recognizes category name / category UUID', {}, getTodoCategoryListHandler);
|
|
72
76
|
server.tool('get-today-calendar', 'Retrieves scheduled events for yesterday/today/tomorrow from the linked Google Calendar. Recognizes event name / start date and time / end date and time. ', {}, getTodayCalendarHandler);
|