From 067586c665bd81ad4695c2fbbab5582b67e77cb2 Mon Sep 17 00:00:00 2001 From: Martim Pimentel Date: Wed, 21 May 2025 20:03:44 +0100 Subject: [PATCH 1/8] fix: add package-lock.json to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 323a40d..6440fcf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules .DS_Store -build \ No newline at end of file +build +package-lock.json \ No newline at end of file From 808c34d0ee04fd4ec95e77dce040b3a18036e347 Mon Sep 17 00:00:00 2001 From: Martim Pimentel Date: Wed, 21 May 2025 20:04:42 +0100 Subject: [PATCH 2/8] feat: get merge request default description template on project retrieval --- schemas.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/schemas.ts b/schemas.ts index 071ee5f..4df6edb 100644 --- a/schemas.ts +++ b/schemas.ts @@ -103,6 +103,7 @@ export const GitLabRepositorySchema = z.object({ container_registry_access_level: z.string().optional(), issues_enabled: z.boolean().optional(), merge_requests_enabled: z.boolean().optional(), + merge_requests_template: z.string().optional(), wiki_enabled: z.boolean().optional(), jobs_enabled: z.boolean().optional(), snippets_enabled: z.boolean().optional(), From 005b46a1a66d2d72bc922f9f98f2df2f58c5f084 Mon Sep 17 00:00:00 2001 From: Martim Pimentel Date: Wed, 21 May 2025 22:18:06 +0100 Subject: [PATCH 3/8] feat: add user retrieval functions and schemas for GitLab API integration --- index.ts | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ schemas.ts | 34 +++++++++++++++++------ 2 files changed, 105 insertions(+), 8 deletions(-) diff --git a/index.ts b/index.ts index 1aaebee..502c188 100644 --- a/index.ts +++ b/index.ts @@ -37,6 +37,9 @@ import { GitLabNamespaceExistsResponseSchema, GitLabProjectSchema, GitLabLabelSchema, + GitLabUserSchema, + GitLabUsersResponseSchema, + GetUsersSchema, CreateRepositoryOptionsSchema, CreateIssueOptionsSchema, CreateMergeRequestOptionsSchema, @@ -108,6 +111,8 @@ import { type GitLabNamespaceExistsResponse, type GitLabProject, type GitLabLabel, + type GitLabUser, + type GitLabUsersResponse, // Discussion Types type GitLabDiscussionNote, // Added type GitLabDiscussion, @@ -418,6 +423,11 @@ const allTools = [ "Get the repository tree for a GitLab project (list files and directories)", inputSchema: zodToJsonSchema(GetRepositoryTreeSchema), }, + { + name: "get_users", + description: "Get GitLab user details by usernames", + inputSchema: zodToJsonSchema(GetUsersSchema), + }, ]; // Define which tools are read-only @@ -440,6 +450,7 @@ const readOnlyTools = [ "list_labels", "get_label", "list_group_projects", + "get_users", ]; // Define which tools are related to wiki and can be toggled by USE_GITLAB_WIKI @@ -2255,6 +2266,65 @@ async function getRepositoryTree( return z.array(GitLabTreeItemSchema).parse(data); } +/** + * Get a single user from GitLab + * + * @param {string} username - The username to look up + * @returns {Promise} The user data or null if not found + */ +async function getUser(username: string): Promise { + try { + const url = new URL(`${GITLAB_API_URL}/users`); + url.searchParams.append("username", username); + + const response = await fetch(url.toString(), { + ...DEFAULT_FETCH_CONFIG, + }); + + await handleGitLabError(response); + + const users = await response.json(); + + // GitLab returns an array of users that match the username + if (Array.isArray(users) && users.length > 0) { + // Find exact match for username (case-sensitive) + const exactMatch = users.find(user => user.username === username); + if (exactMatch) { + return GitLabUserSchema.parse(exactMatch); + } + } + + // No matching user found + return null; + } catch (error) { + console.error(`Error fetching user by username '${username}':`, error); + return null; + } +} + +/** + * Get multiple users from GitLab + * + * @param {string[]} usernames - Array of usernames to look up + * @returns {Promise} Object with usernames as keys and user objects or null as values + */ +async function getUsers(usernames: string[]): Promise { + const users: Record = {}; + + // Process usernames sequentially to avoid rate limiting + for (const username of usernames) { + try { + const user = await getUser(username); + users[username] = user; + } catch (error) { + console.error(`Error processing username '${username}':`, error); + users[username] = null; + } + } + + return GitLabUsersResponseSchema.parse(users); +} + server.setRequestHandler(ListToolsRequestSchema, async () => { // Apply read-only filter first const tools0 = GITLAB_READ_ONLY_MODE @@ -2621,6 +2691,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { content: [{ type: "text", text: JSON.stringify(projects, null, 2) }], }; } + + case "get_users": { + const args = GetUsersSchema.parse(request.params.arguments); + const usersMap = await getUsers(args.usernames); + + return { + content: [{ type: "text", text: JSON.stringify(usersMap, null, 2) }], + }; + } case "create_note": { const args = CreateNoteSchema.parse(request.params.arguments); diff --git a/schemas.ts b/schemas.ts index 4df6edb..4198432 100644 --- a/schemas.ts +++ b/schemas.ts @@ -7,6 +7,30 @@ export const GitLabAuthorSchema = z.object({ date: z.string(), }); +// User schemas +export const GitLabUserSchema = z.object({ + username: z.string(), // Changed from login to match GitLab API + id: z.number(), + name: z.string(), + avatar_url: z.string(), + web_url: z.string(), // Changed from html_url to match GitLab API +}); + +export const GetUsersSchema = z.object({ + usernames: z.array(z.string()).describe("Array of usernames to search for"), +}); + +export const GitLabUsersResponseSchema = z.record( + z.string(), + z.object({ + id: z.number(), + username: z.string(), + name: z.string(), + avatar_url: z.string(), + web_url: z.string(), + }).nullable() +); + // Namespace related schemas // Base schema for project-related operations @@ -283,14 +307,6 @@ export const GitLabLabelSchema = z.object({ is_project_label: z.boolean().optional(), }); -export const GitLabUserSchema = z.object({ - username: z.string(), // Changed from login to match GitLab API - id: z.number(), - name: z.string(), - avatar_url: z.string(), - web_url: z.string(), // Changed from html_url to match GitLab API -}); - export const GitLabMilestoneSchema = z.object({ id: z.number(), iid: z.number(), // Added to match GitLab API @@ -1103,3 +1119,5 @@ export type GetRepositoryTreeOptions = z.infer; export type MergeRequestThreadPosition = z.infer; export type CreateMergeRequestThreadOptions = z.infer; export type CreateMergeRequestNoteOptions = z.infer; +export type GitLabUser = z.infer; +export type GitLabUsersResponse = z.infer; From c834ebc135bf5896ab4f7982ae417f0c32d8ea42 Mon Sep 17 00:00:00 2001 From: Martim Pimentel Date: Thu, 22 May 2025 12:02:03 +0100 Subject: [PATCH 4/8] feat: add branch comparison functionality and update related schemas --- index.ts | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- schemas.ts | 50 ++++++++++++++++++++++++++++---------- 2 files changed, 105 insertions(+), 15 deletions(-) diff --git a/index.ts b/index.ts index 502c188..c4d2b35 100644 --- a/index.ts +++ b/index.ts @@ -53,7 +53,7 @@ import { CreateMergeRequestSchema, ForkRepositorySchema, CreateBranchSchema, - GitLabMergeRequestDiffSchema, + GitLabDiffSchema, GetMergeRequestSchema, GetMergeRequestDiffsSchema, UpdateMergeRequestSchema, @@ -126,6 +126,9 @@ import { GetRepositoryTreeSchema, type GitLabTreeItem, type GetRepositoryTreeOptions, + GitLabCompareResult, + GitLabCompareResultSchema, + GetBranchDiffsSchema, } from "./schemas.js"; /** @@ -261,6 +264,12 @@ const allTools = [ "Get the changes/diffs of a merge request (Either mergeRequestIid or branchName must be provided)", inputSchema: zodToJsonSchema(GetMergeRequestDiffsSchema), }, + { + name: "get_branch_diffs", + description: + "Get the changes/diffs between two branches or commits in a GitLab project", + inputSchema: zodToJsonSchema(GetBranchDiffsSchema), + }, { name: "update_merge_request", description: @@ -436,6 +445,7 @@ const readOnlyTools = [ "get_file_contents", "get_merge_request", "get_merge_request_diffs", + "get_branch_diffs", "mr_discussions", "list_issues", "get_issue", @@ -1552,7 +1562,50 @@ async function getMergeRequestDiffs( await handleGitLabError(response); const data = (await response.json()) as { changes: unknown }; - return z.array(GitLabMergeRequestDiffSchema).parse(data.changes); + return z.array(GitLabDiffSchema).parse(data.changes); +} + +/** + * Get branch comparison diffs + * + * @param {string} projectId - The ID or URL-encoded path of the project + * @param {string} from - The branch name or commit SHA to compare from + * @param {string} to - The branch name or commit SHA to compare to + * @param {boolean} [straight] - Comparison method: false for '...' (default), true for '--' + * @returns {Promise} Branch comparison results + */ +async function getBranchDiffs( + projectId: string, + from: string, + to: string, + straight?: boolean +): Promise { + projectId = decodeURIComponent(projectId); // Decode project ID + + const url = new URL( + `${GITLAB_API_URL}/projects/${encodeURIComponent(projectId)}/repository/compare` + ); + + url.searchParams.append("from", from); + url.searchParams.append("to", to); + + if (straight !== undefined) { + url.searchParams.append("straight", straight.toString()); + } + + const response = await fetch(url.toString(), { + ...DEFAULT_FETCH_CONFIG, + }); + + if (!response.ok) { + const errorBody = await response.text(); + throw new Error( + `GitLab API error: ${response.status} ${response.statusText}\n${errorBody}` + ); + } + + const data = await response.json(); + return GitLabCompareResultSchema.parse(data); } /** @@ -2414,6 +2467,19 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { }; } + case "get_branch_diffs": { + const args = GetBranchDiffsSchema.parse(request.params.arguments); + const diffs = await getBranchDiffs( + args.project_id, + args.from, + args.to, + args.straight + ); + return { + content: [{ type: "text", text: JSON.stringify(diffs, null, 2) }], + }; + } + case "search_repositories": { const args = SearchRepositoriesSchema.parse(request.params.arguments); const results = await searchProjects( diff --git a/schemas.ts b/schemas.ts index 4198432..41d1270 100644 --- a/schemas.ts +++ b/schemas.ts @@ -271,9 +271,15 @@ export const CreateMergeRequestOptionsSchema = z.object({ draft: z.boolean().optional(), }); -export const CreateBranchOptionsSchema = z.object({ - name: z.string(), // Changed from ref to match GitLab API - ref: z.string(), // The source branch/commit for the new branch +export const GitLabDiffSchema = z.object({ + old_path: z.string(), + new_path: z.string(), + a_mode: z.string(), + b_mode: z.string(), + diff: z.string(), + new_file: z.boolean(), + renamed_file: z.boolean(), + deleted_file: z.boolean(), }); // Response schemas for operations @@ -291,6 +297,27 @@ export const GitLabSearchResponseSchema = z.object({ items: z.array(GitLabRepositorySchema), }); +// create branch schemas +export const CreateBranchOptionsSchema = z.object({ + name: z.string(), // Changed from ref to match GitLab API + ref: z.string(), // The source branch/commit for the new branch +}); + +export const GitLabCompareResultSchema = z.object({ + commit: z.object({ + id: z.string().optional(), + short_id: z.string().optional(), + title: z.string().optional(), + author_name: z.string().optional(), + author_email: z.string().optional(), + created_at: z.string().optional(), + }).optional(), + commits: z.array(GitLabCommitSchema), + diffs: z.array(GitLabDiffSchema), + compare_timeout: z.boolean().optional(), + compare_same_ref: z.boolean().optional(), +}); + // Issue related schemas export const GitLabLabelSchema = z.object({ id: z.number(), @@ -596,20 +623,16 @@ export const ForkRepositorySchema = ProjectParamsSchema.extend({ namespace: z.string().optional().describe("Namespace to fork to (full path)"), }); +// Branch related schemas export const CreateBranchSchema = ProjectParamsSchema.extend({ branch: z.string().describe("Name for the new branch"), ref: z.string().optional().describe("Source branch/commit for new branch"), }); -export const GitLabMergeRequestDiffSchema = z.object({ - old_path: z.string(), - new_path: z.string(), - a_mode: z.string(), - b_mode: z.string(), - diff: z.string(), - new_file: z.boolean(), - renamed_file: z.boolean(), - deleted_file: z.boolean(), +export const GetBranchDiffsSchema = ProjectParamsSchema.extend({ + from: z.string().describe("The base branch or commit SHA to compare from"), + to: z.string().describe("The target branch or commit SHA to compare to"), + straight: z.boolean().optional().describe("Comparison method: false for '...' (default), true for '--'"), }); export const GetMergeRequestSchema = ProjectParamsSchema.extend({ @@ -1082,6 +1105,7 @@ export type GitLabDirectoryContent = z.infer< export type GitLabContent = z.infer; export type FileOperation = z.infer; export type GitLabTree = z.infer; +export type GitLabCompareResult = z.infer; export type GitLabCommit = z.infer; export type GitLabReference = z.infer; export type CreateRepositoryOptions = z.infer< @@ -1097,7 +1121,7 @@ export type GitLabCreateUpdateFileResponse = z.infer< >; export type GitLabSearchResponse = z.infer; export type GitLabMergeRequestDiff = z.infer< - typeof GitLabMergeRequestDiffSchema + typeof GitLabDiffSchema >; export type CreateNoteOptions = z.infer; export type GitLabIssueLink = z.infer; From 75fd5e83e095b218cd9230e7133d4716c51ffc9a Mon Sep 17 00:00:00 2001 From: Martim Pimentel Date: Thu, 22 May 2025 17:54:34 +0100 Subject: [PATCH 5/8] feat: add support for ignoring files in branch diff results using regex patterns --- index.ts | 19 +++++++++++++++++-- schemas.ts | 1 + 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index c4d2b35..0121014 100644 --- a/index.ts +++ b/index.ts @@ -2469,14 +2469,29 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { case "get_branch_diffs": { const args = GetBranchDiffsSchema.parse(request.params.arguments); - const diffs = await getBranchDiffs( + const diffResp = await getBranchDiffs( args.project_id, args.from, args.to, args.straight ); + + if (args.ignored_files_regex?.length) { + const regexPatterns = args.ignored_files_regex.map(pattern => new RegExp(pattern)); + + // Helper function to check if a path matches any regex pattern + const matchesAnyPattern = (path: string): boolean => { + if (!path) return false; + return regexPatterns.some(regex => regex.test(path)); + }; + + // Filter out files that match any of the regex patterns on new files + diffResp.diffs = diffResp.diffs.filter(diff => + !matchesAnyPattern(diff.new_path) + ); + } return { - content: [{ type: "text", text: JSON.stringify(diffs, null, 2) }], + content: [{ type: "text", text: JSON.stringify(diffResp, null, 2) }], }; } diff --git a/schemas.ts b/schemas.ts index 41d1270..75c2843 100644 --- a/schemas.ts +++ b/schemas.ts @@ -633,6 +633,7 @@ export const GetBranchDiffsSchema = ProjectParamsSchema.extend({ from: z.string().describe("The base branch or commit SHA to compare from"), to: z.string().describe("The target branch or commit SHA to compare to"), straight: z.boolean().optional().describe("Comparison method: false for '...' (default), true for '--'"), + ignored_files_regex: z.array(z.string()).optional().describe("Regex patterns to exclude files from diff results (e.g., 'test/mocks.*', 'go\\.sum')"), }); export const GetMergeRequestSchema = ProjectParamsSchema.extend({ From fef360664e0577f4d5ff1238f149ee2ffcb1d471 Mon Sep 17 00:00:00 2001 From: Martim Pimentel Date: Thu, 22 May 2025 19:28:37 +0100 Subject: [PATCH 6/8] feat: rename ignored_files_regex to excluded_file_patterns and update descriptions for clarity --- index.ts | 4 ++-- schemas.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/index.ts b/index.ts index 0121014..ee4b695 100644 --- a/index.ts +++ b/index.ts @@ -2476,8 +2476,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { args.straight ); - if (args.ignored_files_regex?.length) { - const regexPatterns = args.ignored_files_regex.map(pattern => new RegExp(pattern)); + if (args.excluded_file_patterns?.length) { + const regexPatterns = args.excluded_file_patterns.map(pattern => new RegExp(pattern)); // Helper function to check if a path matches any regex pattern const matchesAnyPattern = (path: string): boolean => { diff --git a/schemas.ts b/schemas.ts index 75c2843..6b84ae4 100644 --- a/schemas.ts +++ b/schemas.ts @@ -35,7 +35,7 @@ export const GitLabUsersResponseSchema = z.record( // Base schema for project-related operations const ProjectParamsSchema = z.object({ - project_id: z.string().describe("Project ID or URL-encoded path"), // Changed from owner/repo to match GitLab API + project_id: z.string().describe("Project ID or complete URL-encoded path to project"), // Changed from owner/repo to match GitLab API }); export const GitLabNamespaceSchema = z.object({ id: z.number(), @@ -633,7 +633,9 @@ export const GetBranchDiffsSchema = ProjectParamsSchema.extend({ from: z.string().describe("The base branch or commit SHA to compare from"), to: z.string().describe("The target branch or commit SHA to compare to"), straight: z.boolean().optional().describe("Comparison method: false for '...' (default), true for '--'"), - ignored_files_regex: z.array(z.string()).optional().describe("Regex patterns to exclude files from diff results (e.g., 'test/mocks.*', 'go\\.sum')"), + excluded_file_patterns: z.array(z.string()).optional().describe( + "Array of regex patterns to exclude files from the diff results. Each pattern is a JavaScript-compatible regular expression that matches file paths to ignore. Examples: [\"^test/mocks/\", \"\\.spec\\.ts$\", \"package-lock\\.json\"]" + ), }); export const GetMergeRequestSchema = ProjectParamsSchema.extend({ From bf369a43dad22d0de8117c7909948f863e90e61d Mon Sep 17 00:00:00 2001 From: Martim Pimentel Date: Fri, 23 May 2025 18:44:43 +0100 Subject: [PATCH 7/8] feat: enhance CreateMergeRequest options with assignee, reviewer, and label support --- index.ts | 3 +++ schemas.ts | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/index.ts b/index.ts index ee4b695..2dca8d4 100644 --- a/index.ts +++ b/index.ts @@ -1001,6 +1001,9 @@ async function createMergeRequest( description: options.description, source_branch: options.source_branch, target_branch: options.target_branch, + assignee_ids: options.assignee_ids, + reviewer_ids: options.reviewer_ids, + labels: options.labels?.join(","), allow_collaboration: options.allow_collaboration, draft: options.draft, }), diff --git a/schemas.ts b/schemas.ts index 6b84ae4..95f89ec 100644 --- a/schemas.ts +++ b/schemas.ts @@ -267,6 +267,13 @@ export const CreateMergeRequestOptionsSchema = z.object({ description: z.string().optional(), // Changed from body to match GitLab API source_branch: z.string(), // Changed from head to match GitLab API target_branch: z.string(), // Changed from base to match GitLab API + assignee_ids: z + .array(z.number()) + .optional(), + reviewer_ids: z + .array(z.number()) + .optional(), + labels: z.array(z.string()).optional(), allow_collaboration: z.boolean().optional(), // Changed from maintainer_can_modify to match GitLab API draft: z.boolean().optional(), }); @@ -423,6 +430,7 @@ export const GitLabMergeRequestSchema = z.object({ draft: z.boolean().optional(), author: GitLabUserSchema, assignees: z.array(GitLabUserSchema).optional(), + reviewers: z.array(GitLabUserSchema).optional(), source_branch: z.string(), target_branch: z.string(), diff_refs: GitLabMergeRequestDiffRefSchema.nullable().optional(), @@ -612,6 +620,15 @@ export const CreateMergeRequestSchema = ProjectParamsSchema.extend({ description: z.string().optional().describe("Merge request description"), source_branch: z.string().describe("Branch containing changes"), target_branch: z.string().describe("Branch to merge into"), + assignee_ids: z + .array(z.number()) + .optional() + .describe("The ID of the users to assign the MR to"), + reviewer_ids: z + .array(z.number()) + .optional() + .describe("The ID of the users to assign as reviewers of the MR"), + labels: z.array(z.string()).optional().describe("Labels for the MR"), draft: z.boolean().optional().describe("Create as draft merge request"), allow_collaboration: z .boolean() From 6bc13794c8cfe09dafa2fddeae2d05589700cac6 Mon Sep 17 00:00:00 2001 From: Martim Pimentel Date: Fri, 30 May 2025 11:30:00 +0100 Subject: [PATCH 8/8] fix: remove duplicate entry for get_branch_diffs in tools list --- README.md | 107 +++++++++++++++++++++++++++--------------------------- index.ts | 6 --- 2 files changed, 54 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 43f3f32..cf43aac 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,6 @@ $ sh scripts/image_push.sh docker_user_name ## Tools 🛠️ + - 1. `create_or_update_file` - Create or update a single file in a GitLab project 2. `search_repositories` - Search for GitLab projects 3. `create_repository` - Create a new GitLab project @@ -103,56 +102,58 @@ $ sh scripts/image_push.sh docker_user_name 9. `create_branch` - Create a new branch in a GitLab project 10. `get_merge_request` - Get details of a merge request (Either mergeRequestIid or branchName must be provided) 11. `get_merge_request_diffs` - Get the changes/diffs of a merge request (Either mergeRequestIid or branchName must be provided) -12. `update_merge_request` - Update a merge request (Either mergeRequestIid or branchName must be provided) -13. `create_note` - Create a new note (comment) to an issue or merge request -14. `create_merge_request_thread` - Create a new thread on a merge request -15. `mr_discussions` - List discussion items for a merge request -16. `update_merge_request_note` - Modify an existing merge request thread note -17. `create_merge_request_note` - Add a new note to an existing merge request thread -18. `update_issue_note` - Modify an existing issue thread note -19. `create_issue_note` - Add a new note to an existing issue thread -20. `list_issues` - List issues in a GitLab project with filtering options -21. `get_issue` - Get details of a specific issue in a GitLab project -22. `update_issue` - Update an issue in a GitLab project -23. `delete_issue` - Delete an issue from a GitLab project -24. `list_issue_links` - List all issue links for a specific issue -25. `list_issue_discussions` - List discussions for an issue in a GitLab project -26. `get_issue_link` - Get a specific issue link -27. `create_issue_link` - Create an issue link between two issues -28. `delete_issue_link` - Delete an issue link -29. `list_namespaces` - List all namespaces available to the current user -30. `get_namespace` - Get details of a namespace by ID or path -31. `verify_namespace` - Verify if a namespace path exists -32. `get_project` - Get details of a specific project -33. `list_projects` - List projects accessible by the current user -34. `list_labels` - List labels for a project -35. `get_label` - Get a single label from a project -36. `create_label` - Create a new label in a project -37. `update_label` - Update an existing label in a project -38. `delete_label` - Delete a label from a project -39. `list_group_projects` - List projects in a GitLab group with filtering options -40. `list_wiki_pages` - List wiki pages in a GitLab project -41. `get_wiki_page` - Get details of a specific wiki page -42. `create_wiki_page` - Create a new wiki page in a GitLab project -43. `update_wiki_page` - Update an existing wiki page in a GitLab project -44. `delete_wiki_page` - Delete a wiki page from a GitLab project -45. `get_repository_tree` - Get the repository tree for a GitLab project (list files and directories) -46. `list_pipelines` - List pipelines in a GitLab project with filtering options -47. `get_pipeline` - Get details of a specific pipeline in a GitLab project -48. `list_pipeline_jobs` - List all jobs in a specific pipeline -49. `get_pipeline_job` - Get details of a GitLab pipeline job number -50. `get_pipeline_job_output` - Get the output/trace of a GitLab pipeline job number -51. `create_pipeline` - Create a new pipeline for a branch or tag -52. `retry_pipeline` - Retry a failed or canceled pipeline -53. `cancel_pipeline` - Cancel a running pipeline -54. `list_merge_requests` - List merge requests in a GitLab project with filtering options -55. `list_milestones` - List milestones in a GitLab project with filtering options -56. `get_milestone` - Get details of a specific milestone -57. `create_milestone` - Create a new milestone in a GitLab project -58. `edit_milestone ` - Edit an existing milestone in a GitLab project -59. `delete_milestone` - Delete a milestone from a GitLab project -60. `get_milestone_issue` - Get issues associated with a specific milestone -61. `get_milestone_merge_requests` - Get merge requests associated with a specific milestone -62. `promote_milestone` - Promote a milestone to the next stage -63. `get_milestone_burndown_events` - Get burndown events for a specific milestone +12. `get_branch_diffs` - Get the changes/diffs between two branches or commits in a GitLab project +13. `update_merge_request` - Update a merge request (Either mergeRequestIid or branchName must be provided) +14. `create_note` - Create a new note (comment) to an issue or merge request +15. `create_merge_request_thread` - Create a new thread on a merge request +16. `mr_discussions` - List discussion items for a merge request +17. `update_merge_request_note` - Modify an existing merge request thread note +18. `create_merge_request_note` - Add a new note to an existing merge request thread +19. `update_issue_note` - Modify an existing issue thread note +20. `create_issue_note` - Add a new note to an existing issue thread +21. `list_issues` - List issues in a GitLab project with filtering options +22. `get_issue` - Get details of a specific issue in a GitLab project +23. `update_issue` - Update an issue in a GitLab project +24. `delete_issue` - Delete an issue from a GitLab project +25. `list_issue_links` - List all issue links for a specific issue +26. `list_issue_discussions` - List discussions for an issue in a GitLab project +27. `get_issue_link` - Get a specific issue link +28. `create_issue_link` - Create an issue link between two issues +29. `delete_issue_link` - Delete an issue link +30. `list_namespaces` - List all namespaces available to the current user +31. `get_namespace` - Get details of a namespace by ID or path +32. `verify_namespace` - Verify if a namespace path exists +33. `get_project` - Get details of a specific project +34. `list_projects` - List projects accessible by the current user +35. `list_labels` - List labels for a project +36. `get_label` - Get a single label from a project +37. `create_label` - Create a new label in a project +38. `update_label` - Update an existing label in a project +39. `delete_label` - Delete a label from a project +40. `list_group_projects` - List projects in a GitLab group with filtering options +41. `list_wiki_pages` - List wiki pages in a GitLab project +42. `get_wiki_page` - Get details of a specific wiki page +43. `create_wiki_page` - Create a new wiki page in a GitLab project +44. `update_wiki_page` - Update an existing wiki page in a GitLab project +45. `delete_wiki_page` - Delete a wiki page from a GitLab project +46. `get_repository_tree` - Get the repository tree for a GitLab project (list files and directories) +47. `list_pipelines` - List pipelines in a GitLab project with filtering options +48. `get_pipeline` - Get details of a specific pipeline in a GitLab project +49. `list_pipeline_jobs` - List all jobs in a specific pipeline +50. `get_pipeline_job` - Get details of a GitLab pipeline job number +51. `get_pipeline_job_output` - Get the output/trace of a GitLab pipeline job number +52. `create_pipeline` - Create a new pipeline for a branch or tag +53. `retry_pipeline` - Retry a failed or canceled pipeline +54. `cancel_pipeline` - Cancel a running pipeline +55. `list_merge_requests` - List merge requests in a GitLab project with filtering options +56. `list_milestones` - List milestones in a GitLab project with filtering options +57. `get_milestone` - Get details of a specific milestone +58. `create_milestone` - Create a new milestone in a GitLab project +59. `edit_milestone` - Edit an existing milestone in a GitLab project +60. `delete_milestone` - Delete a milestone from a GitLab project +61. `get_milestone_issue` - Get issues associated with a specific milestone +62. `get_milestone_merge_requests` - Get merge requests associated with a specific milestone +63. `promote_milestone` - Promote a milestone to the next stage +64. `get_milestone_burndown_events` - Get burndown events for a specific milestone +65. `get_users` - Get GitLab user details by usernames diff --git a/index.ts b/index.ts index 479b61e..f0bff6d 100644 --- a/index.ts +++ b/index.ts @@ -308,12 +308,6 @@ const allTools = [ "Get the changes/diffs between two branches or commits in a GitLab project", inputSchema: zodToJsonSchema(GetBranchDiffsSchema), }, - { - name: "get_branch_diffs", - description: - "Get the changes/diffs between two branches or commits in a GitLab project", - inputSchema: zodToJsonSchema(GetBranchDiffsSchema), - }, { name: "update_merge_request", description: "Update a merge request (Either mergeRequestIid or branchName must be provided)",