paput-mcp 1.0.0 → 1.1.0
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 +26 -31
- package/dist/handlers/create-idea/handler.js +64 -0
- package/dist/handlers/create-idea/handler.js.map +1 -0
- package/dist/handlers/create-idea/index.js +3 -0
- package/dist/handlers/create-idea/index.js.map +1 -0
- package/dist/handlers/create-idea/tool.js +23 -0
- package/dist/handlers/create-idea/tool.js.map +1 -0
- package/dist/handlers/create-memo/handler.js +72 -0
- package/dist/handlers/create-memo/handler.js.map +1 -0
- package/dist/handlers/create-memo/index.js +3 -0
- package/dist/handlers/create-memo/index.js.map +1 -0
- package/dist/handlers/create-memo/tool.js +35 -0
- package/dist/handlers/create-memo/tool.js.map +1 -0
- package/dist/handlers/create-memo-tool.js +35 -0
- package/dist/handlers/create-memo-tool.js.map +1 -0
- package/dist/handlers/create-memo.js +5 -3
- package/dist/handlers/create-memo.js.map +1 -1
- package/dist/handlers/create-note/handler.js +71 -0
- package/dist/handlers/create-note/handler.js.map +1 -0
- package/dist/handlers/create-note/index.js +3 -0
- package/dist/handlers/create-note/index.js.map +1 -0
- package/dist/handlers/create-note/tool.js +31 -0
- package/dist/handlers/create-note/tool.js.map +1 -0
- package/dist/handlers/create-skill-sheet/handler.js +72 -0
- package/dist/handlers/create-skill-sheet/handler.js.map +1 -0
- package/dist/handlers/create-skill-sheet/index.js +3 -0
- package/dist/handlers/create-skill-sheet/index.js.map +1 -0
- package/dist/handlers/create-skill-sheet/tool.js +120 -0
- package/dist/handlers/create-skill-sheet/tool.js.map +1 -0
- package/dist/handlers/delete-idea/handler.js +63 -0
- package/dist/handlers/delete-idea/handler.js.map +1 -0
- package/dist/handlers/delete-idea/index.js +3 -0
- package/dist/handlers/delete-idea/index.js.map +1 -0
- package/dist/handlers/delete-idea/tool.js +19 -0
- package/dist/handlers/delete-idea/tool.js.map +1 -0
- package/dist/handlers/delete-memo/handler.js +51 -0
- package/dist/handlers/delete-memo/handler.js.map +1 -0
- package/dist/handlers/delete-memo/index.js +3 -0
- package/dist/handlers/delete-memo/index.js.map +1 -0
- package/dist/handlers/delete-memo/tool.js +19 -0
- package/dist/handlers/delete-memo/tool.js.map +1 -0
- package/dist/handlers/delete-note/handler.js +63 -0
- package/dist/handlers/delete-note/handler.js.map +1 -0
- package/dist/handlers/delete-note/index.js +3 -0
- package/dist/handlers/delete-note/index.js.map +1 -0
- package/dist/handlers/delete-note/tool.js +19 -0
- package/dist/handlers/delete-note/tool.js.map +1 -0
- package/dist/handlers/get-categories/handler.js +39 -0
- package/dist/handlers/get-categories/handler.js.map +1 -0
- package/dist/handlers/get-categories/index.js +3 -0
- package/dist/handlers/get-categories/index.js.map +1 -0
- package/dist/handlers/get-categories/tool.js +13 -0
- package/dist/handlers/get-categories/tool.js.map +1 -0
- package/dist/handlers/get-memo/handler.js +57 -0
- package/dist/handlers/get-memo/handler.js.map +1 -0
- package/dist/handlers/get-memo/index.js +3 -0
- package/dist/handlers/get-memo/index.js.map +1 -0
- package/dist/handlers/get-memo/tool.js +19 -0
- package/dist/handlers/get-memo/tool.js.map +1 -0
- package/dist/handlers/get-note/handler.js +69 -0
- package/dist/handlers/get-note/handler.js.map +1 -0
- package/dist/handlers/get-note/index.js +3 -0
- package/dist/handlers/get-note/index.js.map +1 -0
- package/dist/handlers/get-note/tool.js +19 -0
- package/dist/handlers/get-note/tool.js.map +1 -0
- package/dist/handlers/get-skill-sheet/handler.js +80 -0
- package/dist/handlers/get-skill-sheet/handler.js.map +1 -0
- package/dist/handlers/get-skill-sheet/index.js +3 -0
- package/dist/handlers/get-skill-sheet/index.js.map +1 -0
- package/dist/handlers/get-skill-sheet/tool.js +13 -0
- package/dist/handlers/get-skill-sheet/tool.js.map +1 -0
- package/dist/handlers/index.js +15 -1
- package/dist/handlers/index.js.map +1 -1
- package/dist/handlers/list-ideas/handler.js +51 -0
- package/dist/handlers/list-ideas/handler.js.map +1 -0
- package/dist/handlers/list-ideas/index.js +3 -0
- package/dist/handlers/list-ideas/index.js.map +1 -0
- package/dist/handlers/list-ideas/tool.js +13 -0
- package/dist/handlers/list-ideas/tool.js.map +1 -0
- package/dist/handlers/search-memo/handler.js +80 -0
- package/dist/handlers/search-memo/handler.js.map +1 -0
- package/dist/handlers/search-memo/index.js +3 -0
- package/dist/handlers/search-memo/index.js.map +1 -0
- package/dist/handlers/search-memo/tool.js +41 -0
- package/dist/handlers/search-memo/tool.js.map +1 -0
- package/dist/handlers/search-memo-tool.js +41 -0
- package/dist/handlers/search-memo-tool.js.map +1 -0
- package/dist/handlers/search-memo.js +80 -0
- package/dist/handlers/search-memo.js.map +1 -0
- package/dist/handlers/search-notes/handler.js +73 -0
- package/dist/handlers/search-notes/handler.js.map +1 -0
- package/dist/handlers/search-notes/index.js +3 -0
- package/dist/handlers/search-notes/index.js.map +1 -0
- package/dist/handlers/search-notes/tool.js +33 -0
- package/dist/handlers/search-notes/tool.js.map +1 -0
- package/dist/handlers/update-memo/handler.js +83 -0
- package/dist/handlers/update-memo/handler.js.map +1 -0
- package/dist/handlers/update-memo/index.js +3 -0
- package/dist/handlers/update-memo/index.js.map +1 -0
- package/dist/handlers/update-memo/tool.js +49 -0
- package/dist/handlers/update-memo/tool.js.map +1 -0
- package/dist/handlers/update-note/handler.js +97 -0
- package/dist/handlers/update-note/handler.js.map +1 -0
- package/dist/handlers/update-note/index.js +3 -0
- package/dist/handlers/update-note/index.js.map +1 -0
- package/dist/handlers/update-note/tool.js +34 -0
- package/dist/handlers/update-note/tool.js.map +1 -0
- package/dist/handlers/update-skill-sheet/handler.js +115 -0
- package/dist/handlers/update-skill-sheet/handler.js.map +1 -0
- package/dist/handlers/update-skill-sheet/index.js +3 -0
- package/dist/handlers/update-skill-sheet/index.js.map +1 -0
- package/dist/handlers/update-skill-sheet/tool.js +119 -0
- package/dist/handlers/update-skill-sheet/tool.js.map +1 -0
- package/dist/server.js +1 -0
- package/dist/server.js.map +1 -1
- package/dist/services/api-service.js +453 -4
- package/dist/services/api-service.js.map +1 -1
- package/dist/tool.js +69 -45
- package/dist/tool.js.map +1 -1
- package/dist/types/categories.js +2 -0
- package/dist/types/categories.js.map +1 -0
- package/dist/types/constants.js +26 -0
- package/dist/types/constants.js.map +1 -0
- package/dist/types/delete-memo.js +2 -0
- package/dist/types/delete-memo.js.map +1 -0
- package/dist/types/get-memo.js +2 -0
- package/dist/types/get-memo.js.map +1 -0
- package/dist/types/idea.js +2 -0
- package/dist/types/idea.js.map +1 -0
- package/dist/types/index.js +10 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/note.js +2 -0
- package/dist/types/note.js.map +1 -0
- package/dist/types/search-memo.js +2 -0
- package/dist/types/search-memo.js.map +1 -0
- package/dist/types/skill-sheet.js +2 -0
- package/dist/types/skill-sheet.js.map +1 -0
- package/dist/types/tool.js +2 -0
- package/dist/types/tool.js.map +1 -0
- package/dist/types/update-memo.js +2 -0
- package/dist/types/update-memo.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { handleCreateSkillSheet } from './handler.js';
|
|
2
|
+
export const createSkillSheetTool = {
|
|
3
|
+
definition: {
|
|
4
|
+
name: 'paput_create_skill_sheet',
|
|
5
|
+
description: 'PaPut にスキルシートを作成します。既にスキルシートが存在する場合は更新ツール(paput_update_skill_sheet)を使用してください。',
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: 'object',
|
|
8
|
+
properties: {
|
|
9
|
+
nearest_station: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
description: '最寄り駅(オプション)',
|
|
12
|
+
},
|
|
13
|
+
gender: {
|
|
14
|
+
type: 'number',
|
|
15
|
+
description: '性別(1: 男性, 2: 女性)',
|
|
16
|
+
},
|
|
17
|
+
birth_date: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
description: '生年月日(YYYY-MM-DD形式)',
|
|
20
|
+
},
|
|
21
|
+
years_of_experience: {
|
|
22
|
+
type: 'number',
|
|
23
|
+
description: '経験年数',
|
|
24
|
+
},
|
|
25
|
+
self_pr: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: '自己PR(オプション)',
|
|
28
|
+
},
|
|
29
|
+
skills: {
|
|
30
|
+
type: 'array',
|
|
31
|
+
description: 'スキルリスト(オプション)',
|
|
32
|
+
items: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
category: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: {
|
|
38
|
+
id: { type: 'number' },
|
|
39
|
+
name: { type: 'string' },
|
|
40
|
+
},
|
|
41
|
+
required: ['id', 'name'],
|
|
42
|
+
},
|
|
43
|
+
category_type: {
|
|
44
|
+
type: 'number',
|
|
45
|
+
description: 'カテゴリタイプ(1: 言語, 2: フレームワーク, 3: データベース, 4: インフラ)',
|
|
46
|
+
},
|
|
47
|
+
level: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'スキルレベル(A, B, C, D, E)',
|
|
50
|
+
},
|
|
51
|
+
years: {
|
|
52
|
+
type: 'number',
|
|
53
|
+
description: '経験年数',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
required: ['category', 'category_type', 'level', 'years'],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
projects: {
|
|
60
|
+
type: 'array',
|
|
61
|
+
description: 'プロジェクトリスト(オプション)',
|
|
62
|
+
items: {
|
|
63
|
+
type: 'object',
|
|
64
|
+
properties: {
|
|
65
|
+
id: { type: 'number' },
|
|
66
|
+
type: { type: 'number', description: 'プロジェクトタイプ(1: 業務, 2: 個人)' },
|
|
67
|
+
title: { type: 'string' },
|
|
68
|
+
start_period: { type: 'string' },
|
|
69
|
+
end_period: { type: ['string', 'null'] },
|
|
70
|
+
description: { type: 'string' },
|
|
71
|
+
role: { type: 'string' },
|
|
72
|
+
scale: { type: 'string' },
|
|
73
|
+
technologies: {
|
|
74
|
+
type: 'array',
|
|
75
|
+
items: {
|
|
76
|
+
type: 'object',
|
|
77
|
+
properties: {
|
|
78
|
+
id: { type: 'number' },
|
|
79
|
+
name: { type: 'string' },
|
|
80
|
+
},
|
|
81
|
+
required: ['id', 'name'],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
processes: {
|
|
85
|
+
type: 'array',
|
|
86
|
+
items: { type: 'number' },
|
|
87
|
+
},
|
|
88
|
+
memos: {
|
|
89
|
+
type: 'array',
|
|
90
|
+
items: {
|
|
91
|
+
type: 'object',
|
|
92
|
+
properties: {
|
|
93
|
+
id: { type: 'number' },
|
|
94
|
+
title: { type: 'string' },
|
|
95
|
+
},
|
|
96
|
+
required: ['id', 'title'],
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
required: [
|
|
101
|
+
'id',
|
|
102
|
+
'type',
|
|
103
|
+
'title',
|
|
104
|
+
'start_period',
|
|
105
|
+
'description',
|
|
106
|
+
'role',
|
|
107
|
+
'scale',
|
|
108
|
+
'technologies',
|
|
109
|
+
'processes',
|
|
110
|
+
'memos',
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
required: ['gender', 'birth_date', 'years_of_experience'],
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
handler: handleCreateSkillSheet,
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/create-skill-sheet/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,UAAU,EAAE;QACV,IAAI,EAAE,0BAA0B;QAChC,WAAW,EAAE,+EAA+E;QAC5F,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,eAAe,EAAE;oBACf,IAAI,EAAE,QAAQ;oBACd,WAAW,EAA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BAAqB,CAAC;SAC1D;KACF;IACD,OAAO,EAAE,sBAAsB;CAChC,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export async function handleDeleteIdea(args, apiService) {
|
|
2
|
+
if (!args) {
|
|
3
|
+
return {
|
|
4
|
+
content: [
|
|
5
|
+
{
|
|
6
|
+
type: 'text',
|
|
7
|
+
text: 'パラメータが不足しています',
|
|
8
|
+
},
|
|
9
|
+
],
|
|
10
|
+
isError: true,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
// パラメータの検証
|
|
14
|
+
if (typeof args.id !== 'number') {
|
|
15
|
+
return {
|
|
16
|
+
content: [
|
|
17
|
+
{
|
|
18
|
+
type: 'text',
|
|
19
|
+
text: 'IDは数値で指定してください',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
isError: true,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
const params = {
|
|
26
|
+
id: args.id,
|
|
27
|
+
};
|
|
28
|
+
try {
|
|
29
|
+
const result = await apiService.deleteIdea(params);
|
|
30
|
+
if (!result.success) {
|
|
31
|
+
return {
|
|
32
|
+
content: [
|
|
33
|
+
{
|
|
34
|
+
type: 'text',
|
|
35
|
+
text: `アイデアの削除に失敗しました: ${result.error || '不明なエラー'}`,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
isError: true,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
content: [
|
|
43
|
+
{
|
|
44
|
+
type: 'text',
|
|
45
|
+
text: `アイデア (ID: ${params.id}) が正常に削除されました。`,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
const errorMessage = error instanceof Error ? error.message : '不明なエラー';
|
|
52
|
+
return {
|
|
53
|
+
content: [
|
|
54
|
+
{
|
|
55
|
+
type: 'text',
|
|
56
|
+
text: `アイデアの削除中にエラーが発生しました: ${errorMessage}`,
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
isError: true,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/handlers/delete-idea/handler.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,IAAyC,EACzC,UAAsB;IAEtB,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,eAAe;iBACtB;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,WAAW;IACX,IAAI,OAAO,IAAI,CAAC,EAAE,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,gBAAgB;iBACvB;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAqB;QAC/B,EAAE,EAAE,IAAI,CAAC,EAAE;KACZ,CAAC;IAEF,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAEnD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,mBAAmB,MAAM,CAAC,KAAK,IAAI,QAAQ,EAAE;qBACpD;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,aAAa,MAAM,CAAC,EAAE,gBAAgB;iBAC7C;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAChB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;QAEpD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,wBAAwB,YAAY,EAAE;iBAC7C;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/handlers/delete-idea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { handleDeleteIdea } from './handler.js';
|
|
2
|
+
export const deleteIdeaTool = {
|
|
3
|
+
definition: {
|
|
4
|
+
name: 'paput_delete_idea',
|
|
5
|
+
description: 'PaPut のアイデアを削除します',
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: 'object',
|
|
8
|
+
properties: {
|
|
9
|
+
id: {
|
|
10
|
+
type: 'number',
|
|
11
|
+
description: 'アイデアのID',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
required: ['id'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
handler: handleDeleteIdea,
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/delete-idea/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,UAAU,EAAE;QACV,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,mBAAmB;QAChC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE;oBACF,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,SAAS;iBACvB;aACF;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;KACF;IACD,OAAO,EAAE,gBAAgB;CAC1B,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export async function handleDeleteMemo(args, apiService) {
|
|
2
|
+
if (!args || typeof args.id !== 'number') {
|
|
3
|
+
return {
|
|
4
|
+
content: [
|
|
5
|
+
{
|
|
6
|
+
type: 'text',
|
|
7
|
+
text: 'メモIDが指定されていません。',
|
|
8
|
+
},
|
|
9
|
+
],
|
|
10
|
+
isError: true,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const params = {
|
|
14
|
+
id: args.id,
|
|
15
|
+
};
|
|
16
|
+
try {
|
|
17
|
+
const result = await apiService.deleteMemo(params);
|
|
18
|
+
if (!result.success) {
|
|
19
|
+
return {
|
|
20
|
+
content: [
|
|
21
|
+
{
|
|
22
|
+
type: 'text',
|
|
23
|
+
text: `メモの削除に失敗しました: ${result.error || '不明なエラー'}`,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
isError: true,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
content: [
|
|
31
|
+
{
|
|
32
|
+
type: 'text',
|
|
33
|
+
text: 'メモを削除しました。',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
const errorMessage = error instanceof Error ? error.message : '不明なエラー';
|
|
40
|
+
return {
|
|
41
|
+
content: [
|
|
42
|
+
{
|
|
43
|
+
type: 'text',
|
|
44
|
+
text: `メモの削除中にエラーが発生しました: ${errorMessage}`,
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
isError: true,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/handlers/delete-memo/handler.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,IAAyC,EACzC,UAAsB;IAEtB,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,CAAC,EAAE,KAAK,QAAQ,EAAE,CAAC;QACzC,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,iBAAiB;iBACxB;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAqB;QAC/B,EAAE,EAAE,IAAI,CAAC,EAAE;KACZ,CAAC;IAEF,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAEnD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,iBAAiB,MAAM,CAAC,KAAK,IAAI,QAAQ,EAAE;qBAClD;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,YAAY;iBACnB;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAChB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;QAEpD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,sBAAsB,YAAY,EAAE;iBAC3C;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/handlers/delete-memo/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { handleDeleteMemo } from './handler.js';
|
|
2
|
+
export const deleteMemoTool = {
|
|
3
|
+
definition: {
|
|
4
|
+
name: 'paput_delete_memo',
|
|
5
|
+
description: 'PaPut のメモを削除します',
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: 'object',
|
|
8
|
+
properties: {
|
|
9
|
+
id: {
|
|
10
|
+
type: 'number',
|
|
11
|
+
description: 'メモID',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
required: ['id'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
handler: handleDeleteMemo,
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/delete-memo/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,UAAU,EAAE;QACV,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,iBAAiB;QAC9B,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE;oBACF,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,MAAM;iBACpB;aACF;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;KACF;IACD,OAAO,EAAE,gBAAgB;CAC1B,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export async function handleDeleteNote(args, apiService) {
|
|
2
|
+
if (!args) {
|
|
3
|
+
return {
|
|
4
|
+
content: [
|
|
5
|
+
{
|
|
6
|
+
type: 'text',
|
|
7
|
+
text: 'パラメータが不足しています',
|
|
8
|
+
},
|
|
9
|
+
],
|
|
10
|
+
isError: true,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
// パラメータの検証
|
|
14
|
+
if (typeof args.id !== 'number') {
|
|
15
|
+
return {
|
|
16
|
+
content: [
|
|
17
|
+
{
|
|
18
|
+
type: 'text',
|
|
19
|
+
text: 'IDは数値で指定してください',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
isError: true,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
const params = {
|
|
26
|
+
id: args.id,
|
|
27
|
+
};
|
|
28
|
+
try {
|
|
29
|
+
const result = await apiService.deleteNote(params);
|
|
30
|
+
if (!result.success) {
|
|
31
|
+
return {
|
|
32
|
+
content: [
|
|
33
|
+
{
|
|
34
|
+
type: 'text',
|
|
35
|
+
text: `ノートの削除に失敗しました: ${result.error || '不明なエラー'}`,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
isError: true,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
content: [
|
|
43
|
+
{
|
|
44
|
+
type: 'text',
|
|
45
|
+
text: `ノート (ID: ${params.id}) が正常に削除されました。`,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
const errorMessage = error instanceof Error ? error.message : '不明なエラー';
|
|
52
|
+
return {
|
|
53
|
+
content: [
|
|
54
|
+
{
|
|
55
|
+
type: 'text',
|
|
56
|
+
text: `ノートの削除中にエラーが発生しました: ${errorMessage}`,
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
isError: true,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/handlers/delete-note/handler.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,IAAyC,EACzC,UAAsB;IAEtB,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,eAAe;iBACtB;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,WAAW;IACX,IAAI,OAAO,IAAI,CAAC,EAAE,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,gBAAgB;iBACvB;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAqB;QAC/B,EAAE,EAAE,IAAI,CAAC,EAAE;KACZ,CAAC;IAEF,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAEnD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,kBAAkB,MAAM,CAAC,KAAK,IAAI,QAAQ,EAAE;qBACnD;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,YAAY,MAAM,CAAC,EAAE,gBAAgB;iBAC5C;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAChB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;QAEpD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,uBAAuB,YAAY,EAAE;iBAC5C;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/handlers/delete-note/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { handleDeleteNote } from './handler.js';
|
|
2
|
+
export const deleteNoteTool = {
|
|
3
|
+
definition: {
|
|
4
|
+
name: 'paput_delete_note',
|
|
5
|
+
description: 'PaPut のノートを削除します',
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: 'object',
|
|
8
|
+
properties: {
|
|
9
|
+
id: {
|
|
10
|
+
type: 'number',
|
|
11
|
+
description: 'ノートのID',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
required: ['id'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
handler: handleDeleteNote,
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/delete-note/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,UAAU,EAAE;QACV,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,kBAAkB;QAC/B,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE;oBACF,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,QAAQ;iBACtB;aACF;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;KACF;IACD,OAAO,EAAE,gBAAgB;CAC1B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export async function handleGetCategories(args, apiService) {
|
|
2
|
+
try {
|
|
3
|
+
const categories = await apiService.getCategories();
|
|
4
|
+
if (categories.length === 0) {
|
|
5
|
+
return {
|
|
6
|
+
content: [
|
|
7
|
+
{
|
|
8
|
+
type: 'text',
|
|
9
|
+
text: 'カテゴリーが登録されていません。',
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
const categoryList = categories
|
|
15
|
+
.map((category) => `• ${category.name} (ID: ${category.id})`)
|
|
16
|
+
.join('\n');
|
|
17
|
+
return {
|
|
18
|
+
content: [
|
|
19
|
+
{
|
|
20
|
+
type: 'text',
|
|
21
|
+
text: `利用可能なカテゴリー:\n\n${categoryList}`,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
const errorMessage = error instanceof Error ? error.message : '不明なエラー';
|
|
28
|
+
return {
|
|
29
|
+
content: [
|
|
30
|
+
{
|
|
31
|
+
type: 'text',
|
|
32
|
+
text: `カテゴリーの取得中にエラーが発生しました: ${errorMessage}`,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
isError: true,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/handlers/get-categories/handler.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,IAAyC,EACzC,UAAsB;IAEtB,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,UAAU,CAAC,aAAa,EAAE,CAAC;QAEpD,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,kBAAkB;qBACzB;iBACF;aACF,CAAC;QACJ,CAAC;QAED,MAAM,YAAY,GAAG,UAAU;aAC5B,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,KAAK,QAAQ,CAAC,IAAI,SAAS,QAAQ,CAAC,EAAE,GAAG,CAAC;aAC5D,IAAI,CAAC,IAAI,CAAC,CAAC;QAEd,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,kBAAkB,YAAY,EAAE;iBACvC;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAChB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;QAEpD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,yBAAyB,YAAY,EAAE;iBAC9C;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/handlers/get-categories/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { handleGetCategories } from './handler.js';
|
|
2
|
+
export const getCategoriesTool = {
|
|
3
|
+
definition: {
|
|
4
|
+
name: 'paput_get_categories',
|
|
5
|
+
description: 'PaPut のカテゴリー一覧を取得します',
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: 'object',
|
|
8
|
+
properties: {},
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
handler: handleGetCategories,
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/get-categories/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,CAAC,MAAM,iBAAiB,GAAgB;IAC5C,UAAU,EAAE;QACV,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,sBAAsB;QACnC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD,OAAO,EAAE,mBAAmB;CAC7B,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export async function handleGetMemo(args, apiService) {
|
|
2
|
+
if (!args || typeof args.id !== 'number') {
|
|
3
|
+
return {
|
|
4
|
+
content: [
|
|
5
|
+
{
|
|
6
|
+
type: 'text',
|
|
7
|
+
text: 'メモIDが指定されていません。',
|
|
8
|
+
},
|
|
9
|
+
],
|
|
10
|
+
isError: true,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const params = {
|
|
14
|
+
id: args.id,
|
|
15
|
+
};
|
|
16
|
+
try {
|
|
17
|
+
const result = await apiService.getMemo(params);
|
|
18
|
+
const categories = result.categories.length > 0
|
|
19
|
+
? `カテゴリ: ${result.categories.map((c) => c.name).join(', ')}`
|
|
20
|
+
: '';
|
|
21
|
+
const visibility = result.is_public ? '公開' : '非公開';
|
|
22
|
+
const likeInfo = `いいね: ${result.like_count}${result.has_liked ? ' (いいね済み)' : ''}`;
|
|
23
|
+
const bookmarkInfo = `ブックマーク: ${result.bookmark_count}${result.has_bookmarked ? ' (ブックマーク済み)' : ''}`;
|
|
24
|
+
const memoDetail = `【${result.title}】(${visibility})
|
|
25
|
+
${categories}
|
|
26
|
+
|
|
27
|
+
${result.body}
|
|
28
|
+
|
|
29
|
+
${likeInfo}
|
|
30
|
+
${bookmarkInfo}
|
|
31
|
+
|
|
32
|
+
作成日: ${result.created_at}
|
|
33
|
+
更新日: ${result.updated_at}
|
|
34
|
+
作成者: ${result.user.name} (@${result.user.user_id})`;
|
|
35
|
+
return {
|
|
36
|
+
content: [
|
|
37
|
+
{
|
|
38
|
+
type: 'text',
|
|
39
|
+
text: memoDetail,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
const errorMessage = error instanceof Error ? error.message : '不明なエラー';
|
|
46
|
+
return {
|
|
47
|
+
content: [
|
|
48
|
+
{
|
|
49
|
+
type: 'text',
|
|
50
|
+
text: `メモの取得中にエラーが発生しました: ${errorMessage}`,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
isError: true,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/handlers/get-memo/handler.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,IAAyC,EACzC,UAAsB;IAEtB,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,CAAC,EAAE,KAAK,QAAQ,EAAE,CAAC;QACzC,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,iBAAiB;iBACxB;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAkB;QAC5B,EAAE,EAAE,IAAI,CAAC,EAAE;KACZ,CAAC;IAEF,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAEhD,MAAM,UAAU,GACd,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;YAC1B,CAAC,CAAC,SAAS,MAAM,C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
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/handlers/get-memo/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { handleGetMemo } from './handler.js';
|
|
2
|
+
export const getMemoTool = {
|
|
3
|
+
definition: {
|
|
4
|
+
name: 'paput_get_memo',
|
|
5
|
+
description: 'PaPut のメモ詳細を取得します',
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: 'object',
|
|
8
|
+
properties: {
|
|
9
|
+
id: {
|
|
10
|
+
type: 'number',
|
|
11
|
+
description: 'メモID',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
required: ['id'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
handler: handleGetMemo,
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/handlers/get-memo/tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,MAAM,WAAW,GAAgB;IACtC,UAAU,EAAE;QACV,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,mBAAmB;QAChC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE;oBACF,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,MAAM;iBACpB;aACF;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;KACF;IACD,OAAO,EAAE,aAAa;CACvB,CAAC"}
|