togello-mcp-server 1.0.15 → 1.0.17
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.
|
@@ -14,7 +14,11 @@ export const getTodayCalendarHandler = async () => {
|
|
|
14
14
|
{
|
|
15
15
|
type: 'text',
|
|
16
16
|
text: googleEvents.items
|
|
17
|
-
.map((event) => [
|
|
17
|
+
.map((event) => [
|
|
18
|
+
event.summary,
|
|
19
|
+
formatEventTime(event.start),
|
|
20
|
+
formatEventTime(event.end),
|
|
21
|
+
])
|
|
18
22
|
.join(','),
|
|
19
23
|
},
|
|
20
24
|
],
|
|
@@ -32,3 +36,25 @@ export const getTodayCalendarHandler = async () => {
|
|
|
32
36
|
};
|
|
33
37
|
}
|
|
34
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* EventDateTime型から表示用の日時文字列を取得する
|
|
41
|
+
*/
|
|
42
|
+
const formatEventTime = (dateTime) => {
|
|
43
|
+
// 全日イベントの場合はdate、そうでない場合はdateTimeを使用
|
|
44
|
+
if (dateTime.date) {
|
|
45
|
+
return dateTime.date; // yyyy-mm-dd形式
|
|
46
|
+
}
|
|
47
|
+
if (dateTime.dateTime) {
|
|
48
|
+
// RFC3339形式の日時をより読みやすい形式に変換
|
|
49
|
+
const dt = new Date(dateTime.dateTime);
|
|
50
|
+
return dt.toLocaleString('ja-JP', {
|
|
51
|
+
year: 'numeric',
|
|
52
|
+
month: '2-digit',
|
|
53
|
+
day: '2-digit',
|
|
54
|
+
hour: '2-digit',
|
|
55
|
+
minute: '2-digit',
|
|
56
|
+
timeZone: dateTime.timeZone,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return '不明な日時';
|
|
60
|
+
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { httpClient } from '../../client.js';
|
|
2
|
-
export const updateTaskHandler = async ({ todoUUID, isCompleted, scheduledStartDate, url, }) => {
|
|
2
|
+
export const updateTaskHandler = async ({ todoUUID, isCompleted, scheduledStartDate, scheduledEndDate, url, }) => {
|
|
3
3
|
try {
|
|
4
4
|
await httpClient.putJson({
|
|
5
5
|
path: `/v2/integration/todo/${todoUUID}`,
|
|
6
6
|
body: {
|
|
7
7
|
isCompleted,
|
|
8
8
|
scheduledStartDate,
|
|
9
|
+
scheduledEndDate,
|
|
9
10
|
url,
|
|
10
11
|
},
|
|
11
12
|
});
|
package/build/index.js
CHANGED
|
@@ -59,6 +59,10 @@ async function main() {
|
|
|
59
59
|
.string()
|
|
60
60
|
.optional()
|
|
61
61
|
.describe('Scheduled start date in ISO format.'),
|
|
62
|
+
scheduledEndDate: z
|
|
63
|
+
.string()
|
|
64
|
+
.optional()
|
|
65
|
+
.describe('Scheduled end date in ISO format.'),
|
|
62
66
|
url: z
|
|
63
67
|
.string()
|
|
64
68
|
.optional()
|
|
@@ -68,12 +72,16 @@ async function main() {
|
|
|
68
72
|
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);
|
|
69
73
|
server.tool('get-activity-item-list', 'Retrieves the list of activity items from the integration feature. Recognizes activity item UUID / item name', {}, getActivityItemListHandler);
|
|
70
74
|
server.tool('get-activity-log-list', 'Retrieves the list of activity logs from the integration feature. Since it is a record of what the person has done, if all the end dates are filled in, this person is not doing anything now. If there is one with a null end date, there should be at most one, and if there is one, it means that the person is doing it now. Recognizes activity log UUID / start date and time / end date and time / item name.', {}, getActivityLogListHandler);
|
|
71
|
-
server.tool('start-activity-log',
|
|
75
|
+
server.tool('start-activity-log',
|
|
76
|
+
// 'Starts an activity log. If all the endDateTime of get-activity-log-list have values, it means that nothing is being done, so start-activity-log can be called.',
|
|
77
|
+
'Starts an activity log.', {
|
|
72
78
|
activityItemName: z
|
|
73
79
|
.string()
|
|
74
80
|
.describe('Activity log name. Please specify the itemName obtained from get-activity-item-list. You cannot specify a value that is not in itemName, so this tool cannot be used.'),
|
|
75
81
|
}, startActivityLogHandler);
|
|
76
|
-
server.tool('complete-activity-log',
|
|
82
|
+
server.tool('complete-activity-log',
|
|
83
|
+
// 'Completes an activity log. If all the endDateTime of get-activity-log-list have values, it means that nothing is being done, so start-activity-log can be called.',
|
|
84
|
+
'Completes an activity log.', {
|
|
77
85
|
activityLogUUID: z
|
|
78
86
|
.string()
|
|
79
87
|
.describe('Activity log UUID. Please specify the activityLogUUID obtained from get-activity-log-list. You cannot specify a value that is not in activityLogUUID, so this tool cannot be used.'),
|
|
@@ -84,3 +92,5 @@ main().catch((error) => {
|
|
|
84
92
|
console.error('Fatal error in main():', error);
|
|
85
93
|
process.exit(1);
|
|
86
94
|
});
|
|
95
|
+
// en: 'Starts an activity log. If all the endDateTime of get-activity-log-list have values, it means that nothing is being done, so start-activity-log can be called.',
|
|
96
|
+
// ja: 'アクティビティログを開始します。get-activity-log-listのendDateTimeがすべて値を持っている場合、何もしていないことを意味します。そのため、start-activity-logを呼び出すことができます。'
|