@pschroee/redmine-mcp 0.5.14 → 0.5.16
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/dist/redmine/client.d.ts +1 -0
- package/dist/redmine/client.js +2 -0
- package/dist/tools/core.js +13 -0
- package/package.json +1 -1
package/dist/redmine/client.d.ts
CHANGED
package/dist/redmine/client.js
CHANGED
|
@@ -109,6 +109,8 @@ export class RedmineClient {
|
|
|
109
109
|
query.set("offset", String(params.offset));
|
|
110
110
|
if (params?.query_id)
|
|
111
111
|
query.set("query_id", String(params.query_id));
|
|
112
|
+
if (params?.tags)
|
|
113
|
+
query.set("tags", params.tags);
|
|
112
114
|
const queryString = query.toString();
|
|
113
115
|
const path = `/issues.json${queryString ? `?${queryString}` : ""}`;
|
|
114
116
|
return this.request("GET", path);
|
package/dist/tools/core.js
CHANGED
|
@@ -21,6 +21,8 @@ export function registerCoreTools(server, client) {
|
|
|
21
21
|
limit: z.number().optional().describe("Maximum results (default 25, max 100)"),
|
|
22
22
|
offset: z.number().optional().describe("Skip first N results"),
|
|
23
23
|
query_id: z.number().optional().describe("Use a saved query ID to filter issues (get IDs from list_queries). For project-specific queries, project_id is automatically fetched from the query if not provided."),
|
|
24
|
+
tags: z.string().optional().describe("Filter by tags (comma-separated tag names, requires redmine_tags plugin)"),
|
|
25
|
+
fetch_tags: z.boolean().optional().default(true).describe("Fetch tags for each issue via individual API calls (slower but shows Tags column, requires redmine_tags plugin)"),
|
|
24
26
|
},
|
|
25
27
|
}, async (params) => {
|
|
26
28
|
const result = await client.listIssues(params);
|
|
@@ -29,6 +31,17 @@ export function registerCoreTools(server, client) {
|
|
|
29
31
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
30
32
|
};
|
|
31
33
|
}
|
|
34
|
+
// Fetch tags for each issue if requested
|
|
35
|
+
if (params.fetch_tags && result.issues.length > 0) {
|
|
36
|
+
const enrichedIssues = await Promise.all(result.issues.map(async (issue) => {
|
|
37
|
+
const detailResult = await client.getIssue(issue.id);
|
|
38
|
+
if (!("error" in detailResult) && detailResult.issue.tags) {
|
|
39
|
+
return { ...issue, tags: detailResult.issue.tags };
|
|
40
|
+
}
|
|
41
|
+
return issue;
|
|
42
|
+
}));
|
|
43
|
+
result.issues = enrichedIssues;
|
|
44
|
+
}
|
|
32
45
|
return {
|
|
33
46
|
content: [{ type: "text", text: formatIssueList(result) }],
|
|
34
47
|
};
|