togello-mcp-server 1.0.4 → 1.0.5
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 +1 -0
- package/build/handlers/tool/getTodoCategoryListHandler.js +34 -0
- package/build/index.js +14 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,6 +29,7 @@ This server implements the Model Context Protocol (MCP) for managing context in
|
|
|
29
29
|
|
|
30
30
|
- get-tasks-list: TODO機能で未完了のタスクを取得します。タスク名 / 予定開始日時 / 予定終了日時 / 優先度 / カテゴリ を認識できます。
|
|
31
31
|
- create-task: TODO機能で新しいタスクを作成します。タスク名を指定する必要があります。
|
|
32
|
+
- get-todo-category-list: TODO機能からカテゴリーリストを取得します。カテゴリー名 / カテゴリーUUID を認識できます。
|
|
32
33
|
- get-today-calendar: 連携しているGoogleカレンダーの昨日/今日/明日の予定を取得します。予定名 / 開始日時 / 終了日時 を認識できます。
|
|
33
34
|
|
|
34
35
|
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { httpClient } from "../../client.js";
|
|
2
|
+
export const getTodoCategoryListHandler = async ({}) => {
|
|
3
|
+
try {
|
|
4
|
+
const categoryList = await httpClient.fetchURL({
|
|
5
|
+
path: "/v2/integration/categories",
|
|
6
|
+
});
|
|
7
|
+
return {
|
|
8
|
+
content: [
|
|
9
|
+
{
|
|
10
|
+
type: "text",
|
|
11
|
+
text: `The following is a single category represented in the order:
|
|
12
|
+
[category uuid, label of category]`,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
type: "text",
|
|
16
|
+
text: categoryList
|
|
17
|
+
.map((category) => [category.categoryUUID, category.label])
|
|
18
|
+
.join(","),
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error("Error in tool handler:", error);
|
|
25
|
+
return {
|
|
26
|
+
content: [
|
|
27
|
+
{
|
|
28
|
+
type: "text",
|
|
29
|
+
text: `Error in tool handler: ${error}`,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
};
|
package/build/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { z } from "zod";
|
|
|
5
5
|
import { categoryListHandler } from "./handlers/resource/categoryListHandler.js";
|
|
6
6
|
import { createTaskHandler } from "./handlers/tool/createTaskHandler.js";
|
|
7
7
|
import { getTodayCalendarHandler } from "./handlers/tool/getTodayCalendarHandler.js";
|
|
8
|
+
import { getTodoCategoryListHandler } from "./handlers/tool/getTodoCategoryListHandler.js";
|
|
8
9
|
import { getTodoListHandler } from "./handlers/tool/getTodoListHandler.js";
|
|
9
10
|
const server = new McpServer({
|
|
10
11
|
name: "togello",
|
|
@@ -17,10 +18,21 @@ const server = new McpServer({
|
|
|
17
18
|
async function main() {
|
|
18
19
|
const transport = new StdioServerTransport();
|
|
19
20
|
// server.resource("togello-todos", "togello://tasks", tasksHandler);
|
|
20
|
-
server.resource(
|
|
21
|
+
// server.resource(
|
|
22
|
+
// "category-list",
|
|
23
|
+
// "togello://category-list",
|
|
24
|
+
// categoryListHandler
|
|
25
|
+
// );
|
|
21
26
|
server.resource("activity-item-list", "togello://activity-item-list", categoryListHandler);
|
|
22
27
|
server.tool("get-tasks-list", "Retrieves incomplete tasks from the TODO feature. Recognizes task name / scheduled start date and time / scheduled end date and time / priority / category", {}, getTodoListHandler);
|
|
23
|
-
server.tool("create-task", "Creates a new task in the TODO feature.", {
|
|
28
|
+
server.tool("create-task", "Creates a new task in the TODO feature.", {
|
|
29
|
+
taskName: z.string().describe("create task name"),
|
|
30
|
+
categoryUUID: z
|
|
31
|
+
.string()
|
|
32
|
+
.optional()
|
|
33
|
+
.describe("category UUID. category UUID of get-todo-category-list"),
|
|
34
|
+
}, createTaskHandler);
|
|
35
|
+
server.tool("get-todo-category-list", "Retrieves the list of categories from the TODO feature. Recognizes category name / category UUID", {}, getTodoCategoryListHandler);
|
|
24
36
|
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);
|
|
25
37
|
await server.connect(transport);
|
|
26
38
|
}
|