@aaronsb/jira-cloud-mcp 0.4.0 → 0.4.1
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.
|
@@ -20,6 +20,7 @@ export function createQueueHandler(handlers, jiraHost) {
|
|
|
20
20
|
throw new McpError(ErrorCode.InvalidParams, 'Missing required parameter: operations (array)');
|
|
21
21
|
}
|
|
22
22
|
const operations = args.operations;
|
|
23
|
+
const detail = args.detail === 'full' ? 'full' : 'summary';
|
|
23
24
|
if (operations.length === 0) {
|
|
24
25
|
throw new McpError(ErrorCode.InvalidParams, 'Operations list is empty.');
|
|
25
26
|
}
|
|
@@ -100,7 +101,7 @@ export function createQueueHandler(handlers, jiraHost) {
|
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
return {
|
|
103
|
-
content: [{ type: 'text', text: formatResults(results, operations.length, bailedAt) }],
|
|
104
|
+
content: [{ type: 'text', text: formatResults(results, operations.length, bailedAt, detail) }],
|
|
104
105
|
};
|
|
105
106
|
};
|
|
106
107
|
}
|
|
@@ -222,8 +223,8 @@ function firstLine(text) {
|
|
|
222
223
|
}
|
|
223
224
|
return stripped.slice(0, 100);
|
|
224
225
|
}
|
|
225
|
-
/** Format the queue results
|
|
226
|
-
function formatResults(results, total, bailedAt) {
|
|
226
|
+
/** Format the queue results */
|
|
227
|
+
function formatResults(results, total, bailedAt, detail = 'summary') {
|
|
227
228
|
const success = results.filter(r => r.status === 'success').length;
|
|
228
229
|
const errors = results.filter(r => r.status === 'error').length;
|
|
229
230
|
const skipped = results.filter(r => r.status === 'skipped').length;
|
|
@@ -233,11 +234,29 @@ function formatResults(results, total, bailedAt) {
|
|
|
233
234
|
if (bailedAt >= 0) {
|
|
234
235
|
lines.push(`Stopped at operation ${bailedAt + 1} due to error.`);
|
|
235
236
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
if (detail === 'full') {
|
|
238
|
+
for (const r of results) {
|
|
239
|
+
const icon = r.status === 'success' ? 'ok' : r.status === 'error' ? 'ERR' : 'SKIP';
|
|
240
|
+
lines.push('');
|
|
241
|
+
lines.push(`---`);
|
|
242
|
+
lines.push(`**[${r.index + 1}] ${icon}**`);
|
|
243
|
+
if (r.status === 'skipped') {
|
|
244
|
+
lines.push(r.text);
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
lines.push(stripNextSteps(r.text));
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
lines.push('');
|
|
253
|
+
for (const r of results) {
|
|
254
|
+
const icon = r.status === 'success' ? 'ok' : r.status === 'error' ? 'ERR' : 'SKIP';
|
|
255
|
+
const summary = r.status === 'skipped' ? r.text : firstLine(r.text);
|
|
256
|
+
lines.push(` [${r.index + 1}] ${icon}: ${summary}`);
|
|
257
|
+
}
|
|
258
|
+
lines.push('');
|
|
259
|
+
lines.push('_Use `detail: "full"` for complete output from each operation._');
|
|
241
260
|
}
|
|
242
261
|
// Consolidated next-step: use the last successful operation's context
|
|
243
262
|
const lastSuccess = [...results].reverse().find(r => r.status === 'success');
|
|
@@ -352,6 +352,12 @@ export const toolSchemas = {
|
|
|
352
352
|
description: 'Ordered list of operations to execute (max 10).',
|
|
353
353
|
maxItems: 10,
|
|
354
354
|
},
|
|
355
|
+
detail: {
|
|
356
|
+
type: 'string',
|
|
357
|
+
enum: ['full', 'summary'],
|
|
358
|
+
description: 'Result detail level. summary (default): one-line status per operation. full: complete output matching individual tool calls. Use full when summary lacks needed detail.',
|
|
359
|
+
default: 'summary',
|
|
360
|
+
},
|
|
355
361
|
},
|
|
356
362
|
required: ['operations'],
|
|
357
363
|
},
|
package/package.json
CHANGED