@pschroee/redmine-mcp 0.3.2 → 0.3.3
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.js +22 -2
- package/dist/server.js +1 -1
- package/dist/tools/core.js +1 -1
- package/package.json +1 -1
package/dist/redmine/client.js
CHANGED
|
@@ -48,9 +48,29 @@ export class RedmineClient {
|
|
|
48
48
|
}
|
|
49
49
|
// ==================== ISSUES ====================
|
|
50
50
|
async listIssues(params) {
|
|
51
|
+
let projectId = params?.project_id;
|
|
52
|
+
// Auto-fetch project_id from query if query_id is provided without project_id
|
|
53
|
+
if (params?.query_id && !projectId) {
|
|
54
|
+
const queriesResult = await this.listQueries();
|
|
55
|
+
if ("error" in queriesResult) {
|
|
56
|
+
return queriesResult;
|
|
57
|
+
}
|
|
58
|
+
const savedQuery = queriesResult.queries.find(q => q.id === params.query_id);
|
|
59
|
+
if (!savedQuery) {
|
|
60
|
+
return {
|
|
61
|
+
error: true,
|
|
62
|
+
status: 404,
|
|
63
|
+
message: `Query with ID ${params.query_id} not found`,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
// Use the query's project_id if it has one (project-specific query)
|
|
67
|
+
if (savedQuery.project_id) {
|
|
68
|
+
projectId = savedQuery.project_id;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
51
71
|
const query = new URLSearchParams();
|
|
52
|
-
if (
|
|
53
|
-
query.set("project_id", String(
|
|
72
|
+
if (projectId)
|
|
73
|
+
query.set("project_id", String(projectId));
|
|
54
74
|
if (params?.subproject_id)
|
|
55
75
|
query.set("subproject_id", params.subproject_id);
|
|
56
76
|
if (params?.tracker_id)
|
package/dist/server.js
CHANGED
|
@@ -3,7 +3,7 @@ import { registerTools } from "./tools/index.js";
|
|
|
3
3
|
export function createServer(redmineClient, toolGroups) {
|
|
4
4
|
const server = new McpServer({
|
|
5
5
|
name: "redmine-mcp",
|
|
6
|
-
version: "0.3.
|
|
6
|
+
version: "0.3.3",
|
|
7
7
|
});
|
|
8
8
|
registerTools(server, redmineClient, toolGroups);
|
|
9
9
|
return server;
|
package/dist/tools/core.js
CHANGED
|
@@ -19,7 +19,7 @@ export function registerCoreTools(server, client) {
|
|
|
19
19
|
include: z.string().optional().describe("Include associated data: attachments, relations, journals, watchers, children"),
|
|
20
20
|
limit: z.number().optional().describe("Maximum results (default 25, max 100)"),
|
|
21
21
|
offset: z.number().optional().describe("Skip first N results"),
|
|
22
|
-
query_id: z.number().optional().describe("Use a saved query ID to filter issues (get IDs from list_queries)"),
|
|
22
|
+
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."),
|
|
23
23
|
},
|
|
24
24
|
}, async (params) => {
|
|
25
25
|
const result = await client.listIssues(params);
|