@zereight/mcp-gitlab 1.0.57 → 1.0.59
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 +1 -1
- package/build/index.js +15 -8
- package/build/schemas.js +6 -5
- package/package.json +1 -1
package/README.md
CHANGED
package/build/index.js
CHANGED
|
@@ -695,14 +695,19 @@ async function listIssues(projectId, options = {}) {
|
|
|
695
695
|
// Add all query parameters
|
|
696
696
|
Object.entries(options).forEach(([key, value]) => {
|
|
697
697
|
if (value !== undefined) {
|
|
698
|
-
if (key === "labels"
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
698
|
+
if (key === "labels") {
|
|
699
|
+
if (Array.isArray(value)) {
|
|
700
|
+
// Handle array of labels
|
|
701
|
+
value.forEach(label => {
|
|
702
|
+
url.searchParams.append("labels[]", label.toString());
|
|
703
|
+
});
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
706
|
+
url.searchParams.append("labels[]", value.toString());
|
|
707
|
+
}
|
|
703
708
|
}
|
|
704
709
|
else {
|
|
705
|
-
url.searchParams.append(
|
|
710
|
+
url.searchParams.append(key, value.toString());
|
|
706
711
|
}
|
|
707
712
|
}
|
|
708
713
|
});
|
|
@@ -1780,6 +1785,8 @@ async function listWikiPages(projectId, options = {}) {
|
|
|
1780
1785
|
url.searchParams.append("page", options.page.toString());
|
|
1781
1786
|
if (options.per_page)
|
|
1782
1787
|
url.searchParams.append("per_page", options.per_page.toString());
|
|
1788
|
+
if (options.with_content)
|
|
1789
|
+
url.searchParams.append("with_content", options.with_content.toString());
|
|
1783
1790
|
const response = await fetch(url.toString(), {
|
|
1784
1791
|
...DEFAULT_FETCH_CONFIG,
|
|
1785
1792
|
});
|
|
@@ -2701,8 +2708,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
2701
2708
|
};
|
|
2702
2709
|
}
|
|
2703
2710
|
case "list_wiki_pages": {
|
|
2704
|
-
const { project_id, page, per_page } = ListWikiPagesSchema.parse(request.params.arguments);
|
|
2705
|
-
const wikiPages = await listWikiPages(project_id, { page, per_page });
|
|
2711
|
+
const { project_id, page, per_page, with_content } = ListWikiPagesSchema.parse(request.params.arguments);
|
|
2712
|
+
const wikiPages = await listWikiPages(project_id, { page, per_page, with_content });
|
|
2706
2713
|
return {
|
|
2707
2714
|
content: [{ type: "text", text: JSON.stringify(wikiPages, null, 2) }],
|
|
2708
2715
|
};
|
package/build/schemas.js
CHANGED
|
@@ -194,7 +194,7 @@ export const GitLabUsersResponseSchema = z.record(z.string(), z.object({
|
|
|
194
194
|
id: z.number(),
|
|
195
195
|
username: z.string(),
|
|
196
196
|
name: z.string(),
|
|
197
|
-
avatar_url: z.string(),
|
|
197
|
+
avatar_url: z.string().nullable(),
|
|
198
198
|
web_url: z.string(),
|
|
199
199
|
}).nullable());
|
|
200
200
|
// Namespace related schemas
|
|
@@ -230,7 +230,7 @@ export const GitLabNamespaceExistsResponseSchema = z.object({
|
|
|
230
230
|
export const GitLabOwnerSchema = z.object({
|
|
231
231
|
username: z.string(), // Changed from login to match GitLab API
|
|
232
232
|
id: z.number(),
|
|
233
|
-
avatar_url: z.string(),
|
|
233
|
+
avatar_url: z.string().nullable(),
|
|
234
234
|
web_url: z.string(), // Changed from html_url to match GitLab API
|
|
235
235
|
name: z.string(), // Added as GitLab includes full name
|
|
236
236
|
state: z.string(), // Added as GitLab includes user state
|
|
@@ -543,7 +543,7 @@ export const GitLabForkParentSchema = z.object({
|
|
|
543
543
|
.object({
|
|
544
544
|
username: z.string(), // Changed from login to match GitLab API
|
|
545
545
|
id: z.number(),
|
|
546
|
-
avatar_url: z.string(),
|
|
546
|
+
avatar_url: z.string().nullable(),
|
|
547
547
|
})
|
|
548
548
|
.optional(), // Made optional to handle cases where GitLab API doesn't include it
|
|
549
549
|
web_url: z.string(), // Changed from html_url to match GitLab API
|
|
@@ -826,7 +826,7 @@ export const CreateNoteSchema = z.object({
|
|
|
826
826
|
export const ListIssuesSchema = z.object({
|
|
827
827
|
project_id: z.string().describe("Project ID or URL-encoded path"),
|
|
828
828
|
assignee_id: z.number().optional().describe("Return issues assigned to the given user ID"),
|
|
829
|
-
assignee_username: z.string().optional().describe("Return issues assigned to the given username"),
|
|
829
|
+
assignee_username: z.array(z.string()).optional().describe("Return issues assigned to the given username"),
|
|
830
830
|
author_id: z.number().optional().describe("Return issues created by the given user ID"),
|
|
831
831
|
author_username: z.string().optional().describe("Return issues created by the given username"),
|
|
832
832
|
confidential: z.boolean().optional().describe("Filter confidential or public issues"),
|
|
@@ -1086,6 +1086,7 @@ export const ListGroupProjectsSchema = z.object({
|
|
|
1086
1086
|
// Add wiki operation schemas
|
|
1087
1087
|
export const ListWikiPagesSchema = z.object({
|
|
1088
1088
|
project_id: z.string().describe("Project ID or URL-encoded path"),
|
|
1089
|
+
with_content: z.boolean().optional().describe("Include content of the wiki pages"),
|
|
1089
1090
|
}).merge(PaginationOptionsSchema);
|
|
1090
1091
|
export const GetWikiPageSchema = z.object({
|
|
1091
1092
|
project_id: z.string().describe("Project ID or URL-encoded path"),
|
|
@@ -1113,7 +1114,7 @@ export const GitLabWikiPageSchema = z.object({
|
|
|
1113
1114
|
title: z.string(),
|
|
1114
1115
|
slug: z.string(),
|
|
1115
1116
|
format: z.string(),
|
|
1116
|
-
content: z.string(),
|
|
1117
|
+
content: z.string().optional(),
|
|
1117
1118
|
created_at: z.string().optional(),
|
|
1118
1119
|
updated_at: z.string().optional(),
|
|
1119
1120
|
});
|