@crypto512/jicon-mcp 0.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/.env.example +9 -0
- package/.jicon.json.custom +21 -0
- package/.jicon.json.example +15 -0
- package/.jicon.json.readonly +15 -0
- package/CLAUDE.md +596 -0
- package/CONTRIBUTING.md +371 -0
- package/DEVELOPMENT.md +400 -0
- package/LICENSE +21 -0
- package/README.md +300 -0
- package/TOOL_LIST.md +435 -0
- package/dist/config/constants.d.ts +14 -0
- package/dist/config/constants.d.ts.map +1 -0
- package/dist/config/constants.js +18 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/config/loader.d.ts +35 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +108 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/types.d.ts +130 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +32 -0
- package/dist/config/types.js.map +1 -0
- package/dist/confluence/client.d.ts +30 -0
- package/dist/confluence/client.d.ts.map +1 -0
- package/dist/confluence/client.js +176 -0
- package/dist/confluence/client.js.map +1 -0
- package/dist/confluence/defaults.d.ts +23 -0
- package/dist/confluence/defaults.d.ts.map +1 -0
- package/dist/confluence/defaults.js +29 -0
- package/dist/confluence/defaults.js.map +1 -0
- package/dist/confluence/formatters.d.ts +22 -0
- package/dist/confluence/formatters.d.ts.map +1 -0
- package/dist/confluence/formatters.js +125 -0
- package/dist/confluence/formatters.js.map +1 -0
- package/dist/confluence/tools.d.ts +266 -0
- package/dist/confluence/tools.d.ts.map +1 -0
- package/dist/confluence/tools.js +376 -0
- package/dist/confluence/tools.js.map +1 -0
- package/dist/confluence/types.d.ts +122 -0
- package/dist/confluence/types.d.ts.map +1 -0
- package/dist/confluence/types.js +5 -0
- package/dist/confluence/types.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +161 -0
- package/dist/index.js.map +1 -0
- package/dist/jira/client.d.ts +46 -0
- package/dist/jira/client.d.ts.map +1 -0
- package/dist/jira/client.js +178 -0
- package/dist/jira/client.js.map +1 -0
- package/dist/jira/defaults.d.ts +19 -0
- package/dist/jira/defaults.d.ts.map +1 -0
- package/dist/jira/defaults.js +57 -0
- package/dist/jira/defaults.js.map +1 -0
- package/dist/jira/formatters.d.ts +22 -0
- package/dist/jira/formatters.d.ts.map +1 -0
- package/dist/jira/formatters.js +128 -0
- package/dist/jira/formatters.js.map +1 -0
- package/dist/jira/tools.d.ts +334 -0
- package/dist/jira/tools.d.ts.map +1 -0
- package/dist/jira/tools.js +372 -0
- package/dist/jira/tools.js.map +1 -0
- package/dist/jira/types.d.ts +110 -0
- package/dist/jira/types.d.ts.map +1 -0
- package/dist/jira/types.js +5 -0
- package/dist/jira/types.js.map +1 -0
- package/dist/permissions/filter.d.ts +30 -0
- package/dist/permissions/filter.d.ts.map +1 -0
- package/dist/permissions/filter.js +89 -0
- package/dist/permissions/filter.js.map +1 -0
- package/dist/permissions/tool-registry.d.ts +49 -0
- package/dist/permissions/tool-registry.d.ts.map +1 -0
- package/dist/permissions/tool-registry.js +111 -0
- package/dist/permissions/tool-registry.js.map +1 -0
- package/dist/tempo/client.d.ts +32 -0
- package/dist/tempo/client.d.ts.map +1 -0
- package/dist/tempo/client.js +125 -0
- package/dist/tempo/client.js.map +1 -0
- package/dist/tempo/formatters.d.ts +30 -0
- package/dist/tempo/formatters.d.ts.map +1 -0
- package/dist/tempo/formatters.js +172 -0
- package/dist/tempo/formatters.js.map +1 -0
- package/dist/tempo/tools.d.ts +184 -0
- package/dist/tempo/tools.d.ts.map +1 -0
- package/dist/tempo/tools.js +392 -0
- package/dist/tempo/tools.js.map +1 -0
- package/dist/tempo/types.d.ts +98 -0
- package/dist/tempo/types.d.ts.map +1 -0
- package/dist/tempo/types.js +5 -0
- package/dist/tempo/types.js.map +1 -0
- package/dist/types.d.ts +27 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/http-client.d.ts +22 -0
- package/dist/utils/http-client.d.ts.map +1 -0
- package/dist/utils/http-client.js +137 -0
- package/dist/utils/http-client.js.map +1 -0
- package/dist/utils/response-formatter.d.ts +8 -0
- package/dist/utils/response-formatter.d.ts.map +1 -0
- package/dist/utils/response-formatter.js +38 -0
- package/dist/utils/response-formatter.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Confluence MCP Tools
|
|
3
|
+
*/
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { ConfluenceClient } from "./client.js";
|
|
6
|
+
import type { ToolResult } from "../types.js";
|
|
7
|
+
export declare function createConfluenceTools(client: ConfluenceClient): {
|
|
8
|
+
confluence_search_content: {
|
|
9
|
+
description: string;
|
|
10
|
+
inputSchema: z.ZodObject<{
|
|
11
|
+
cql: z.ZodString;
|
|
12
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
expand: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
cql: string;
|
|
16
|
+
expand?: string[] | undefined;
|
|
17
|
+
limit?: number | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
cql: string;
|
|
20
|
+
expand?: string[] | undefined;
|
|
21
|
+
limit?: number | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
handler: (args: {
|
|
24
|
+
cql: string;
|
|
25
|
+
limit?: number;
|
|
26
|
+
expand?: string[];
|
|
27
|
+
}) => Promise<ToolResult>;
|
|
28
|
+
};
|
|
29
|
+
confluence_get_page: {
|
|
30
|
+
description: string;
|
|
31
|
+
inputSchema: z.ZodObject<{
|
|
32
|
+
pageId: z.ZodString;
|
|
33
|
+
expand: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
pageId: string;
|
|
36
|
+
expand?: string[] | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
pageId: string;
|
|
39
|
+
expand?: string[] | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
handler: (args: {
|
|
42
|
+
pageId: string;
|
|
43
|
+
expand?: string[];
|
|
44
|
+
}) => Promise<ToolResult>;
|
|
45
|
+
};
|
|
46
|
+
confluence_get_page_by_title: {
|
|
47
|
+
description: string;
|
|
48
|
+
inputSchema: z.ZodObject<{
|
|
49
|
+
spaceKey: z.ZodString;
|
|
50
|
+
title: z.ZodString;
|
|
51
|
+
expand: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
spaceKey: string;
|
|
54
|
+
title: string;
|
|
55
|
+
expand?: string[] | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
spaceKey: string;
|
|
58
|
+
title: string;
|
|
59
|
+
expand?: string[] | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
handler: (args: {
|
|
62
|
+
spaceKey: string;
|
|
63
|
+
title: string;
|
|
64
|
+
expand?: string[];
|
|
65
|
+
}) => Promise<ToolResult>;
|
|
66
|
+
};
|
|
67
|
+
confluence_create_page: {
|
|
68
|
+
description: string;
|
|
69
|
+
inputSchema: z.ZodObject<{
|
|
70
|
+
spaceKey: z.ZodString;
|
|
71
|
+
title: z.ZodString;
|
|
72
|
+
content: z.ZodString;
|
|
73
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
74
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
spaceKey: string;
|
|
77
|
+
title: string;
|
|
78
|
+
content: string;
|
|
79
|
+
labels?: string[] | undefined;
|
|
80
|
+
parentId?: string | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
spaceKey: string;
|
|
83
|
+
title: string;
|
|
84
|
+
content: string;
|
|
85
|
+
labels?: string[] | undefined;
|
|
86
|
+
parentId?: string | undefined;
|
|
87
|
+
}>;
|
|
88
|
+
handler: (args: {
|
|
89
|
+
spaceKey: string;
|
|
90
|
+
title: string;
|
|
91
|
+
content: string;
|
|
92
|
+
parentId?: string;
|
|
93
|
+
labels?: string[];
|
|
94
|
+
}) => Promise<ToolResult>;
|
|
95
|
+
};
|
|
96
|
+
confluence_update_page: {
|
|
97
|
+
description: string;
|
|
98
|
+
inputSchema: z.ZodObject<{
|
|
99
|
+
pageId: z.ZodString;
|
|
100
|
+
title: z.ZodOptional<z.ZodString>;
|
|
101
|
+
content: z.ZodOptional<z.ZodString>;
|
|
102
|
+
version: z.ZodNumber;
|
|
103
|
+
minorEdit: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
version: number;
|
|
106
|
+
pageId: string;
|
|
107
|
+
title?: string | undefined;
|
|
108
|
+
content?: string | undefined;
|
|
109
|
+
minorEdit?: boolean | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
version: number;
|
|
112
|
+
pageId: string;
|
|
113
|
+
title?: string | undefined;
|
|
114
|
+
content?: string | undefined;
|
|
115
|
+
minorEdit?: boolean | undefined;
|
|
116
|
+
}>;
|
|
117
|
+
handler: (args: {
|
|
118
|
+
pageId: string;
|
|
119
|
+
title?: string;
|
|
120
|
+
content?: string;
|
|
121
|
+
version: number;
|
|
122
|
+
minorEdit?: boolean;
|
|
123
|
+
}) => Promise<ToolResult>;
|
|
124
|
+
};
|
|
125
|
+
confluence_delete_page: {
|
|
126
|
+
description: string;
|
|
127
|
+
inputSchema: z.ZodObject<{
|
|
128
|
+
pageId: z.ZodString;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
pageId: string;
|
|
131
|
+
}, {
|
|
132
|
+
pageId: string;
|
|
133
|
+
}>;
|
|
134
|
+
handler: (args: {
|
|
135
|
+
pageId: string;
|
|
136
|
+
}) => Promise<ToolResult>;
|
|
137
|
+
};
|
|
138
|
+
confluence_list_spaces: {
|
|
139
|
+
description: string;
|
|
140
|
+
inputSchema: z.ZodObject<{
|
|
141
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
type: z.ZodOptional<z.ZodEnum<["global", "personal"]>>;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
type?: "global" | "personal" | undefined;
|
|
145
|
+
limit?: number | undefined;
|
|
146
|
+
}, {
|
|
147
|
+
type?: "global" | "personal" | undefined;
|
|
148
|
+
limit?: number | undefined;
|
|
149
|
+
}>;
|
|
150
|
+
handler: (args: {
|
|
151
|
+
limit?: number;
|
|
152
|
+
type?: "global" | "personal";
|
|
153
|
+
}) => Promise<ToolResult>;
|
|
154
|
+
};
|
|
155
|
+
confluence_get_space: {
|
|
156
|
+
description: string;
|
|
157
|
+
inputSchema: z.ZodObject<{
|
|
158
|
+
spaceKey: z.ZodString;
|
|
159
|
+
expand: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
160
|
+
}, "strip", z.ZodTypeAny, {
|
|
161
|
+
spaceKey: string;
|
|
162
|
+
expand?: string[] | undefined;
|
|
163
|
+
}, {
|
|
164
|
+
spaceKey: string;
|
|
165
|
+
expand?: string[] | undefined;
|
|
166
|
+
}>;
|
|
167
|
+
handler: (args: {
|
|
168
|
+
spaceKey: string;
|
|
169
|
+
expand?: string[];
|
|
170
|
+
}) => Promise<ToolResult>;
|
|
171
|
+
};
|
|
172
|
+
confluence_get_page_children: {
|
|
173
|
+
description: string;
|
|
174
|
+
inputSchema: z.ZodObject<{
|
|
175
|
+
pageId: z.ZodString;
|
|
176
|
+
expand: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
177
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
178
|
+
}, "strip", z.ZodTypeAny, {
|
|
179
|
+
pageId: string;
|
|
180
|
+
expand?: string[] | undefined;
|
|
181
|
+
limit?: number | undefined;
|
|
182
|
+
}, {
|
|
183
|
+
pageId: string;
|
|
184
|
+
expand?: string[] | undefined;
|
|
185
|
+
limit?: number | undefined;
|
|
186
|
+
}>;
|
|
187
|
+
handler: (args: {
|
|
188
|
+
pageId: string;
|
|
189
|
+
expand?: string[];
|
|
190
|
+
limit?: number;
|
|
191
|
+
}) => Promise<ToolResult>;
|
|
192
|
+
};
|
|
193
|
+
confluence_add_comment: {
|
|
194
|
+
description: string;
|
|
195
|
+
inputSchema: z.ZodObject<{
|
|
196
|
+
pageId: z.ZodString;
|
|
197
|
+
comment: z.ZodString;
|
|
198
|
+
}, "strip", z.ZodTypeAny, {
|
|
199
|
+
comment: string;
|
|
200
|
+
pageId: string;
|
|
201
|
+
}, {
|
|
202
|
+
comment: string;
|
|
203
|
+
pageId: string;
|
|
204
|
+
}>;
|
|
205
|
+
handler: (args: {
|
|
206
|
+
pageId: string;
|
|
207
|
+
comment: string;
|
|
208
|
+
}) => Promise<ToolResult>;
|
|
209
|
+
};
|
|
210
|
+
confluence_get_comments: {
|
|
211
|
+
description: string;
|
|
212
|
+
inputSchema: z.ZodObject<{
|
|
213
|
+
pageId: z.ZodString;
|
|
214
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
215
|
+
}, "strip", z.ZodTypeAny, {
|
|
216
|
+
pageId: string;
|
|
217
|
+
limit?: number | undefined;
|
|
218
|
+
}, {
|
|
219
|
+
pageId: string;
|
|
220
|
+
limit?: number | undefined;
|
|
221
|
+
}>;
|
|
222
|
+
handler: (args: {
|
|
223
|
+
pageId: string;
|
|
224
|
+
limit?: number;
|
|
225
|
+
}) => Promise<ToolResult>;
|
|
226
|
+
};
|
|
227
|
+
confluence_upload_attachment: {
|
|
228
|
+
description: string;
|
|
229
|
+
inputSchema: z.ZodObject<{
|
|
230
|
+
pageId: z.ZodString;
|
|
231
|
+
filePath: z.ZodString;
|
|
232
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
233
|
+
}, "strip", z.ZodTypeAny, {
|
|
234
|
+
pageId: string;
|
|
235
|
+
filePath: string;
|
|
236
|
+
comment?: string | undefined;
|
|
237
|
+
}, {
|
|
238
|
+
pageId: string;
|
|
239
|
+
filePath: string;
|
|
240
|
+
comment?: string | undefined;
|
|
241
|
+
}>;
|
|
242
|
+
handler: (args: {
|
|
243
|
+
pageId: string;
|
|
244
|
+
filePath: string;
|
|
245
|
+
comment?: string;
|
|
246
|
+
}) => Promise<ToolResult>;
|
|
247
|
+
};
|
|
248
|
+
confluence_list_attachments: {
|
|
249
|
+
description: string;
|
|
250
|
+
inputSchema: z.ZodObject<{
|
|
251
|
+
pageId: z.ZodString;
|
|
252
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
253
|
+
}, "strip", z.ZodTypeAny, {
|
|
254
|
+
pageId: string;
|
|
255
|
+
limit?: number | undefined;
|
|
256
|
+
}, {
|
|
257
|
+
pageId: string;
|
|
258
|
+
limit?: number | undefined;
|
|
259
|
+
}>;
|
|
260
|
+
handler: (args: {
|
|
261
|
+
pageId: string;
|
|
262
|
+
limit?: number;
|
|
263
|
+
}) => Promise<ToolResult>;
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/confluence/tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAQ/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,gBAAgB;;;;;;;;;;;;;;;;wBA+DlC;YACpB,GAAG,EAAE,MAAM,CAAC;YACZ,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;SACnB,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;wBA2ED;YACpB,MAAM,EAAE,MAA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AChB,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;wBAsBD;YACpB,MAAM,EAAE,MAAM,CAAC;YACf,OAAO,EAAE,MAAM,CAAC;SACjB,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;wBAkBD;YACpB,MAAM,EAAE,MAAM,CAAC;YACf,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;wBAmBD;YACpB,MAAM,EAAE,MAAM,CAAC;YACf,QAAQ,EAAE,MAAM,CAAC;YACjB,OAAO,CAAC,EAAE,MAAM,CAAC;SAClB,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;wBAsBD;YACpB,MAAM,EAAE,MAAM,CAAC;YACf,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,KAAG,OAAO,CAAC,UAAU,CAAC;;EAY5B"}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Confluence MCP Tools
|
|
3
|
+
*/
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { formatSuccess, formatError, isApiError } from "../utils/response-formatter.js";
|
|
6
|
+
import { formatPage, formatSearchResults, formatSpace, formatSpaces, } from "./formatters.js";
|
|
7
|
+
export function createConfluenceTools(client) {
|
|
8
|
+
return {
|
|
9
|
+
confluence_search_content: {
|
|
10
|
+
description: `Search Confluence content using CQL (Confluence Query Language).
|
|
11
|
+
|
|
12
|
+
CQL Syntax Basics:
|
|
13
|
+
- Search text: use 'text~"term"' (searches both title and body)
|
|
14
|
+
- Search title: use 'title~"term"'
|
|
15
|
+
- Search by space: use 'space=KEY' (use space key, NOT space name!)
|
|
16
|
+
- Search by type: use 'type=page' or 'type=blogpost'
|
|
17
|
+
- Combine: AND, OR, NOT
|
|
18
|
+
- Order: ORDER BY created/lastmodified ASC/DESC
|
|
19
|
+
|
|
20
|
+
⚠️ CRITICAL: Do NOT use 'content~' or 'body~' - they're invalid! Use 'text~' instead.
|
|
21
|
+
|
|
22
|
+
Top 10 Useful CQL Queries:
|
|
23
|
+
|
|
24
|
+
1. Recently updated pages (last 7 days):
|
|
25
|
+
type=page AND lastmodified >= now("-7d")
|
|
26
|
+
|
|
27
|
+
2. Pages created by a person:
|
|
28
|
+
type=page AND creator="username"
|
|
29
|
+
|
|
30
|
+
3. Pages with specific label:
|
|
31
|
+
type=page AND label="meeting-notes"
|
|
32
|
+
|
|
33
|
+
4. Pages in space modified recently:
|
|
34
|
+
space=MESH AND lastmodified >= now("-30d") ORDER BY lastmodified DESC
|
|
35
|
+
|
|
36
|
+
5. Pages mentioning a person or topic:
|
|
37
|
+
type=page AND text~"Nicolas Pernoud"
|
|
38
|
+
|
|
39
|
+
6. Meeting notes in specific space:
|
|
40
|
+
space=MESH AND (title~"meeting" OR text~"meeting") AND type=page
|
|
41
|
+
|
|
42
|
+
7. Pages created this week:
|
|
43
|
+
type=page AND created >= startOfWeek()
|
|
44
|
+
|
|
45
|
+
8. Pages with attachments:
|
|
46
|
+
type=page AND attachment IS NOT NULL
|
|
47
|
+
|
|
48
|
+
9. Blog posts vs pages:
|
|
49
|
+
type=blogpost AND space=NEWS ORDER BY created DESC
|
|
50
|
+
|
|
51
|
+
10. Pages by title pattern:
|
|
52
|
+
type=page AND title~"Sprint Review" ORDER BY created DESC
|
|
53
|
+
|
|
54
|
+
Common Patterns:
|
|
55
|
+
- Date ranges: lastmodified >= "2025-01-01" AND lastmodified <= "2025-01-31"
|
|
56
|
+
- Multiple spaces: space IN (MESH, DOC, PROJ)
|
|
57
|
+
- Exclude archived: AND type=page (automatically excludes archived)
|
|
58
|
+
- Find by creator: creator.fullname~"John Smith"
|
|
59
|
+
- Find orphaned pages: ancestor IS NULL
|
|
60
|
+
|
|
61
|
+
Real-World Examples:
|
|
62
|
+
- Find TL meetings: text~"TL" AND text~"meeting" AND space=MESH
|
|
63
|
+
- Find documentation: space=DOC AND label="api" AND type=page
|
|
64
|
+
- Find recent sprint reviews: title~"sprint review" AND lastmodified >= now("-60d")`,
|
|
65
|
+
inputSchema: z.object({
|
|
66
|
+
cql: z.string().describe("CQL query string"),
|
|
67
|
+
limit: z.number().optional().describe("Maximum number of results (default: 25)"),
|
|
68
|
+
expand: z.array(z.string()).optional().describe("Additional data to expand"),
|
|
69
|
+
}),
|
|
70
|
+
handler: async (args) => {
|
|
71
|
+
try {
|
|
72
|
+
const result = await client.searchContent(args.cql, args.limit, args.expand);
|
|
73
|
+
return {
|
|
74
|
+
content: [
|
|
75
|
+
{
|
|
76
|
+
type: "text",
|
|
77
|
+
text: formatSearchResults(result),
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
// Enhanced error handling for common CQL errors
|
|
84
|
+
if (isApiError(error)) {
|
|
85
|
+
if (error.statusCode === 400) {
|
|
86
|
+
// Invalid CQL syntax
|
|
87
|
+
const errorMsg = error.message.toLowerCase();
|
|
88
|
+
let hint = "\n\nCommon CQL Mistakes:\n";
|
|
89
|
+
if (errorMsg.includes("content") || errorMsg.includes("body")) {
|
|
90
|
+
hint += "❌ Don't use 'content~' or 'body~' - they're invalid fields\n";
|
|
91
|
+
hint += "✅ Use 'text~\"search term\"' to search both title and content\n";
|
|
92
|
+
hint += "✅ Use 'title~\"search term\"' to search only titles\n";
|
|
93
|
+
}
|
|
94
|
+
else if (errorMsg.includes("operator")) {
|
|
95
|
+
hint += "- Check your CQL operators: ~ (contains), = (equals), != (not equals)\n";
|
|
96
|
+
hint += "- text~ and title~ support the ~ operator\n";
|
|
97
|
+
hint += "- space= and type= use = operator (not ~)\n";
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
hint += "- Use 'text~\"term\"' for full-text search (not content~ or body~)\n";
|
|
101
|
+
hint += "- Use 'space=KEY' with space keys, not names\n";
|
|
102
|
+
hint += "- Combine with AND/OR: 'text~\"term1\" AND text~\"term2\"'\n";
|
|
103
|
+
}
|
|
104
|
+
hint += "\nExamples:\n";
|
|
105
|
+
hint += " text~\"Nicolas Pernoud\" - finds pages mentioning this person\n";
|
|
106
|
+
hint += " text~\"meeting\" AND space=MESH - finds meetings in MESH space\n";
|
|
107
|
+
hint += " title~\"sprint review\" - finds pages with sprint review in title";
|
|
108
|
+
return formatError({
|
|
109
|
+
...error,
|
|
110
|
+
message: error.message + hint
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
else if (error.statusCode === 500) {
|
|
114
|
+
// Server overload
|
|
115
|
+
return formatError({
|
|
116
|
+
...error,
|
|
117
|
+
message: error.message + "\n\nTroubleshooting:\n" +
|
|
118
|
+
"- Try simplifying your CQL query (avoid space filters like 'space = \"Name\"')\n" +
|
|
119
|
+
"- Use space keys instead of names: 'space = KEY' not 'space = \"Full Name\"'\n" +
|
|
120
|
+
"- Reduce the result limit or avoid broad queries\n" +
|
|
121
|
+
"- Try searching within a specific space using confluence_get_space first\n" +
|
|
122
|
+
"- If searching by title, use confluence_get_page_by_title instead"
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
confluence_get_page: {
|
|
131
|
+
description: "Get a Confluence page by ID. PREFERRED method when you have a page ID from search results. Faster and more reliable than get_page_by_title.",
|
|
132
|
+
inputSchema: z.object({
|
|
133
|
+
pageId: z.coerce.string().describe("Page ID (accepts string or number)"),
|
|
134
|
+
expand: z
|
|
135
|
+
.array(z.string())
|
|
136
|
+
.optional()
|
|
137
|
+
.describe('Additional data to expand (e.g., "body.storage", "version")'),
|
|
138
|
+
}),
|
|
139
|
+
handler: async (args) => {
|
|
140
|
+
try {
|
|
141
|
+
const result = await client.getPage(args.pageId, args.expand);
|
|
142
|
+
return {
|
|
143
|
+
content: [
|
|
144
|
+
{
|
|
145
|
+
type: "text",
|
|
146
|
+
text: formatPage(result),
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
confluence_get_page_by_title: {
|
|
157
|
+
description: "Get a Confluence page by title and space. Use ONLY when you don't have a page ID. IMPORTANT: Use the space KEY (e.g. 'MESH', 'TC'), NOT the space name (e.g. 'MESH OVERSEC', 'Technical Community').",
|
|
158
|
+
inputSchema: z.object({
|
|
159
|
+
spaceKey: z.string().describe("Space key (short code like 'MESH', 'TC'), NOT the full space name"),
|
|
160
|
+
title: z.string().describe("Page title"),
|
|
161
|
+
expand: z.array(z.string()).optional().describe("Additional data to expand"),
|
|
162
|
+
}),
|
|
163
|
+
handler: async (args) => {
|
|
164
|
+
try {
|
|
165
|
+
const result = await client.getPageByTitle(args.spaceKey, args.title, args.expand);
|
|
166
|
+
if (!result) {
|
|
167
|
+
return formatError({
|
|
168
|
+
error: true,
|
|
169
|
+
message: `Page not found: ${args.title} in space ${args.spaceKey}`,
|
|
170
|
+
statusCode: 404,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
return formatSuccess(result);
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
confluence_create_page: {
|
|
181
|
+
description: "Create a new Confluence page",
|
|
182
|
+
inputSchema: z.object({
|
|
183
|
+
spaceKey: z.string().describe("Space key"),
|
|
184
|
+
title: z.string().describe("Page title"),
|
|
185
|
+
content: z
|
|
186
|
+
.string()
|
|
187
|
+
.describe("Page content (Confluence storage format or HTML)"),
|
|
188
|
+
parentId: z.string().optional().describe("Parent page ID"),
|
|
189
|
+
labels: z.array(z.string()).optional().describe("Array of labels"),
|
|
190
|
+
}),
|
|
191
|
+
handler: async (args) => {
|
|
192
|
+
try {
|
|
193
|
+
const result = await client.createPage(args);
|
|
194
|
+
return formatSuccess(result);
|
|
195
|
+
}
|
|
196
|
+
catch (error) {
|
|
197
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
confluence_update_page: {
|
|
202
|
+
description: "Update an existing Confluence page",
|
|
203
|
+
inputSchema: z.object({
|
|
204
|
+
pageId: z.coerce.string().describe("Page ID (accepts string or number)"),
|
|
205
|
+
title: z.string().optional().describe("New title"),
|
|
206
|
+
content: z.string().optional().describe("New content"),
|
|
207
|
+
version: z
|
|
208
|
+
.number()
|
|
209
|
+
.describe("Current version number (for optimistic locking)"),
|
|
210
|
+
minorEdit: z
|
|
211
|
+
.boolean()
|
|
212
|
+
.optional()
|
|
213
|
+
.describe("Whether this is a minor edit"),
|
|
214
|
+
}),
|
|
215
|
+
handler: async (args) => {
|
|
216
|
+
try {
|
|
217
|
+
const result = await client.updatePage(args.pageId, args.version, args.title, args.content, args.minorEdit);
|
|
218
|
+
return formatSuccess(result);
|
|
219
|
+
}
|
|
220
|
+
catch (error) {
|
|
221
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
confluence_delete_page: {
|
|
226
|
+
description: "Delete a Confluence page",
|
|
227
|
+
inputSchema: z.object({
|
|
228
|
+
pageId: z.coerce.string().describe("Page ID (accepts string or number)"),
|
|
229
|
+
}),
|
|
230
|
+
handler: async (args) => {
|
|
231
|
+
try {
|
|
232
|
+
await client.deletePage(args.pageId);
|
|
233
|
+
return formatSuccess({
|
|
234
|
+
success: true,
|
|
235
|
+
message: `Page ${args.pageId} deleted successfully`,
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
catch (error) {
|
|
239
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
confluence_list_spaces: {
|
|
244
|
+
description: "List all accessible Confluence spaces",
|
|
245
|
+
inputSchema: z.object({
|
|
246
|
+
limit: z.number().optional().describe("Maximum number of results"),
|
|
247
|
+
type: z
|
|
248
|
+
.enum(["global", "personal"])
|
|
249
|
+
.optional()
|
|
250
|
+
.describe("Space type filter"),
|
|
251
|
+
}),
|
|
252
|
+
handler: async (args) => {
|
|
253
|
+
try {
|
|
254
|
+
const result = await client.listSpaces(args.limit, args.type);
|
|
255
|
+
return {
|
|
256
|
+
content: [
|
|
257
|
+
{
|
|
258
|
+
type: "text",
|
|
259
|
+
text: formatSpaces(result),
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
catch (error) {
|
|
265
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
confluence_get_space: {
|
|
270
|
+
description: "Get detailed information about a space",
|
|
271
|
+
inputSchema: z.object({
|
|
272
|
+
spaceKey: z.string().describe("Space key"),
|
|
273
|
+
expand: z.array(z.string()).optional().describe("Additional data to expand"),
|
|
274
|
+
}),
|
|
275
|
+
handler: async (args) => {
|
|
276
|
+
try {
|
|
277
|
+
const result = await client.getSpace(args.spaceKey, args.expand);
|
|
278
|
+
return {
|
|
279
|
+
content: [
|
|
280
|
+
{
|
|
281
|
+
type: "text",
|
|
282
|
+
text: formatSpace(result),
|
|
283
|
+
},
|
|
284
|
+
],
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
catch (error) {
|
|
288
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
confluence_get_page_children: {
|
|
293
|
+
description: "Get child pages of a page",
|
|
294
|
+
inputSchema: z.object({
|
|
295
|
+
pageId: z.coerce.string().describe("Parent page ID (accepts string or number)"),
|
|
296
|
+
expand: z.array(z.string()).optional().describe("Additional data to expand"),
|
|
297
|
+
limit: z.number().optional().describe("Maximum number of results"),
|
|
298
|
+
}),
|
|
299
|
+
handler: async (args) => {
|
|
300
|
+
try {
|
|
301
|
+
const result = await client.getPageChildren(args.pageId, args.expand, args.limit);
|
|
302
|
+
return formatSuccess(result);
|
|
303
|
+
}
|
|
304
|
+
catch (error) {
|
|
305
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
confluence_add_comment: {
|
|
310
|
+
description: "Add a comment to a Confluence page",
|
|
311
|
+
inputSchema: z.object({
|
|
312
|
+
pageId: z.coerce.string().describe("Page ID (accepts string or number)"),
|
|
313
|
+
comment: z.string().describe("Comment text (HTML format)"),
|
|
314
|
+
}),
|
|
315
|
+
handler: async (args) => {
|
|
316
|
+
try {
|
|
317
|
+
const result = await client.addComment(args.pageId, args.comment);
|
|
318
|
+
return formatSuccess(result);
|
|
319
|
+
}
|
|
320
|
+
catch (error) {
|
|
321
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
confluence_get_comments: {
|
|
326
|
+
description: "Get comments on a Confluence page",
|
|
327
|
+
inputSchema: z.object({
|
|
328
|
+
pageId: z.coerce.string().describe("Page ID (accepts string or number)"),
|
|
329
|
+
limit: z.number().optional().describe("Maximum number of results"),
|
|
330
|
+
}),
|
|
331
|
+
handler: async (args) => {
|
|
332
|
+
try {
|
|
333
|
+
const result = await client.getComments(args.pageId, args.limit);
|
|
334
|
+
return formatSuccess(result);
|
|
335
|
+
}
|
|
336
|
+
catch (error) {
|
|
337
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
confluence_upload_attachment: {
|
|
342
|
+
description: "Upload an attachment to a Confluence page",
|
|
343
|
+
inputSchema: z.object({
|
|
344
|
+
pageId: z.coerce.string().describe("Page ID (accepts string or number)"),
|
|
345
|
+
filePath: z.string().describe("Local file path"),
|
|
346
|
+
comment: z.string().optional().describe("Attachment comment"),
|
|
347
|
+
}),
|
|
348
|
+
handler: async (args) => {
|
|
349
|
+
try {
|
|
350
|
+
const result = await client.uploadAttachment(args.pageId, args.filePath, args.comment);
|
|
351
|
+
return formatSuccess(result);
|
|
352
|
+
}
|
|
353
|
+
catch (error) {
|
|
354
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
confluence_list_attachments: {
|
|
359
|
+
description: "List attachments on a Confluence page",
|
|
360
|
+
inputSchema: z.object({
|
|
361
|
+
pageId: z.coerce.string().describe("Page ID (accepts string or number)"),
|
|
362
|
+
limit: z.number().optional().describe("Maximum number of results"),
|
|
363
|
+
}),
|
|
364
|
+
handler: async (args) => {
|
|
365
|
+
try {
|
|
366
|
+
const result = await client.listAttachments(args.pageId, args.limit);
|
|
367
|
+
return formatSuccess(result);
|
|
368
|
+
}
|
|
369
|
+
catch (error) {
|
|
370
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/confluence/tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACxF,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,WAAW,EACX,YAAY,GACb,MAAM,iBAAiB,CAAC;AAGzB,MAAM,UAAU,qBAAqB,CAAC,MAAwB;IAC5D,OAAO;QACL,yBAAyB,EAAE;Y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