@zereight/mcp-gitlab 2.0.24 → 2.0.25
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/build/index.js +8 -2
- package/build/schemas.js +2 -0
- package/package.json +3 -2
package/build/index.js
CHANGED
|
@@ -1815,7 +1815,7 @@ async function getMergeRequestNote(projectId, mergeRequestIid, noteId) {
|
|
|
1815
1815
|
const data = await response.json();
|
|
1816
1816
|
return GitLabDiscussionNoteSchema.parse(data);
|
|
1817
1817
|
}
|
|
1818
|
-
async function getMergeRequestNotes(projectId, mergeRequestIid, sort, order_by) {
|
|
1818
|
+
async function getMergeRequestNotes(projectId, mergeRequestIid, sort, order_by, per_page, page) {
|
|
1819
1819
|
projectId = decodeURIComponent(projectId); // Decode project ID
|
|
1820
1820
|
const url = new URL(`${getEffectiveApiUrl()}/projects/${encodeURIComponent(getEffectiveProjectId(projectId))}/merge_requests/${mergeRequestIid}/notes`);
|
|
1821
1821
|
if (sort) {
|
|
@@ -1824,6 +1824,12 @@ async function getMergeRequestNotes(projectId, mergeRequestIid, sort, order_by)
|
|
|
1824
1824
|
if (order_by) {
|
|
1825
1825
|
url.searchParams.append("order_by", order_by);
|
|
1826
1826
|
}
|
|
1827
|
+
if (per_page) {
|
|
1828
|
+
url.searchParams.append("per_page", per_page.toString());
|
|
1829
|
+
}
|
|
1830
|
+
if (page) {
|
|
1831
|
+
url.searchParams.append("page", page.toString());
|
|
1832
|
+
}
|
|
1827
1833
|
const response = await fetch(url.toString(), {
|
|
1828
1834
|
...getFetchConfig(),
|
|
1829
1835
|
method: "GET",
|
|
@@ -4279,7 +4285,7 @@ async function handleToolCall(params) {
|
|
|
4279
4285
|
}
|
|
4280
4286
|
case "get_merge_request_notes": {
|
|
4281
4287
|
const args = GetMergeRequestNotesSchema.parse(params.arguments);
|
|
4282
|
-
const notes = await getMergeRequestNotes(args.project_id, args.merge_request_iid, args.sort, args.order_by);
|
|
4288
|
+
const notes = await getMergeRequestNotes(args.project_id, args.merge_request_iid, args.sort, args.order_by, args.per_page, args.page);
|
|
4283
4289
|
return {
|
|
4284
4290
|
content: [{ type: "text", text: JSON.stringify(notes, null, 2) }],
|
|
4285
4291
|
};
|
package/build/schemas.js
CHANGED
|
@@ -856,6 +856,8 @@ export const GetMergeRequestNotesSchema = ProjectParamsSchema.extend({
|
|
|
856
856
|
merge_request_iid: z.coerce.string().describe("The IID of a merge request"),
|
|
857
857
|
sort: z.enum(["asc", "desc"]).optional().describe("The sort order of the notes"),
|
|
858
858
|
order_by: z.enum(["created_at", "updated_at"]).optional().describe("The field to sort the notes by"),
|
|
859
|
+
per_page: z.coerce.number().optional().describe("Number of items per page"),
|
|
860
|
+
page: z.coerce.number().optional().describe("Page number for pagination"),
|
|
859
861
|
});
|
|
860
862
|
export const GetMergeRequestNoteSchema = ProjectParamsSchema.extend({
|
|
861
863
|
merge_request_iid: z.coerce.string().describe("The IID of a merge request"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zereight/mcp-gitlab",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.25",
|
|
4
4
|
"description": "MCP server for using the GitLab API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "zereight",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"format:check": "prettier --check \"**/*.{js,ts,json,md}\""
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
+
"@modelcontextprotocol/sdk": "^1.24.2",
|
|
44
45
|
"@types/node-fetch": "^2.6.12",
|
|
45
46
|
"express": "^5.1.0",
|
|
46
47
|
"fetch-cookie": "^3.1.0",
|
|
@@ -53,9 +54,9 @@
|
|
|
53
54
|
"pino-pretty": "^13.0.0",
|
|
54
55
|
"pkce-challenge": "^5.0.0",
|
|
55
56
|
"socks-proxy-agent": "^8.0.5",
|
|
57
|
+
"tldts": "^6.1.86",
|
|
56
58
|
"tough-cookie": "^5.1.2",
|
|
57
59
|
"zod": "^3.24.2",
|
|
58
|
-
"@modelcontextprotocol/sdk": "^1.24.2",
|
|
59
60
|
"zod-to-json-schema": "3.24.5"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|