@zereight/mcp-gitlab 1.0.19 → 1.0.20
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 +1 -16
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -1307,22 +1307,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1307
1307
|
}
|
|
1308
1308
|
case "list_projects": {
|
|
1309
1309
|
const args = ListProjectsSchema.parse(request.params.arguments);
|
|
1310
|
-
const
|
|
1311
|
-
// Add query parameters for filtering
|
|
1312
|
-
Object.entries(args).forEach(([key, value]) => {
|
|
1313
|
-
if (value !== undefined) {
|
|
1314
|
-
url.searchParams.append(key, value.toString());
|
|
1315
|
-
}
|
|
1316
|
-
});
|
|
1317
|
-
const response = await fetch(url.toString(), {
|
|
1318
|
-
method: "GET",
|
|
1319
|
-
headers: DEFAULT_HEADERS,
|
|
1320
|
-
});
|
|
1321
|
-
// Handle errors
|
|
1322
|
-
await handleGitLabError(response);
|
|
1323
|
-
// Parse and return the data
|
|
1324
|
-
const data = await response.json();
|
|
1325
|
-
const projects = z.array(GitLabProjectSchema).parse(data);
|
|
1310
|
+
const projects = await listProjects(args);
|
|
1326
1311
|
return {
|
|
1327
1312
|
content: [{ type: "text", text: JSON.stringify(projects, null, 2) }],
|
|
1328
1313
|
};
|