@crypto512/jicon-mcp 2.2.1 → 2.3.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 +7 -2
- package/TOOL_LIST.md +361 -296
- package/dist/config/constants.d.ts +15 -0
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +19 -0
- package/dist/config/constants.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +7 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/types.d.ts +38 -6
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +16 -0
- package/dist/config/types.js.map +1 -1
- package/dist/confluence/formatters.d.ts +20 -0
- package/dist/confluence/formatters.d.ts.map +1 -1
- package/dist/confluence/formatters.js +74 -8
- package/dist/confluence/formatters.js.map +1 -1
- package/dist/confluence/tools.d.ts +8 -7
- package/dist/confluence/tools.d.ts.map +1 -1
- package/dist/confluence/tools.js +52 -31
- package/dist/confluence/tools.js.map +1 -1
- package/dist/credentials/extractor.d.ts +1 -2
- package/dist/credentials/extractor.d.ts.map +1 -1
- package/dist/credentials/extractor.js +21 -4
- package/dist/credentials/extractor.js.map +1 -1
- package/dist/credentials/index.d.ts +3 -2
- package/dist/credentials/index.d.ts.map +1 -1
- package/dist/credentials/index.js +3 -2
- package/dist/credentials/index.js.map +1 -1
- package/dist/index.js +43 -20
- package/dist/index.js.map +1 -1
- package/dist/jira/activity-tools.d.ts +8 -11
- package/dist/jira/activity-tools.d.ts.map +1 -1
- package/dist/jira/activity-tools.js +91 -27
- package/dist/jira/activity-tools.js.map +1 -1
- package/dist/jira/client.d.ts +12 -0
- package/dist/jira/client.d.ts.map +1 -1
- package/dist/jira/client.js +35 -0
- package/dist/jira/client.js.map +1 -1
- package/dist/jira/formatters.d.ts +58 -0
- package/dist/jira/formatters.d.ts.map +1 -1
- package/dist/jira/formatters.js +80 -11
- package/dist/jira/formatters.js.map +1 -1
- package/dist/jira/tools.d.ts +30 -12
- package/dist/jira/tools.d.ts.map +1 -1
- package/dist/jira/tools.js +127 -37
- package/dist/jira/tools.js.map +1 -1
- package/dist/permissions/tool-registry.d.ts +6 -6
- package/dist/permissions/tool-registry.d.ts.map +1 -1
- package/dist/permissions/tool-registry.js +4 -3
- package/dist/permissions/tool-registry.js.map +1 -1
- package/dist/session/context.d.ts +81 -0
- package/dist/session/context.d.ts.map +1 -0
- package/dist/session/context.js +107 -0
- package/dist/session/context.js.map +1 -0
- package/dist/session/index.d.ts +12 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +22 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/manager.d.ts +155 -0
- package/dist/session/manager.d.ts.map +1 -0
- package/dist/session/manager.js +285 -0
- package/dist/session/manager.js.map +1 -0
- package/dist/tempo/client.d.ts +14 -0
- package/dist/tempo/client.d.ts.map +1 -1
- package/dist/tempo/client.js +55 -0
- package/dist/tempo/client.js.map +1 -1
- package/dist/tempo/formatters.d.ts +13 -0
- package/dist/tempo/formatters.d.ts.map +1 -1
- package/dist/tempo/formatters.js +106 -20
- package/dist/tempo/formatters.js.map +1 -1
- package/dist/tempo/tools.d.ts +10 -9
- package/dist/tempo/tools.d.ts.map +1 -1
- package/dist/tempo/tools.js +188 -33
- package/dist/tempo/tools.js.map +1 -1
- package/dist/tempo/types.d.ts +20 -6
- package/dist/tempo/types.d.ts.map +1 -1
- package/dist/transport/http.d.ts +20 -3
- package/dist/transport/http.d.ts.map +1 -1
- package/dist/transport/http.js +171 -15
- package/dist/transport/http.js.map +1 -1
- package/dist/transport/types.d.ts +2 -0
- package/dist/transport/types.d.ts.map +1 -1
- package/dist/transport/types.js.map +1 -1
- package/dist/utils/buffer-tools.d.ts +46 -722
- package/dist/utils/buffer-tools.d.ts.map +1 -1
- package/dist/utils/buffer-tools.js +303 -158
- package/dist/utils/buffer-tools.js.map +1 -1
- package/dist/utils/content-buffer.d.ts +10 -31
- package/dist/utils/content-buffer.d.ts.map +1 -1
- package/dist/utils/content-buffer.js +12 -86
- package/dist/utils/content-buffer.js.map +1 -1
- package/dist/utils/jicon-help.d.ts +3 -3
- package/dist/utils/jicon-help.d.ts.map +1 -1
- package/dist/utils/jicon-help.js +163 -101
- package/dist/utils/jicon-help.js.map +1 -1
- package/dist/utils/plantuml/tools.d.ts.map +1 -1
- package/dist/utils/plantuml/tools.js +8 -7
- package/dist/utils/plantuml/tools.js.map +1 -1
- package/dist/utils/response-formatter.d.ts +12 -2
- package/dist/utils/response-formatter.d.ts.map +1 -1
- package/dist/utils/response-formatter.js +85 -13
- package/dist/utils/response-formatter.js.map +1 -1
- package/dist/utils/sandbox/formatters.d.ts +25 -0
- package/dist/utils/sandbox/formatters.d.ts.map +1 -0
- package/dist/utils/sandbox/formatters.js +690 -0
- package/dist/utils/sandbox/formatters.js.map +1 -0
- package/dist/utils/sandbox/helpers.d.ts +16 -0
- package/dist/utils/sandbox/helpers.d.ts.map +1 -0
- package/dist/utils/sandbox/helpers.js +252 -0
- package/dist/utils/sandbox/helpers.js.map +1 -0
- package/dist/utils/sandbox/index.d.ts +19 -0
- package/dist/utils/sandbox/index.d.ts.map +1 -0
- package/dist/utils/sandbox/index.js +269 -0
- package/dist/utils/sandbox/index.js.map +1 -0
- package/dist/utils/sandbox/schema.d.ts +55 -0
- package/dist/utils/sandbox/schema.d.ts.map +1 -0
- package/dist/utils/sandbox/schema.js +39 -0
- package/dist/utils/sandbox/schema.js.map +1 -0
- package/dist/utils/sandbox/types.d.ts +179 -0
- package/dist/utils/sandbox/types.d.ts.map +1 -0
- package/dist/utils/sandbox/types.js +8 -0
- package/dist/utils/sandbox/types.js.map +1 -0
- package/dist/utils/schemas/confluence.d.ts +41 -0
- package/dist/utils/schemas/confluence.d.ts.map +1 -0
- package/dist/utils/schemas/confluence.js +105 -0
- package/dist/utils/schemas/confluence.js.map +1 -0
- package/dist/utils/schemas/index.d.ts +66 -0
- package/dist/utils/schemas/index.d.ts.map +1 -0
- package/dist/utils/schemas/index.js +107 -0
- package/dist/utils/schemas/index.js.map +1 -0
- package/dist/utils/schemas/jira.d.ts +49 -0
- package/dist/utils/schemas/jira.d.ts.map +1 -0
- package/dist/utils/schemas/jira.js +151 -0
- package/dist/utils/schemas/jira.js.map +1 -0
- package/dist/utils/schemas/tempo.d.ts +29 -0
- package/dist/utils/schemas/tempo.d.ts.map +1 -0
- package/dist/utils/schemas/tempo.js +72 -0
- package/dist/utils/schemas/tempo.js.map +1 -0
- package/dist/utils/xhtml/error-locator.js +5 -5
- package/dist/utils/xhtml/error-locator.js.map +1 -1
- package/package.json +10 -9
package/dist/jira/formatters.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Response formatters for Jira API responses
|
|
3
3
|
* Converts verbose API responses into concise, readable formats
|
|
4
4
|
*/
|
|
5
|
+
import { formatTimeSpent } from "../utils/time-formatter.js";
|
|
5
6
|
/**
|
|
6
7
|
* Extract issue metadata (without full content) for buffered responses
|
|
7
8
|
* Handles cases where custom fields are requested and some standard fields are missing
|
|
@@ -25,6 +26,11 @@ export function formatIssueMetadata(issue) {
|
|
|
25
26
|
updated: fields.updated ?? null,
|
|
26
27
|
labels: fields.labels || [],
|
|
27
28
|
components: fields.components?.map((c) => c.name) || [],
|
|
29
|
+
// Time tracking fields - often null, use jira_get_total_worklogs for accurate data
|
|
30
|
+
timespent: fields.timespent ?? null,
|
|
31
|
+
timespentSeconds: fields.timespent ?? null,
|
|
32
|
+
timeoriginalestimate: fields.timeoriginalestimate ?? null,
|
|
33
|
+
aggregatetimespent: fields.aggregatetimespent ?? null,
|
|
28
34
|
};
|
|
29
35
|
}
|
|
30
36
|
/**
|
|
@@ -49,11 +55,10 @@ export function formatIssue(issue) {
|
|
|
49
55
|
if (fields.description) {
|
|
50
56
|
lines.push("");
|
|
51
57
|
lines.push("## Description");
|
|
52
|
-
// Limit description to 500 characters
|
|
53
58
|
const desc = typeof fields.description === "string"
|
|
54
59
|
? fields.description
|
|
55
60
|
: JSON.stringify(fields.description);
|
|
56
|
-
lines.push(desc
|
|
61
|
+
lines.push(desc);
|
|
57
62
|
}
|
|
58
63
|
// Labels
|
|
59
64
|
if (fields.labels && fields.labels.length > 0) {
|
|
@@ -76,7 +81,7 @@ export function formatIssue(issue) {
|
|
|
76
81
|
// Show only the latest 3 comments
|
|
77
82
|
const recentComments = comment.comments.slice(-3);
|
|
78
83
|
recentComments.forEach((c) => {
|
|
79
|
-
lines.push(`- **${c.author?.displayName || "Unknown"}** (${c.created || ""}): ${c.body
|
|
84
|
+
lines.push(`- **${c.author?.displayName || "Unknown"}** (${c.created || ""}): ${c.body || ""}`);
|
|
80
85
|
});
|
|
81
86
|
}
|
|
82
87
|
}
|
|
@@ -119,10 +124,7 @@ export function formatProject(project) {
|
|
|
119
124
|
lines.push("");
|
|
120
125
|
if (project.description) {
|
|
121
126
|
lines.push("## Description");
|
|
122
|
-
|
|
123
|
-
? project.description.substring(0, 300) + "..."
|
|
124
|
-
: project.description;
|
|
125
|
-
lines.push(desc);
|
|
127
|
+
lines.push(project.description);
|
|
126
128
|
lines.push("");
|
|
127
129
|
}
|
|
128
130
|
lines.push("## Details");
|
|
@@ -141,13 +143,80 @@ export function formatProjects(projects) {
|
|
|
141
143
|
projects.forEach((project) => {
|
|
142
144
|
lines.push(`## ${project.key}: ${project.name}`);
|
|
143
145
|
if (project.description) {
|
|
144
|
-
|
|
145
|
-
? project.description.substring(0, 100) + "..."
|
|
146
|
-
: project.description;
|
|
147
|
-
lines.push(` ${shortDesc}`);
|
|
146
|
+
lines.push(` ${project.description}`);
|
|
148
147
|
}
|
|
149
148
|
lines.push("");
|
|
150
149
|
});
|
|
151
150
|
return lines.join("\n");
|
|
152
151
|
}
|
|
152
|
+
/**
|
|
153
|
+
* Extract comment metadata for buffered responses (matches jira_comment schema)
|
|
154
|
+
*/
|
|
155
|
+
export function formatCommentMetadata(comment) {
|
|
156
|
+
return {
|
|
157
|
+
id: comment.id,
|
|
158
|
+
author: comment.author?.displayName ?? null,
|
|
159
|
+
authorEmail: comment.author?.emailAddress ?? null,
|
|
160
|
+
body: comment.body ?? null,
|
|
161
|
+
created: comment.created ?? null,
|
|
162
|
+
updated: comment.updated ?? null,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Extract project metadata for buffered responses (matches jira_project schema)
|
|
167
|
+
*/
|
|
168
|
+
export function formatProjectMetadata(project) {
|
|
169
|
+
return {
|
|
170
|
+
id: project.id,
|
|
171
|
+
key: project.key,
|
|
172
|
+
name: project.name,
|
|
173
|
+
lead: project.lead?.displayName ?? null,
|
|
174
|
+
leadEmail: project.lead?.emailAddress ?? null,
|
|
175
|
+
type: project.projectTypeKey ?? null,
|
|
176
|
+
description: project.description ?? null,
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Extract board metadata for buffered responses (matches jira_board schema)
|
|
181
|
+
*/
|
|
182
|
+
export function formatBoardMetadata(board) {
|
|
183
|
+
return {
|
|
184
|
+
id: board.id,
|
|
185
|
+
name: board.name ?? null,
|
|
186
|
+
type: board.type ?? null,
|
|
187
|
+
projectKey: board.location?.projectKey ?? null,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Extract sprint metadata for buffered responses (matches jira_sprint schema)
|
|
192
|
+
*/
|
|
193
|
+
export function formatSprintMetadata(sprint) {
|
|
194
|
+
return {
|
|
195
|
+
id: sprint.id,
|
|
196
|
+
name: sprint.name ?? null,
|
|
197
|
+
state: sprint.state ?? null,
|
|
198
|
+
startDate: sprint.startDate ?? null,
|
|
199
|
+
endDate: sprint.endDate ?? null,
|
|
200
|
+
goal: sprint.goal ?? null,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Extract worklog metadata for buffered responses (matches jira_worklog schema)
|
|
205
|
+
*/
|
|
206
|
+
export function formatWorklogMetadata(worklog, issueKey) {
|
|
207
|
+
// Cast to any to access optional created/updated fields that may not be in the type
|
|
208
|
+
const wl = worklog;
|
|
209
|
+
return {
|
|
210
|
+
id: wl.id,
|
|
211
|
+
issueKey: issueKey ?? null,
|
|
212
|
+
author: wl.author?.displayName ?? null,
|
|
213
|
+
authorEmail: wl.author?.emailAddress ?? null,
|
|
214
|
+
timeSpentSeconds: wl.timeSpentSeconds ?? 0,
|
|
215
|
+
timeSpent: formatTimeSpent(wl.timeSpentSeconds ?? 0),
|
|
216
|
+
started: wl.started ?? null,
|
|
217
|
+
comment: wl.comment ?? null,
|
|
218
|
+
created: wl.created ?? null,
|
|
219
|
+
updated: wl.updated ?? null,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
153
222
|
//# sourceMappingURL=formatters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../src/jira/formatters.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../src/jira/formatters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAoC7D;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAgB;IAClD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;IAClC,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,IAAI;QAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,IAAI,IAAI;QACnC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,IAAI,IAAI;QAC3D,IAAI,EAAE,MAAM,CAAC,SAAS,EAAE,IAAI,IAAI,IAAI;QACpC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,IA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}
|
package/dist/jira/tools.d.ts
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Jira MCP Tools
|
|
3
|
+
*
|
|
4
|
+
* All tool handlers use session-scoped clients and buffers via getSessionXxxClient()
|
|
5
|
+
* and getSessionBuffer() functions which provide per-session isolation.
|
|
3
6
|
*/
|
|
4
7
|
import { z } from "zod";
|
|
5
|
-
import { JiraClient } from "./client.js";
|
|
6
8
|
import type { ToolResult } from "../types.js";
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
9
|
-
* This allows per-request credentials via AsyncLocalStorage
|
|
10
|
-
*/
|
|
11
|
-
export type JiraClientGetter = () => JiraClient | null;
|
|
12
|
-
/**
|
|
13
|
-
* Create Jira tools with a client getter function
|
|
10
|
+
* Create Jira tools using session-scoped clients
|
|
14
11
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
12
|
+
* Tools automatically use the JiraClient from the current session context,
|
|
13
|
+
* which provides per-session caching and credential isolation.
|
|
17
14
|
*/
|
|
18
|
-
export declare function createJiraTools(
|
|
15
|
+
export declare function createJiraTools(): {
|
|
19
16
|
jira_search_issues: {
|
|
20
17
|
description: string;
|
|
21
18
|
inputSchema: z.ZodObject<{
|
|
@@ -250,10 +247,10 @@ export declare function createJiraTools(getClient: JiraClientGetter): {
|
|
|
250
247
|
filter: z.ZodOptional<z.ZodEnum<["all", "custom", "system", "navigable"]>>;
|
|
251
248
|
search: z.ZodOptional<z.ZodString>;
|
|
252
249
|
}, "strip", z.ZodTypeAny, {
|
|
253
|
-
filter?: "system" | "
|
|
250
|
+
filter?: "system" | "custom" | "all" | "navigable" | undefined;
|
|
254
251
|
search?: string | undefined;
|
|
255
252
|
}, {
|
|
256
|
-
filter?: "system" | "
|
|
253
|
+
filter?: "system" | "custom" | "all" | "navigable" | undefined;
|
|
257
254
|
search?: string | undefined;
|
|
258
255
|
}>;
|
|
259
256
|
handler: (args: {
|
|
@@ -299,6 +296,27 @@ export declare function createJiraTools(getClient: JiraClientGetter): {
|
|
|
299
296
|
comment?: string;
|
|
300
297
|
}) => Promise<ToolResult>;
|
|
301
298
|
};
|
|
299
|
+
jira_list_boards: {
|
|
300
|
+
description: string;
|
|
301
|
+
inputSchema: z.ZodObject<{
|
|
302
|
+
projectKeyOrId: z.ZodOptional<z.ZodString>;
|
|
303
|
+
type: z.ZodOptional<z.ZodEnum<["scrum", "kanban"]>>;
|
|
304
|
+
name: z.ZodOptional<z.ZodString>;
|
|
305
|
+
}, "strip", z.ZodTypeAny, {
|
|
306
|
+
name?: string | undefined;
|
|
307
|
+
type?: "scrum" | "kanban" | undefined;
|
|
308
|
+
projectKeyOrId?: string | undefined;
|
|
309
|
+
}, {
|
|
310
|
+
name?: string | undefined;
|
|
311
|
+
type?: "scrum" | "kanban" | undefined;
|
|
312
|
+
projectKeyOrId?: string | undefined;
|
|
313
|
+
}>;
|
|
314
|
+
handler: (args: {
|
|
315
|
+
projectKeyOrId?: string;
|
|
316
|
+
type?: "scrum" | "kanban";
|
|
317
|
+
name?: string;
|
|
318
|
+
}) => Promise<ToolResult>;
|
|
319
|
+
};
|
|
302
320
|
jira_get_board: {
|
|
303
321
|
description: string;
|
|
304
322
|
inputSchema: z.ZodObject<{
|
package/dist/jira/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/jira/tools.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/jira/tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;GAKG;AACH,wBAAgB,eAAe;;;;;;;;;;;;;wBAiCH;YACpB,GAAG,EAAE,MAAM,CAAC;YACZ,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;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AAO,EAAE,MAAM,CAAA;SAAE,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;wBAyCzC;YACpB,OAAO,EAAE,MAAM,CAAC;YAChB,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;SACxC,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;wBAgCD;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;wBAgC1C;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;wBAyB1C;YACpB,QAAQ,EAAE,MAAM,CAAC;SAClB,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;wBA8CD;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;wBAsC1C;YACpB,SAAS,EAAE,MAAM,CAAC;YAClB,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;YACnC,SAAS,CAAC,EAAE,OAAO,CAAC;YACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;SACnB,KAAG,OAAO,CAAC,UAAU,CAAC;;EAqH5B"}
|
package/dist/jira/tools.js
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Jira MCP Tools
|
|
3
|
+
*
|
|
4
|
+
* All tool handlers use session-scoped clients and buffers via getSessionXxxClient()
|
|
5
|
+
* and getSessionBuffer() functions which provide per-session isolation.
|
|
3
6
|
*/
|
|
4
7
|
import { z } from "zod";
|
|
5
8
|
import { formatSuccess, formatSuccessJson, formatError, isApiError, formatConflictError } from "../utils/response-formatter.js";
|
|
6
|
-
import {
|
|
7
|
-
import { formatIssueMetadata } from "./formatters.js";
|
|
9
|
+
import { getSessionBuffer, getSessionJiraClient } from "../session/context.js";
|
|
10
|
+
import { formatIssueMetadata, formatCommentMetadata, formatProjectMetadata, formatBoardMetadata, formatSprintMetadata, formatWorklogMetadata, } from "./formatters.js";
|
|
8
11
|
import { formatTimeSpent } from "../utils/time-formatter.js";
|
|
9
12
|
/**
|
|
10
|
-
* Create Jira tools
|
|
13
|
+
* Create Jira tools using session-scoped clients
|
|
11
14
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
15
|
+
* Tools automatically use the JiraClient from the current session context,
|
|
16
|
+
* which provides per-session caching and credential isolation.
|
|
14
17
|
*/
|
|
15
|
-
export function createJiraTools(
|
|
18
|
+
export function createJiraTools() {
|
|
16
19
|
/**
|
|
17
20
|
* Helper to get client and throw if not available
|
|
18
21
|
*/
|
|
19
22
|
const requireClient = () => {
|
|
20
|
-
const client =
|
|
23
|
+
const client = getSessionJiraClient();
|
|
21
24
|
if (!client) {
|
|
22
25
|
throw new Error("Jira is not configured. Provide JIRA_URL and JIRA_API_TOKEN environment variables, or pass credentials via X-Jira-Url and X-Jira-Token headers.");
|
|
23
26
|
}
|
|
@@ -30,16 +33,17 @@ export function createJiraTools(getClient) {
|
|
|
30
33
|
Entry point for any Jira data analysis, reporting, or bulk workflow.
|
|
31
34
|
|
|
32
35
|
REQUIRES: Valid JQL query (see help(topic="jql") for syntax)
|
|
36
|
+
TIP: Issue types are LOCALIZED (e.g., "Épopée" not "Epic", "Bogue" not "Bug").
|
|
37
|
+
Use jira_get_issue_types() first if unsure.
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- apiLimit: Max items per search (5000)
|
|
38
|
-
- note: Explanation when results are truncated
|
|
39
|
+
TIME TRACKING: The "timespent" field is often NULL (time not logged directly on issue).
|
|
40
|
+
For accurate time data, use jira_get_total_worklogs(issueKey) which recursively sums
|
|
41
|
+
worklogs from the issue and all children. For bulk time reports, use tempo_get_worklogs.
|
|
39
42
|
|
|
40
|
-
|
|
43
|
+
RESPONSE: Returns buffer with flat fields (status, assignee, priority - not nested).
|
|
44
|
+
NEXT: buffer_transform for tables, buffer_get_items for analysis.
|
|
41
45
|
|
|
42
|
-
Example: jira_search_issues(jql="project=PROJ AND
|
|
46
|
+
Example: jira_search_issues(jql="project=PROJ AND statusCategory != Done")`,
|
|
43
47
|
inputSchema: z.object({
|
|
44
48
|
jql: z.string().describe("JQL query string"),
|
|
45
49
|
fields: z.array(z.string()).optional().describe("Specific fields to return"),
|
|
@@ -47,15 +51,25 @@ Example: jira_search_issues(jql="project=PROJ AND status='Open' ORDER BY priorit
|
|
|
47
51
|
handler: async (args) => {
|
|
48
52
|
try {
|
|
49
53
|
const result = await requireClient().searchIssuesAll(args.jql, args.fields, 5000);
|
|
50
|
-
//
|
|
51
|
-
const issues = result.issues || [];
|
|
54
|
+
// Flatten issues to match jira_issue schema
|
|
55
|
+
const issues = (result.issues || []).map(formatIssueMetadata);
|
|
52
56
|
const metadata = {
|
|
53
57
|
resourceType: "jira_search",
|
|
54
58
|
title: `JQL: ${args.jql.substring(0, 100)}${args.jql.length > 100 ? "..." : ""}`,
|
|
59
|
+
schemaType: "jira_issue",
|
|
55
60
|
jql: args.jql,
|
|
56
61
|
totalIssues: result.total,
|
|
57
62
|
maxResults: result.maxResults,
|
|
58
63
|
};
|
|
64
|
+
// Check if time fields were requested but are all null - add guidance
|
|
65
|
+
const timeFields = ["timespent", "timeoriginalestimate", "aggregatetimespent"];
|
|
66
|
+
const requestedTimeFields = args.fields?.filter(f => timeFields.includes(f.toLowerCase())) || [];
|
|
67
|
+
if (requestedTimeFields.length > 0 && issues.length > 0) {
|
|
68
|
+
const hasAnyTimeData = issues.some((issue) => requestedTimeFields.some(f => issue[f] != null && issue[f] !== 0));
|
|
69
|
+
if (!hasAnyTimeData) {
|
|
70
|
+
metadata.timeTrackingHint = "Time fields are null for all issues. For accurate time data, use jira_get_total_worklogs(issueKey) for individual issues, or tempo_get_worklogs for bulk queries by date range, project, or user.";
|
|
71
|
+
}
|
|
72
|
+
}
|
|
59
73
|
return formatSuccessJson(issues, metadata);
|
|
60
74
|
}
|
|
61
75
|
catch (error) {
|
|
@@ -72,6 +86,9 @@ REQUIRES: Issue key (e.g., "PROJ-123")
|
|
|
72
86
|
RETURNS: bufferId with issue data including fields, comments, attachments
|
|
73
87
|
NEXT: jira_update_issue (to modify), jira_transition_issue (to change status), jira_add_comment
|
|
74
88
|
|
|
89
|
+
TIME TRACKING: The "timespent" field is often NULL. For accurate time data,
|
|
90
|
+
use jira_get_issue_worklogs or jira_get_total_worklogs instead.
|
|
91
|
+
|
|
75
92
|
Example: jira_get_issue(issueKey="PROJ-123")`,
|
|
76
93
|
inputSchema: z.object({
|
|
77
94
|
issueKey: z.string().describe('Issue key (e.g., "PROJ-123")'),
|
|
@@ -87,16 +104,28 @@ Example: jira_get_issue(issueKey="PROJ-123")`,
|
|
|
87
104
|
// Handle case where fields might be missing or undefined
|
|
88
105
|
const summary = result?.fields?.summary || args.issueKey;
|
|
89
106
|
const issueKey = result?.key || args.issueKey;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
data: result,
|
|
93
|
-
}, {
|
|
107
|
+
const issueMetadata = formatIssueMetadata(result);
|
|
108
|
+
const metadata = {
|
|
94
109
|
resourceType: "jira_issue",
|
|
110
|
+
schemaType: "jira_issue",
|
|
95
111
|
title: `${issueKey}: ${summary}`,
|
|
96
112
|
resourceId: issueKey,
|
|
97
113
|
projectKey: issueKey.split("-")[0],
|
|
98
114
|
issueId: result?.id,
|
|
99
|
-
}
|
|
115
|
+
};
|
|
116
|
+
// Check if time fields were requested but are null - add guidance
|
|
117
|
+
const timeFields = ["timespent", "timeoriginalestimate", "aggregatetimespent"];
|
|
118
|
+
const requestedTimeFields = args.fields?.filter(f => timeFields.includes(f.toLowerCase())) || [];
|
|
119
|
+
if (requestedTimeFields.length > 0) {
|
|
120
|
+
const hasAnyTimeData = requestedTimeFields.some(f => issueMetadata[f] != null && issueMetadata[f] !== 0);
|
|
121
|
+
if (!hasAnyTimeData) {
|
|
122
|
+
metadata.timeTrackingHint = `Time fields are null for ${issueKey}. Use jira_get_issue_worklogs("${issueKey}") or jira_get_total_worklogs("${issueKey}") for accurate time data.`;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return formatSuccessJson({
|
|
126
|
+
...issueMetadata,
|
|
127
|
+
data: result,
|
|
128
|
+
}, metadata);
|
|
100
129
|
}
|
|
101
130
|
catch (error) {
|
|
102
131
|
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
@@ -166,7 +195,7 @@ Example: jira_update_issue(issueKey="PROJ-123", fields={summary: "New title", pr
|
|
|
166
195
|
try {
|
|
167
196
|
await requireClient().updateIssue(args.issueKey, args.fields, args.notifyUsers);
|
|
168
197
|
// Invalidate any cached buffers for this issue to prevent stale data
|
|
169
|
-
|
|
198
|
+
getSessionBuffer().invalidateByMetadata({
|
|
170
199
|
resourceType: "jira_issue",
|
|
171
200
|
resourceId: args.issueKey,
|
|
172
201
|
});
|
|
@@ -183,7 +212,7 @@ Example: jira_update_issue(issueKey="PROJ-123", fields={summary: "New title", pr
|
|
|
183
212
|
try {
|
|
184
213
|
await requireClient().getIssue(args.issueKey);
|
|
185
214
|
await requireClient().updateIssue(args.issueKey, args.fields, args.notifyUsers);
|
|
186
|
-
|
|
215
|
+
getSessionBuffer().invalidateByMetadata({
|
|
187
216
|
resourceType: "jira_issue",
|
|
188
217
|
resourceId: args.issueKey,
|
|
189
218
|
});
|
|
@@ -237,7 +266,7 @@ Example: jira_transition_issue(issueKey="PROJ-123", transitionName="Done", comme
|
|
|
237
266
|
try {
|
|
238
267
|
await requireClient().transitionIssue(args.issueKey, args.transitionName, args.comment, args.fields);
|
|
239
268
|
// Invalidate any cached buffers for this issue
|
|
240
|
-
|
|
269
|
+
getSessionBuffer().invalidateByMetadata({
|
|
241
270
|
resourceType: "jira_issue",
|
|
242
271
|
resourceId: args.issueKey,
|
|
243
272
|
});
|
|
@@ -276,7 +305,7 @@ Example: jira_add_comment(issueKey="PROJ-123", comment="Analysis complete. Ready
|
|
|
276
305
|
try {
|
|
277
306
|
const result = await requireClient().addComment(args.issueKey, args.comment, args.visibility);
|
|
278
307
|
// Invalidate any cached buffers for this issue (comments are part of issue data)
|
|
279
|
-
|
|
308
|
+
getSessionBuffer().invalidateByMetadata({
|
|
280
309
|
resourceType: "jira_issue",
|
|
281
310
|
resourceId: args.issueKey,
|
|
282
311
|
});
|
|
@@ -307,8 +336,11 @@ Example: jira_get_issue_comments(issueKey="PROJ-123")`,
|
|
|
307
336
|
handler: async (args) => {
|
|
308
337
|
try {
|
|
309
338
|
const result = await requireClient().getComments(args.issueKey, args.orderBy);
|
|
310
|
-
|
|
339
|
+
// Flatten comments to match jira_comment schema
|
|
340
|
+
const comments = (result.comments || result || []).map(formatCommentMetadata);
|
|
341
|
+
return formatSuccessJson(comments, {
|
|
311
342
|
resourceType: "jira_comments",
|
|
343
|
+
schemaType: "jira_comment",
|
|
312
344
|
title: `${args.issueKey} comments`,
|
|
313
345
|
issueKey: args.issueKey,
|
|
314
346
|
});
|
|
@@ -335,8 +367,11 @@ Example: jira_list_projects()`,
|
|
|
335
367
|
handler: async (args) => {
|
|
336
368
|
try {
|
|
337
369
|
const result = await requireClient().listProjects(args.recent, args.expand);
|
|
338
|
-
|
|
370
|
+
// Flatten projects to match jira_project schema
|
|
371
|
+
const projects = (result || []).map(formatProjectMetadata);
|
|
372
|
+
return formatSuccessJson(projects, {
|
|
339
373
|
resourceType: "jira_projects",
|
|
374
|
+
schemaType: "jira_project",
|
|
340
375
|
title: args.recent ? "Recent Projects" : "All Projects",
|
|
341
376
|
});
|
|
342
377
|
}
|
|
@@ -362,8 +397,13 @@ Example: jira_get_project(projectKey="PROJ")`,
|
|
|
362
397
|
handler: async (args) => {
|
|
363
398
|
try {
|
|
364
399
|
const result = await requireClient().getProject(args.projectKey, args.expand);
|
|
365
|
-
|
|
400
|
+
// Flatten project to match jira_project schema, keep raw data for extra fields
|
|
401
|
+
return formatSuccessJson({
|
|
402
|
+
...formatProjectMetadata(result),
|
|
403
|
+
data: result,
|
|
404
|
+
}, {
|
|
366
405
|
resourceType: "jira_project",
|
|
406
|
+
schemaType: "jira_project",
|
|
367
407
|
title: result.name || args.projectKey,
|
|
368
408
|
projectKey: args.projectKey,
|
|
369
409
|
});
|
|
@@ -516,6 +556,38 @@ Example: jira_link_issues(issueKey="PROJ-123", linkedIssueKey="PROJ-456", linkTy
|
|
|
516
556
|
}
|
|
517
557
|
},
|
|
518
558
|
},
|
|
559
|
+
jira_list_boards: {
|
|
560
|
+
description: `List all Jira Agile boards. Entry point for discovering boards.
|
|
561
|
+
|
|
562
|
+
View all Scrum and Kanban boards with optional filtering by project, type, or name.
|
|
563
|
+
|
|
564
|
+
RETURNS: bufferId with board list (id, name, type, projectKey)
|
|
565
|
+
NEXT: jira_get_sprints (for Scrum boards), jira_search_issues (with board filter)
|
|
566
|
+
|
|
567
|
+
Example: jira_list_boards()
|
|
568
|
+
Example: jira_list_boards(projectKeyOrId="PROJ")
|
|
569
|
+
Example: jira_list_boards(type="scrum")`,
|
|
570
|
+
inputSchema: z.object({
|
|
571
|
+
projectKeyOrId: z.string().optional().describe("Filter by project key or ID"),
|
|
572
|
+
type: z.enum(["scrum", "kanban"]).optional().describe("Filter by board type"),
|
|
573
|
+
name: z.string().optional().describe("Filter by board name (contains)"),
|
|
574
|
+
}),
|
|
575
|
+
handler: async (args) => {
|
|
576
|
+
try {
|
|
577
|
+
const result = await requireClient().listBoards(args);
|
|
578
|
+
const boards = (result.values || []).map(formatBoardMetadata);
|
|
579
|
+
return formatSuccessJson(boards, {
|
|
580
|
+
resourceType: "jira_boards",
|
|
581
|
+
schemaType: "jira_board",
|
|
582
|
+
title: "Jira Boards",
|
|
583
|
+
total: result.total,
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
catch (error) {
|
|
587
|
+
return formatError(isApiError(error) ? error : new Error(String(error)));
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
},
|
|
519
591
|
jira_get_board: {
|
|
520
592
|
description: `Get information about an Agile board (Scrum or Kanban).
|
|
521
593
|
|
|
@@ -532,8 +604,13 @@ Example: jira_get_board(boardId=123)`,
|
|
|
532
604
|
handler: async (args) => {
|
|
533
605
|
try {
|
|
534
606
|
const result = await requireClient().getBoard(args.boardId);
|
|
535
|
-
|
|
607
|
+
// Flatten board to match jira_board schema, keep raw data for extra fields
|
|
608
|
+
return formatSuccessJson({
|
|
609
|
+
...formatBoardMetadata(result),
|
|
610
|
+
data: result,
|
|
611
|
+
}, {
|
|
536
612
|
resourceType: "jira_board",
|
|
613
|
+
schemaType: "jira_board",
|
|
537
614
|
title: result.name || `Board #${args.boardId}`,
|
|
538
615
|
boardId: args.boardId,
|
|
539
616
|
});
|
|
@@ -563,8 +640,11 @@ Example: jira_get_sprints(boardId=123, state="active")`,
|
|
|
563
640
|
handler: async (args) => {
|
|
564
641
|
try {
|
|
565
642
|
const result = await requireClient().getSprints(args.boardId, args.state);
|
|
566
|
-
|
|
643
|
+
// Flatten sprints to match jira_sprint schema
|
|
644
|
+
const sprints = (result.values || result || []).map(formatSprintMetadata);
|
|
645
|
+
return formatSuccessJson(sprints, {
|
|
567
646
|
resourceType: "jira_sprints",
|
|
647
|
+
schemaType: "jira_sprint",
|
|
568
648
|
title: `Board #${args.boardId} sprints${args.state ? ` (${args.state})` : ""}`,
|
|
569
649
|
boardId: args.boardId,
|
|
570
650
|
});
|
|
@@ -581,7 +661,7 @@ Retrieve sprint backlog for analysis or reporting.
|
|
|
581
661
|
|
|
582
662
|
REQUIRES: sprintId (from jira_get_sprints)
|
|
583
663
|
RETURNS: bufferId with issues array
|
|
584
|
-
NEXT:
|
|
664
|
+
NEXT: buffer_transform (for sprint report), buffer_get_items (for analysis)
|
|
585
665
|
|
|
586
666
|
Example: jira_get_sprint_issues(sprintId=456)`,
|
|
587
667
|
inputSchema: z.object({
|
|
@@ -590,8 +670,11 @@ Example: jira_get_sprint_issues(sprintId=456)`,
|
|
|
590
670
|
handler: async (args) => {
|
|
591
671
|
try {
|
|
592
672
|
const result = await requireClient().getSprintIssues(args.sprintId);
|
|
593
|
-
|
|
673
|
+
// Flatten issues to match jira_issue schema
|
|
674
|
+
const issues = (result.issues || result || []).map(formatIssueMetadata);
|
|
675
|
+
return formatSuccessJson(issues, {
|
|
594
676
|
resourceType: "jira_sprint_issues",
|
|
677
|
+
schemaType: "jira_issue",
|
|
595
678
|
title: `Sprint #${args.sprintId} issues`,
|
|
596
679
|
sprintId: args.sprintId,
|
|
597
680
|
});
|
|
@@ -640,16 +723,19 @@ Example: jira_get_issue_worklogs(issueKey="PROJ-123")`,
|
|
|
640
723
|
handler: async (args) => {
|
|
641
724
|
try {
|
|
642
725
|
const result = await requireClient().getIssueWorklogs(args.issueKey);
|
|
726
|
+
// Flatten worklogs to match jira_worklog schema
|
|
727
|
+
const worklogs = (result.worklogs || []).map((w) => formatWorklogMetadata(w, args.issueKey));
|
|
643
728
|
// Calculate total time spent
|
|
644
|
-
const totalSeconds = result.worklogs.reduce((sum, w) => sum + (w.timeSpentSeconds || 0), 0);
|
|
729
|
+
const totalSeconds = (result.worklogs || []).reduce((sum, w) => sum + (w.timeSpentSeconds || 0), 0);
|
|
645
730
|
return formatSuccessJson({
|
|
646
731
|
issueKey: args.issueKey,
|
|
647
732
|
worklogCount: result.total,
|
|
648
733
|
totalTimeSpentSeconds: totalSeconds,
|
|
649
734
|
totalTimeSpent: formatTimeSpent(totalSeconds),
|
|
650
|
-
worklogs
|
|
735
|
+
worklogs,
|
|
651
736
|
}, {
|
|
652
737
|
resourceType: "jira_worklogs",
|
|
738
|
+
schemaType: "jira_worklog",
|
|
653
739
|
title: `${args.issueKey} worklogs`,
|
|
654
740
|
issueKey: args.issueKey,
|
|
655
741
|
});
|
|
@@ -666,7 +752,7 @@ Aggregates time from subtasks and Epic children. Ideal for Epic time reports.
|
|
|
666
752
|
|
|
667
753
|
REQUIRES: issueKey (works best with Epics)
|
|
668
754
|
RETURNS: bufferId with breakdown by issue, totalTimeSpent, issueCount
|
|
669
|
-
NEXT:
|
|
755
|
+
NEXT: buffer_transform (for time report), workload_sum (for calculations)
|
|
670
756
|
|
|
671
757
|
Example: jira_get_total_worklogs(issueKey="PROJ-100") - returns all time on Epic + stories + tasks`,
|
|
672
758
|
inputSchema: z.object({
|
|
@@ -677,6 +763,7 @@ Example: jira_get_total_worklogs(issueKey="PROJ-100") - returns all time on Epic
|
|
|
677
763
|
const result = await requireClient().getTotalWorklogs(args.issueKey);
|
|
678
764
|
return formatSuccessJson(result, {
|
|
679
765
|
resourceType: "jira_worklogs_total",
|
|
766
|
+
schemaType: "jira_worklog_total",
|
|
680
767
|
title: `${args.issueKey} total worklogs (recursive)`,
|
|
681
768
|
issueKey: args.issueKey,
|
|
682
769
|
});
|
|
@@ -696,7 +783,7 @@ Automatically detects Epic Link and Parent Link fields. Handles:
|
|
|
696
783
|
|
|
697
784
|
REQUIRES: parentKey (Epic, Initiative, or any parent issue)
|
|
698
785
|
RETURNS: bufferId with child issues (same format as jira_search_issues)
|
|
699
|
-
NEXT:
|
|
786
|
+
NEXT: buffer_transform (for reports), buffer_get_items (for analysis), jira_analyze_epic (for deep analysis)
|
|
700
787
|
|
|
701
788
|
Example: jira_list_epic_children(parentKey="PROJ-100")
|
|
702
789
|
Example: jira_list_epic_children(parentKey="PROJ-100", status="open", type="Story")`,
|
|
@@ -786,8 +873,11 @@ Example: jira_list_epic_children(parentKey="PROJ-100", status="open", type="Stor
|
|
|
786
873
|
};
|
|
787
874
|
await collectRecursive(allChildren.map(i => i.key));
|
|
788
875
|
}
|
|
876
|
+
// Flatten issues to match jira_issue schema
|
|
877
|
+
const flattenedChildren = allChildren.map(formatIssueMetadata);
|
|
789
878
|
const metadata = {
|
|
790
879
|
resourceType: "jira_epic_children",
|
|
880
|
+
schemaType: "jira_issue",
|
|
791
881
|
title: `Children of ${parentKey}`,
|
|
792
882
|
parentKey,
|
|
793
883
|
recursive,
|
|
@@ -796,7 +886,7 @@ Example: jira_list_epic_children(parentKey="PROJ-100", status="open", type="Stor
|
|
|
796
886
|
status: args.status || "all",
|
|
797
887
|
},
|
|
798
888
|
};
|
|
799
|
-
return formatSuccessJson(
|
|
889
|
+
return formatSuccessJson(flattenedChildren, metadata);
|
|
800
890
|
}
|
|
801
891
|
catch (error) {
|
|
802
892
|
return formatError(isApiError(error) ? error : new Error(String(error)));
|