@zereight/mcp-gitlab 2.1.59 → 2.1.60
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.ko.md +1 -1
- package/README.md +151 -126
- package/README.zh-CN.md +1 -1
- package/build/index.js +67 -1
- package/build/schemas.js +20 -0
- package/build/scripts/generate-tool-docs.js +5 -0
- package/build/test/test-orbit.js +155 -0
- package/build/test/test-toolset-filtering.js +2 -0
- package/build/tools/registry.js +31 -1
- package/build/tools/tool-descriptions.js +4 -0
- package/package.json +1 -1
package/README.ko.md
CHANGED
|
@@ -110,7 +110,7 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
|
|
|
110
110
|
|
|
111
111
|
예시는 기존 `mcp-gitlab`보다 충돌 가능성이 낮은 `zereight-mcp-gitlab` 별칭을 사용합니다. MCP 클라이언트가 찾지 못하면 `which zereight-mcp-gitlab`의 절대 경로를 사용하세요.
|
|
112
112
|
|
|
113
|
-
전역 설치를 쓰지 않으려면 `npx -y @zereight/mcp-gitlab@2.1.
|
|
113
|
+
전역 설치를 쓰지 않으려면 `npx -y @zereight/mcp-gitlab@2.1.59`처럼 직전 안정 버전(문서가 권장하는 버전)으로 고정하세요. 항상 최신 버전을 원하면 `npx -y @zereight/mcp-gitlab@latest`를 사용하세요. 새 버전이 나오면 서버가 시작 시 stderr로 알려줍니다(`GITLAB_DISABLE_VERSION_CHECK=true`로 비활성화 가능).
|
|
114
114
|
|
|
115
115
|
#### CLI 인자 사용하기(환경 변수 문제가 있는 클라이언트용)
|
|
116
116
|
|
package/README.md
CHANGED
|
@@ -115,7 +115,7 @@ The store path is pinned by your lock file; update it with `nix flake update git
|
|
|
115
115
|
|
|
116
116
|
The examples use `zereight-mcp-gitlab`, a less collision-prone alias for the legacy `mcp-gitlab` binary. If your MCP client cannot find it, use the absolute path from `which zereight-mcp-gitlab`.
|
|
117
117
|
|
|
118
|
-
No global install? Pin `npx` to the previous stable release (the version these docs recommend), for example `npx -y @zereight/mcp-gitlab@2.1.
|
|
118
|
+
No global install? Pin `npx` to the previous stable release (the version these docs recommend), for example `npx -y @zereight/mcp-gitlab@2.1.59`. If you always want the newest release, use `npx -y @zereight/mcp-gitlab@latest` instead. The server prints a notice to stderr on startup when a newer version is available (disable with `GITLAB_DISABLE_VERSION_CHECK=true`).
|
|
119
119
|
|
|
120
120
|
#### Using CLI Arguments (for clients with env var issues)
|
|
121
121
|
|
|
@@ -691,131 +691,156 @@ Register the skill directory in your AI client to get optimal tool usage guidanc
|
|
|
691
691
|
106. `get_repository_tree` - Get the repository tree for a GitLab project (list files and directories)
|
|
692
692
|
107. `list_pipelines` - List pipelines in a GitLab project with filtering options
|
|
693
693
|
108. `get_pipeline` - Get details of a specific pipeline in a GitLab project
|
|
694
|
-
109. `
|
|
695
|
-
110. `
|
|
696
|
-
111. `
|
|
697
|
-
112. `
|
|
698
|
-
113. `
|
|
699
|
-
114. `
|
|
700
|
-
115. `
|
|
701
|
-
116. `
|
|
702
|
-
117. `
|
|
703
|
-
118. `
|
|
704
|
-
119. `
|
|
705
|
-
120. `
|
|
706
|
-
121. `
|
|
707
|
-
122. `
|
|
708
|
-
123. `
|
|
709
|
-
124. `
|
|
710
|
-
125. `
|
|
711
|
-
126. `
|
|
712
|
-
127. `
|
|
713
|
-
128. `
|
|
714
|
-
129. `
|
|
715
|
-
130. `
|
|
716
|
-
131. `
|
|
717
|
-
132. `
|
|
718
|
-
133. `
|
|
719
|
-
134. `
|
|
720
|
-
135. `
|
|
721
|
-
136. `
|
|
722
|
-
137. `
|
|
723
|
-
138. `
|
|
724
|
-
139. `
|
|
725
|
-
140. `
|
|
726
|
-
141. `
|
|
727
|
-
142. `
|
|
728
|
-
143. `
|
|
729
|
-
144. `
|
|
730
|
-
145. `
|
|
731
|
-
146. `
|
|
732
|
-
147. `
|
|
733
|
-
148. `
|
|
734
|
-
149. `
|
|
735
|
-
150. `
|
|
736
|
-
151. `
|
|
737
|
-
152. `
|
|
738
|
-
153. `
|
|
739
|
-
154. `
|
|
740
|
-
155. `
|
|
741
|
-
156. `
|
|
742
|
-
157. `
|
|
743
|
-
158. `
|
|
744
|
-
159. `
|
|
745
|
-
160. `
|
|
746
|
-
161. `
|
|
747
|
-
162. `
|
|
748
|
-
163. `
|
|
749
|
-
164. `
|
|
750
|
-
165. `
|
|
751
|
-
166. `
|
|
752
|
-
167. `
|
|
753
|
-
168. `
|
|
754
|
-
169. `
|
|
755
|
-
170. `
|
|
756
|
-
171. `
|
|
757
|
-
172. `
|
|
758
|
-
173. `
|
|
759
|
-
174. `
|
|
760
|
-
175. `
|
|
761
|
-
176. `
|
|
762
|
-
177. `
|
|
763
|
-
178. `
|
|
764
|
-
179. `
|
|
765
|
-
180. `
|
|
766
|
-
181. `
|
|
767
|
-
182. `
|
|
768
|
-
183. `
|
|
769
|
-
184. `
|
|
770
|
-
185. `
|
|
771
|
-
186. `
|
|
772
|
-
187. `
|
|
773
|
-
188. `
|
|
774
|
-
189. `
|
|
775
|
-
190. `
|
|
776
|
-
191. `
|
|
777
|
-
192. `
|
|
778
|
-
193. `
|
|
779
|
-
194. `
|
|
780
|
-
195. `
|
|
781
|
-
196. `
|
|
782
|
-
197. `
|
|
783
|
-
198. `
|
|
784
|
-
199. `
|
|
785
|
-
200. `
|
|
786
|
-
201. `
|
|
787
|
-
202. `
|
|
788
|
-
203. `
|
|
789
|
-
204. `
|
|
790
|
-
205. `
|
|
791
|
-
206. `
|
|
792
|
-
207. `
|
|
793
|
-
208. `
|
|
794
|
-
209. `
|
|
795
|
-
210. `
|
|
796
|
-
211. `
|
|
797
|
-
212. `
|
|
798
|
-
213. `
|
|
799
|
-
214. `
|
|
800
|
-
215. `
|
|
801
|
-
216. `
|
|
802
|
-
217. `
|
|
803
|
-
218. `
|
|
804
|
-
219. `
|
|
805
|
-
220. `
|
|
806
|
-
221. `
|
|
807
|
-
222. `
|
|
808
|
-
223. `
|
|
809
|
-
224. `
|
|
810
|
-
225. `
|
|
811
|
-
226. `
|
|
812
|
-
227. `
|
|
813
|
-
228. `
|
|
814
|
-
229. `
|
|
815
|
-
230. `
|
|
816
|
-
231. `
|
|
817
|
-
232. `
|
|
818
|
-
233. `
|
|
694
|
+
109. `get_pipeline_variables` - Get variables configured for a pipeline
|
|
695
|
+
110. `get_pipeline_test_report` - Get pipeline test report
|
|
696
|
+
111. `get_pipeline_test_report_summary` - Get pipeline test report summary
|
|
697
|
+
112. `delete_pipeline` - Delete a pipeline. Requires the project Owner role, cannot be undone, and does not automatically delete child pipelines.
|
|
698
|
+
113. `update_pipeline_metadata` - Update pipeline metadata
|
|
699
|
+
114. `list_deployments` - List deployments in a GitLab project with filtering options
|
|
700
|
+
115. `get_deployment` - Get details of a specific deployment in a GitLab project
|
|
701
|
+
116. `create_deployment` - Create a deployment
|
|
702
|
+
117. `update_deployment` - Update a deployment status
|
|
703
|
+
118. `delete_deployment` - Delete a deployment
|
|
704
|
+
119. `list_deployment_merge_requests` - List merge requests shipped with a deployment
|
|
705
|
+
120. `approve_deployment` - Approve or reject a protected-environment deployment
|
|
706
|
+
121. `list_environments` - List environments in a GitLab project
|
|
707
|
+
122. `get_environment` - Get details of a specific environment in a GitLab project
|
|
708
|
+
123. `update_environment` - Update an environment
|
|
709
|
+
124. `delete_environment` - Delete a stopped environment
|
|
710
|
+
125. `stop_environment` - Stop an environment
|
|
711
|
+
126. `stop_stale_environments` - Stop eligible stale environments; protected environments are excluded and environments are stopped, not deleted
|
|
712
|
+
127. `delete_review_app_environments` - Schedule deletion of stopped review-app environments one week later; `dry_run` defaults to true and actual scheduling requires `dry_run=false`
|
|
713
|
+
128. `list_pipeline_triggers` - List project pipeline trigger tokens
|
|
714
|
+
129. `get_pipeline_trigger` - Get a project pipeline trigger
|
|
715
|
+
130. `create_pipeline_trigger` - Create a project pipeline trigger
|
|
716
|
+
131. `update_pipeline_trigger` - Update a project pipeline trigger
|
|
717
|
+
132. `delete_pipeline_trigger` - Delete a project pipeline trigger
|
|
718
|
+
133. `trigger_pipeline` - Trigger a pipeline with a pipeline trigger token
|
|
719
|
+
134. `list_pipeline_jobs` - List all jobs in a specific pipeline
|
|
720
|
+
135. `list_pipeline_trigger_jobs` - List all trigger jobs (bridges) in a specific pipeline that trigger downstream pipelines
|
|
721
|
+
136. `get_pipeline_job` - Get details of a GitLab pipeline job number
|
|
722
|
+
137. `get_pipeline_job_output` - Get the output/trace of a GitLab pipeline job with optional pagination to limit context window usage
|
|
723
|
+
138. `validate_ci_lint` - Validate provided GitLab CI/CD YAML content for a project
|
|
724
|
+
139. `validate_project_ci_lint` - Validate an existing `.gitlab-ci.yml` configuration for a project
|
|
725
|
+
140. `list_ci_catalog_resources` - List GitLab CI/CD Catalog resources/components visible to the user
|
|
726
|
+
141. `get_ci_catalog_resource` - Get details for a GitLab CI/CD Catalog resource, including versions and components
|
|
727
|
+
142. `create_pipeline` - Create a new pipeline for a branch or tag
|
|
728
|
+
143. `retry_pipeline` - Retry a failed or canceled pipeline
|
|
729
|
+
144. `cancel_pipeline` - Cancel a running pipeline
|
|
730
|
+
145. `list_pipeline_schedules` - List pipeline schedules in a project, optionally filtered to active or inactive
|
|
731
|
+
146. `get_pipeline_schedule` - Get details of a specific pipeline schedule, including its variables and last pipeline
|
|
732
|
+
147. `list_pipeline_schedule_pipelines` - List the pipelines that a pipeline schedule has triggered
|
|
733
|
+
148. `create_pipeline_schedule` - Create a new pipeline schedule for a branch or tag
|
|
734
|
+
149. `update_pipeline_schedule` - Update an existing pipeline schedule
|
|
735
|
+
150. `delete_pipeline_schedule` - Delete a pipeline schedule
|
|
736
|
+
151. `play_pipeline_schedule` - Run a pipeline schedule immediately, without changing its next scheduled run
|
|
737
|
+
152. `take_ownership_pipeline_schedule` - Take ownership of a pipeline schedule
|
|
738
|
+
153. `get_pipeline_schedule_variable` - Get a single variable of a pipeline schedule
|
|
739
|
+
154. `create_pipeline_schedule_variable` - Create a variable for a pipeline schedule
|
|
740
|
+
155. `update_pipeline_schedule_variable` - Update a variable of a pipeline schedule
|
|
741
|
+
156. `delete_pipeline_schedule_variable` - Delete a variable from a pipeline schedule
|
|
742
|
+
157. `play_pipeline_job` - Run a manual pipeline job
|
|
743
|
+
158. `play_pipeline_jobs` - Play multiple manual pipeline jobs sequentially
|
|
744
|
+
159. `retry_pipeline_job` - Retry a failed or canceled pipeline job
|
|
745
|
+
160. `cancel_pipeline_job` - Cancel a running pipeline job
|
|
746
|
+
161. `erase_pipeline_job` - Erase a pipeline job log and artifacts
|
|
747
|
+
162. `wait_for_pipeline` - Wait for a pipeline to reach a terminal status
|
|
748
|
+
163. `wait_for_job` - Wait for a job to reach a terminal status
|
|
749
|
+
164. `list_job_artifacts` - List artifact files in a job's artifacts archive. Returns file names, paths, types, and sizes
|
|
750
|
+
165. `download_job_artifacts` - Download the entire artifact archive (zip) for a job to a local path. Returns the saved file path
|
|
751
|
+
166. `get_job_artifact_file` - Get the content of a single file from a job's artifacts by its path within the archive
|
|
752
|
+
167. `list_merge_requests` - List merge requests globally or in a specific GitLab project with filtering options (project_id is now optional)
|
|
753
|
+
168. `list_group_merge_requests` - List merge requests across all projects of a group and its subgroups with filtering options
|
|
754
|
+
169. `list_milestones` - List milestones in a GitLab project with filtering options
|
|
755
|
+
170. `get_milestone` - Get details of a specific milestone
|
|
756
|
+
171. `create_milestone` - Create a new milestone in a GitLab project
|
|
757
|
+
172. `edit_milestone` - Edit an existing milestone in a GitLab project
|
|
758
|
+
173. `delete_milestone` - Delete a milestone from a GitLab project
|
|
759
|
+
174. `get_milestone_issue` - Get issues associated with a specific milestone
|
|
760
|
+
175. `get_milestone_merge_requests` - Get merge requests associated with a specific milestone
|
|
761
|
+
176. `promote_milestone` - Promote a milestone to the next stage
|
|
762
|
+
177. `get_milestone_burndown_events` - Get burndown events for a specific milestone
|
|
763
|
+
178. `list_group_milestones` - List milestones in a GitLab group with filtering options
|
|
764
|
+
179. `get_group_milestone` - Get details of a specific group milestone
|
|
765
|
+
180. `create_group_milestone` - Create a new milestone in a GitLab group
|
|
766
|
+
181. `edit_group_milestone` - Edit an existing group milestone
|
|
767
|
+
182. `delete_group_milestone` - Delete a milestone from a GitLab group
|
|
768
|
+
183. `get_group_milestone_issue` - Get issues associated with a specific group milestone
|
|
769
|
+
184. `get_group_milestone_merge_requests` - Get merge requests associated with a specific group milestone
|
|
770
|
+
185. `get_group_milestone_burndown_events` - Get burndown events for a specific group milestone
|
|
771
|
+
186. `get_users` - Get GitLab user details by usernames
|
|
772
|
+
187. `get_user` - Get user details by ID
|
|
773
|
+
188. `whoami` - Get current authenticated user details
|
|
774
|
+
189. `list_commits` - List repository commits with filtering options
|
|
775
|
+
190. `get_commit` - Get details of a specific commit
|
|
776
|
+
191. `get_commit_diff` - Get changes/diffs of a specific commit
|
|
777
|
+
192. `get_file_blame` - Get git blame for a file at a given ref. Each entry maps a contiguous range of source lines to the commit that last changed them (id, author, authored_date, message). Use range_start/range_end to limit blame to specific lines.
|
|
778
|
+
193. `list_commit_statuses` - List statuses for a specific commit
|
|
779
|
+
194. `create_commit_status` - Create or update the status of a specific commit
|
|
780
|
+
195. `list_group_iterations` - List group iterations with filtering options
|
|
781
|
+
196. `upload_markdown` - Upload a file to a GitLab project for use in markdown content
|
|
782
|
+
197. `download_attachment` - Download an uploaded file from a GitLab project by secret and filename
|
|
783
|
+
198. `health_check` - Verify server status and authentication; when authenticated, reports GitLab instance version from `/api/v4/version` (`version`, `revision`, `enterprise`)
|
|
784
|
+
199. `list_events` - List all events for the currently authenticated user
|
|
785
|
+
200. `get_project_events` - List all visible events for a specified project
|
|
786
|
+
201. `list_releases` - List all releases for a project
|
|
787
|
+
202. `get_release` - Get a release by tag name
|
|
788
|
+
203. `create_release` - Create a new release in a GitLab project
|
|
789
|
+
204. `update_release` - Update an existing release in a GitLab project
|
|
790
|
+
205. `delete_release` - Delete a release from a GitLab project (does not delete the associated tag)
|
|
791
|
+
206. `create_release_evidence` - Create release evidence for an existing release (GitLab Premium/Ultimate only)
|
|
792
|
+
207. `download_release_asset` - Download a release asset file by direct asset path
|
|
793
|
+
208. `list_tags` - List repository tags with filtering and pagination support
|
|
794
|
+
209. `get_tag` - Get details of a specific repository tag
|
|
795
|
+
210. `create_tag` - Create a new tag in the repository
|
|
796
|
+
211. `delete_tag` - Delete a tag from the repository
|
|
797
|
+
212. `get_tag_signature` - Get the signature of a signed tag
|
|
798
|
+
213. `get_work_item` - Get a single work item with full details including status, hierarchy (parent/children), type, labels, assignees, and all widgets
|
|
799
|
+
214. `list_work_items` - List work items in a project with filters (type, state, search, assignees, labels). Returns items with status and hierarchy info
|
|
800
|
+
215. `create_work_item` - Create a new work item (issue, task, incident, test_case, epic, key_result, objective, requirement, ticket). Supports setting title, description, labels, assignees, weight, parent, health status, start/due dates, milestone, and confidentiality
|
|
801
|
+
216. `update_work_item` - Update a work item. Can modify title, description, labels, assignees, weight, state, status, parent hierarchy, children, health status, start/due dates, milestone, confidentiality, linked items, and custom fields
|
|
802
|
+
217. `convert_work_item_type` - Convert a work item to a different type (e.g. issue to task, task to incident)
|
|
803
|
+
218. `list_work_item_statuses` - List available statuses for a work item type in a project. Requires GitLab Premium/Ultimate with configurable statuses
|
|
804
|
+
219. `list_custom_field_definitions` - List available custom field definitions for a work item type in a project. Returns field names, types, and IDs needed for setting custom fields via update_work_item
|
|
805
|
+
220. `move_work_item` - Move a work item (issue, task, etc.) to a different project. Uses GitLab GraphQL issueMove mutation
|
|
806
|
+
221. `list_work_item_notes` - List notes and discussions on a work item. Returns threaded discussions with author, body, timestamps, and system/internal flags
|
|
807
|
+
222. `create_work_item_note` - Add a note/comment to a work item. Supports Markdown, internal notes, and threaded replies
|
|
808
|
+
223. `list_work_item_emoji_reactions` - List all emoji reactions on a work item
|
|
809
|
+
224. `list_work_item_note_emoji_reactions` - List all emoji reactions on a work item note (comment, thread, or thread reply)
|
|
810
|
+
225. `create_work_item_emoji_reaction` - Add an emoji reaction to a work item (e.g. thumbsup, rocket, eyes)
|
|
811
|
+
226. `delete_work_item_emoji_reaction` - Remove an emoji reaction from a work item
|
|
812
|
+
227. `create_work_item_note_emoji_reaction` - Add an emoji reaction to a work item note (comment, thread, or thread reply)
|
|
813
|
+
228. `delete_work_item_note_emoji_reaction` - Remove an emoji reaction from a work item note (comment, thread, or thread reply)
|
|
814
|
+
229. `get_timeline_events` - List timeline events for an incident. Returns chronological events with notes, timestamps, and tags
|
|
815
|
+
230. `create_timeline_event` - Create a timeline event on an incident. Supports tags: 'Start time', 'End time', 'Impact detected', 'Response initiated', 'Impact mitigated', 'Cause identified'
|
|
816
|
+
231. `list_webhooks` - List all configured webhooks for a GitLab project or group. Provide either project_id or group_id
|
|
817
|
+
232. `create_webhook` - Create a webhook on a GitLab project or group
|
|
818
|
+
233. `update_webhook` - Update an existing project or group webhook
|
|
819
|
+
234. `delete_webhook` - Delete a project or group webhook
|
|
820
|
+
235. `list_webhook_events` - List recent webhook events (past 7 days) for a project or group webhook. Use summary mode for overview, then get_webhook_event for full details
|
|
821
|
+
236. `get_webhook_event` - Get full details of a specific webhook event by ID, including request/response payloads
|
|
822
|
+
237. `search_code` - Search for code across all projects on the GitLab instance (requires advanced search or exact code search to be enabled)
|
|
823
|
+
238. `search_project_code` - Search for code within a specific GitLab project (requires advanced search or exact code search to be enabled)
|
|
824
|
+
239. `search_group_code` - Search for code within a specific GitLab group (requires advanced search or exact code search to be enabled)
|
|
825
|
+
240. `list_project_variables` - List CI/CD variables for a project with optional environment scope filter
|
|
826
|
+
241. `get_project_variable` - Get a single CI/CD variable from a project by key, with optional environment scope filter
|
|
827
|
+
242. `create_project_variable` - Create a new CI/CD variable in a project
|
|
828
|
+
243. `update_project_variable` - Update an existing CI/CD variable in a project, with optional filter to disambiguate by environment scope
|
|
829
|
+
244. `delete_project_variable` - Delete a CI/CD variable from a project, with optional filter to disambiguate by environment scope
|
|
830
|
+
245. `list_group_variables` - List CI/CD variables for a group with optional environment scope filter
|
|
831
|
+
246. `get_group_variable` - Get a single CI/CD variable from a group by key, with optional environment scope filter
|
|
832
|
+
247. `create_group_variable` - Create a new CI/CD variable in a group
|
|
833
|
+
248. `update_group_variable` - Update an existing CI/CD variable in a group, with optional filter to disambiguate by environment scope
|
|
834
|
+
249. `delete_group_variable` - Delete a CI/CD variable from a group, with optional filter to disambiguate by environment scope
|
|
835
|
+
250. `get_dependency_proxy_settings` - Get dependency proxy settings for a group (enabled status, blob count, total size, image prefix, TTL policy)
|
|
836
|
+
251. `update_dependency_proxy_settings` - Update dependency proxy settings for a group (enable/disable, credentials for authenticated Docker Hub pulls)
|
|
837
|
+
252. `list_dependency_proxy_blobs` - List cached dependency proxy blobs for a group with cursor-based pagination
|
|
838
|
+
253. `purge_dependency_proxy_cache` - Schedule purge of all cached dependency proxy blobs for a group
|
|
839
|
+
254. `list_project_vulnerabilities` - List vulnerabilities for a project with optional state, severity, and report type filters (GraphQL-backed, cursor pagination)
|
|
840
|
+
255. `get_vulnerability` - Get full details of a specific vulnerability
|
|
841
|
+
256. `dismiss_vulnerability` - Dismiss a vulnerability with a reason (acceptable_risk, false_positive, used_in_tests, mitigating_control, not_applicable) and optional comment
|
|
842
|
+
257. `confirm_vulnerability` - Confirm a vulnerability as a real finding requiring remediation
|
|
843
|
+
258. `discover_tools` - Discover and activate additional tool categories for this session. Available categories: merge_requests, issues, repositories, branches, projects, labels, ci, groups, pipelines, milestones, wiki, releases, tags, users, workitems, webhooks, search, variables, dependency_proxy, vulnerabilities. Already-active categories are listed in the response.
|
|
819
844
|
|
|
820
845
|
<!-- TOOLS-END -->
|
|
821
846
|
|
package/README.zh-CN.md
CHANGED
|
@@ -110,7 +110,7 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
|
|
|
110
110
|
|
|
111
111
|
示例使用 `zereight-mcp-gitlab`,这是比旧的 `mcp-gitlab` 更不容易冲突的别名。如果 MCP 客户端找不到它,请使用 `which zereight-mcp-gitlab` 输出的绝对路径。
|
|
112
112
|
|
|
113
|
-
如果不想全局安装,请将 `npx` 固定到上一个稳定版本(即文档推荐的版本),例如 `npx -y @zereight/mcp-gitlab@2.1.
|
|
113
|
+
如果不想全局安装,请将 `npx` 固定到上一个稳定版本(即文档推荐的版本),例如 `npx -y @zereight/mcp-gitlab@2.1.59`。如果始终想使用最新版本,请改用 `npx -y @zereight/mcp-gitlab@latest`。有新版本发布时,服务器会在启动时通过 stderr 提示(可用 `GITLAB_DISABLE_VERSION_CHECK=true` 关闭)。
|
|
114
114
|
|
|
115
115
|
#### 使用 CLI 参数(适用于环境变量有问题的客户端)
|
|
116
116
|
|
package/build/index.js
CHANGED
|
@@ -111,7 +111,7 @@ GitLabDiscussionNoteSchema, // Added
|
|
|
111
111
|
GitLabDiscussionSchema,
|
|
112
112
|
// Draft Notes Schemas
|
|
113
113
|
GitLabDraftNoteSchema, GitLabForkSchema, GitLabBranchSchema, GitLabProtectedBranchSchema, GitLabGroupSchema, GitLabIssueLinkSchema, GitLabIssueSchema, GitLabIssueWithLinkDetailsSchema, GitLabMarkdownUploadSchema, GitLabMergeRequestPipelineSchema, GitLabMergeRequestSchema, GitLabMilestonesSchema, GitLabGroupMilestonesSchema, GitLabNamespaceExistsResponseSchema, GitLabNamespaceSchema, GitLabPipelineJobSchema, GitLabDeploymentSchema, GitLabEnvironmentSchema, GitLabPipelineSchema, GitLabPipelineScheduleSchema, GitLabPipelineScheduleVariableSchema, GitLabPipelineSchedulePlayResultSchema, ListPipelineSchedulesSchema, GetPipelineScheduleSchema, ListPipelineSchedulePipelinesSchema, CreatePipelineScheduleSchema, UpdatePipelineScheduleSchema, DeletePipelineScheduleSchema, PlayPipelineScheduleSchema, TakeOwnershipPipelineScheduleSchema, GetPipelineScheduleVariableSchema, CreatePipelineScheduleVariableSchema, UpdatePipelineScheduleVariableSchema, DeletePipelineScheduleVariableSchema, GitLabPipelineTriggerJobSchema, GitLabProjectMemberSchema, GitLabProjectSchema, GitLabTodoSchema, GitLabReferenceSchema, GitLabRepositorySchema, GitLabSearchBlobResultSchema, GitLabSearchResponseSchema, GitLabTreeItemSchema, GitLabUserSchema, GitLabUsersResponseSchema, GitLabWikiPageSchema, GroupIteration, ListCommitStatusesSchema, ListBranchesSchema, ListCommitsSchema, ListDraftNotesSchema, ListGroupIterationsSchema, ListGroupProjectsSchema, GitLabCiVariableSchema, ListProjectVariablesSchema, GetProjectVariableSchema, CreateProjectVariableSchema, UpdateProjectVariableSchema, DeleteProjectVariableSchema, ListGroupVariablesSchema, GetGroupVariableSchema, CreateGroupVariableSchema, UpdateGroupVariableSchema, DeleteGroupVariableSchema, GitLabDependencyProxySchema, GitLabDependencyProxyBlobSchema, GetDependencyProxySettingsSchema, UpdateDependencyProxySettingsSchema, ListDependencyProxyBlobsSchema, PurgeDependencyProxyCacheSchema, ListProjectVulnerabilitiesSchema, GetVulnerabilitySchema, DismissVulnerabilitySchema, ConfirmVulnerabilitySchema, ListIssueDiscussionsSchema, ListIssueLinksSchema, ListIssuesSchema, ListTodosSchema, ListLabelsSchema, ListMergeRequestDiffsSchema, // Added
|
|
114
|
-
GetMergeRequestFileDiffSchema, ListMergeRequestChangedFilesSchema, ListMergeRequestDiscussionsSchema, ListMergeRequestPipelinesSchema, ListMergeRequestsSchema, ListGroupMergeRequestsSchema, ListMergeRequestVersionsSchema, GetMergeRequestVersionSchema, GitLabMergeRequestVersionSchema, GitLabMergeRequestVersionDetailSchema, ListNamespacesSchema, ListPipelineJobsSchema, ListPipelinesSchema, ListDeploymentsSchema, ListEnvironmentsSchema, ListPipelineTriggerJobsSchema, ValidateCiLintSchema, ValidateProjectCiLintSchema, ListCiCatalogResourcesSchema, GetCiCatalogResourceSchema, ListProjectMembersSchema, ListGroupMembersSchema, ListProjectMilestonesSchema, ListGroupMilestonesSchema, ListProjectsSchema, ListWikiPagesSchema, GetGroupWikiPageSchema, ListGroupWikiPagesSchema, UpdateGroupWikiPageSchema, MarkdownUploadSchema, MarkdownUploadRemoteSchema, DownloadAttachmentSchema, DownloadJobArtifactsSchema, GetJobArtifactFileSchema, GitLabArtifactEntrySchema, ListJobArtifactsSchema, MergeMergeRequestSchema, ApproveMergeRequestSchema, UnapproveMergeRequestSchema, GetMergeRequestApprovalStateSchema, GetMergeRequestConflictsSchema, GitLabMergeRequestApprovalsResponseSchema, GitLabMergeRequestApprovalStateSchema, MyIssuesSchema, MarkAllTodosDoneSchema, MarkTodoDoneSchema, PaginatedDiscussionsResponseSchema, PromoteProjectMilestoneSchema, PublishDraftNoteSchema, PlayPipelineJobSchema, PushFilesSchema, RetryPipelineJobSchema, RetryPipelineSchema, SearchCodeSchema, SearchGroupCodeSchema, SearchProjectCodeSchema, SearchRepositoriesSchema, UpdateDraftNoteSchema, UpdateIssueNoteSchema, UpdateIssueSchema, UpdateIssueDescriptionPatchSchema, UpdateLabelSchema, UpdateProjectSchema, UpdateMergeRequestNoteSchema, UpdateMergeRequestDiscussionNoteSchema, UpdateMergeRequestSchema, UpdateWikiPageSchema, VerifyNamespaceSchema, GitLabEventSchema, ListEventsSchema, GetProjectEventsSchema, ExecuteGraphQLSchema, GitLabReleaseSchema, ListReleasesSchema, GetReleaseSchema, CreateReleaseSchema, UpdateReleaseSchema, DeleteReleaseSchema, CreateReleaseEvidenceSchema, DownloadReleaseAssetSchema, ListTagsSchema, GetTagSchema, CreateTagSchema, DeleteTagSchema, GetTagSignatureSchema, GitLabTagSchema, GitLabTagSignatureSchema, GetMergeRequestNotesSchema, GetMergeRequestNoteSchema, DeleteMergeRequestDiscussionNoteSchema, ResolveMergeRequestThreadSchema, GetWorkItemSchema, ListWorkItemsSchema, CreateWorkItemSchema, UpdateWorkItemSchema, ConvertWorkItemTypeSchema, ListWorkItemStatusesSchema, ListWorkItemNotesSchema, CreateWorkItemNoteSchema, CreateWorkItemEmojiReactionSchema, CreateWorkItemNoteEmojiReactionSchema, ListWorkItemEmojiReactionsSchema, ListWorkItemNoteEmojiReactionsSchema, DeleteWorkItemEmojiReactionSchema, DeleteWorkItemNoteEmojiReactionSchema, MoveWorkItemSchema, ListCustomFieldDefinitionsSchema, GetTimelineEventsSchema, CreateTimelineEventSchema, ListWebhooksSchema, CreateWebhookSchema, UpdateWebhookSchema, DeleteWebhookSchema, ListWebhookEventsSchema, GetWebhookEventSchema, HealthCheckSchema, } from "./schemas.js";
|
|
114
|
+
GetMergeRequestFileDiffSchema, ListMergeRequestChangedFilesSchema, ListMergeRequestDiscussionsSchema, ListMergeRequestPipelinesSchema, ListMergeRequestsSchema, ListGroupMergeRequestsSchema, ListMergeRequestVersionsSchema, GetMergeRequestVersionSchema, GitLabMergeRequestVersionSchema, GitLabMergeRequestVersionDetailSchema, ListNamespacesSchema, ListPipelineJobsSchema, ListPipelinesSchema, ListDeploymentsSchema, ListEnvironmentsSchema, ListPipelineTriggerJobsSchema, ValidateCiLintSchema, ValidateProjectCiLintSchema, ListCiCatalogResourcesSchema, GetCiCatalogResourceSchema, ListProjectMembersSchema, ListGroupMembersSchema, ListProjectMilestonesSchema, ListGroupMilestonesSchema, ListProjectsSchema, ListWikiPagesSchema, GetGroupWikiPageSchema, ListGroupWikiPagesSchema, UpdateGroupWikiPageSchema, MarkdownUploadSchema, MarkdownUploadRemoteSchema, DownloadAttachmentSchema, DownloadJobArtifactsSchema, GetJobArtifactFileSchema, GitLabArtifactEntrySchema, ListJobArtifactsSchema, MergeMergeRequestSchema, ApproveMergeRequestSchema, UnapproveMergeRequestSchema, GetMergeRequestApprovalStateSchema, GetMergeRequestConflictsSchema, GitLabMergeRequestApprovalsResponseSchema, GitLabMergeRequestApprovalStateSchema, MyIssuesSchema, OrbitQuerySchema, OrbitSchemaSchema, OrbitStatusSchema, OrbitToolsSchema, MarkAllTodosDoneSchema, MarkTodoDoneSchema, PaginatedDiscussionsResponseSchema, PromoteProjectMilestoneSchema, PublishDraftNoteSchema, PlayPipelineJobSchema, PushFilesSchema, RetryPipelineJobSchema, RetryPipelineSchema, SearchCodeSchema, SearchGroupCodeSchema, SearchProjectCodeSchema, SearchRepositoriesSchema, UpdateDraftNoteSchema, UpdateIssueNoteSchema, UpdateIssueSchema, UpdateIssueDescriptionPatchSchema, UpdateLabelSchema, UpdateProjectSchema, UpdateMergeRequestNoteSchema, UpdateMergeRequestDiscussionNoteSchema, UpdateMergeRequestSchema, UpdateWikiPageSchema, VerifyNamespaceSchema, GitLabEventSchema, ListEventsSchema, GetProjectEventsSchema, ExecuteGraphQLSchema, GitLabReleaseSchema, ListReleasesSchema, GetReleaseSchema, CreateReleaseSchema, UpdateReleaseSchema, DeleteReleaseSchema, CreateReleaseEvidenceSchema, DownloadReleaseAssetSchema, ListTagsSchema, GetTagSchema, CreateTagSchema, DeleteTagSchema, GetTagSignatureSchema, GitLabTagSchema, GitLabTagSignatureSchema, GetMergeRequestNotesSchema, GetMergeRequestNoteSchema, DeleteMergeRequestDiscussionNoteSchema, ResolveMergeRequestThreadSchema, GetWorkItemSchema, ListWorkItemsSchema, CreateWorkItemSchema, UpdateWorkItemSchema, ConvertWorkItemTypeSchema, ListWorkItemStatusesSchema, ListWorkItemNotesSchema, CreateWorkItemNoteSchema, CreateWorkItemEmojiReactionSchema, CreateWorkItemNoteEmojiReactionSchema, ListWorkItemEmojiReactionsSchema, ListWorkItemNoteEmojiReactionsSchema, DeleteWorkItemEmojiReactionSchema, DeleteWorkItemNoteEmojiReactionSchema, MoveWorkItemSchema, ListCustomFieldDefinitionsSchema, GetTimelineEventsSchema, CreateTimelineEventSchema, ListWebhooksSchema, CreateWebhookSchema, UpdateWebhookSchema, DeleteWebhookSchema, ListWebhookEventsSchema, GetWebhookEventSchema, HealthCheckSchema, } from "./schemas.js";
|
|
115
115
|
import { randomUUID, timingSafeEqual, } from "node:crypto";
|
|
116
116
|
import { createLogger } from "./utils/logger.js";
|
|
117
117
|
const logger = createLogger();
|
|
@@ -7145,6 +7145,47 @@ async function listProjectVulnerabilities(projectId, options = {}) {
|
|
|
7145
7145
|
pageInfo: data.project.vulnerabilities.pageInfo,
|
|
7146
7146
|
};
|
|
7147
7147
|
}
|
|
7148
|
+
/**
|
|
7149
|
+
* Execute a GitLab Orbit graph query.
|
|
7150
|
+
* Note: the `llm` format returns compact plain text, not JSON.
|
|
7151
|
+
*/
|
|
7152
|
+
async function orbitQuery(query, format) {
|
|
7153
|
+
const url = new URL(`${getEffectiveApiUrl()}/orbit/query`);
|
|
7154
|
+
const response = await fetch(url.toString(), {
|
|
7155
|
+
...getFetchConfig(),
|
|
7156
|
+
method: "POST",
|
|
7157
|
+
body: JSON.stringify({ query, format }),
|
|
7158
|
+
});
|
|
7159
|
+
await handleGitLabError(response);
|
|
7160
|
+
if (format === "raw") {
|
|
7161
|
+
return response.json();
|
|
7162
|
+
}
|
|
7163
|
+
return response.text();
|
|
7164
|
+
}
|
|
7165
|
+
async function orbitGetSchema() {
|
|
7166
|
+
const url = new URL(`${getEffectiveApiUrl()}/orbit/schema`);
|
|
7167
|
+
const response = await fetch(url.toString(), {
|
|
7168
|
+
...getFetchConfig(),
|
|
7169
|
+
});
|
|
7170
|
+
await handleGitLabError(response);
|
|
7171
|
+
return response.json();
|
|
7172
|
+
}
|
|
7173
|
+
async function orbitGetStatus() {
|
|
7174
|
+
const url = new URL(`${getEffectiveApiUrl()}/orbit/status`);
|
|
7175
|
+
const response = await fetch(url.toString(), {
|
|
7176
|
+
...getFetchConfig(),
|
|
7177
|
+
});
|
|
7178
|
+
await handleGitLabError(response);
|
|
7179
|
+
return response.json();
|
|
7180
|
+
}
|
|
7181
|
+
async function orbitListTools() {
|
|
7182
|
+
const url = new URL(`${getEffectiveApiUrl()}/orbit/tools`);
|
|
7183
|
+
const response = await fetch(url.toString(), {
|
|
7184
|
+
...getFetchConfig(),
|
|
7185
|
+
});
|
|
7186
|
+
await handleGitLabError(response);
|
|
7187
|
+
return response.json();
|
|
7188
|
+
}
|
|
7148
7189
|
async function getVulnerability(vulnerabilityId) {
|
|
7149
7190
|
const data = await executeGraphQL(`query getVulnerability($id: VulnerabilityID!) {
|
|
7150
7191
|
vulnerability(id: $id) {
|
|
@@ -9907,6 +9948,31 @@ async function handleToolCall(params) {
|
|
|
9907
9948
|
const result = await confirmVulnerability(args.vulnerability_id, args.comment);
|
|
9908
9949
|
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
9909
9950
|
}
|
|
9951
|
+
case "orbit_query": {
|
|
9952
|
+
rejectIfStrictProjectScope("orbit_query");
|
|
9953
|
+
const args = OrbitQuerySchema.parse(params.arguments);
|
|
9954
|
+
const result = await orbitQuery(args.query, args.format);
|
|
9955
|
+
const text = typeof result === "string" ? result : JSON.stringify(result);
|
|
9956
|
+
return { content: [{ type: "text", text }] };
|
|
9957
|
+
}
|
|
9958
|
+
case "orbit_get_schema": {
|
|
9959
|
+
rejectIfStrictProjectScope("orbit_get_schema");
|
|
9960
|
+
OrbitSchemaSchema.parse(params.arguments);
|
|
9961
|
+
const result = await orbitGetSchema();
|
|
9962
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
9963
|
+
}
|
|
9964
|
+
case "orbit_get_status": {
|
|
9965
|
+
rejectIfStrictProjectScope("orbit_get_status");
|
|
9966
|
+
OrbitStatusSchema.parse(params.arguments);
|
|
9967
|
+
const result = await orbitGetStatus();
|
|
9968
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
9969
|
+
}
|
|
9970
|
+
case "orbit_list_tools": {
|
|
9971
|
+
rejectIfStrictProjectScope("orbit_list_tools");
|
|
9972
|
+
OrbitToolsSchema.parse(params.arguments);
|
|
9973
|
+
const result = await orbitListTools();
|
|
9974
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
9975
|
+
}
|
|
9910
9976
|
case "upload_markdown": {
|
|
9911
9977
|
if (IS_REMOTE) {
|
|
9912
9978
|
const args = MarkdownUploadRemoteSchema.parse(params.arguments);
|
package/build/schemas.js
CHANGED
|
@@ -4634,3 +4634,23 @@ export const ConfirmVulnerabilitySchema = z.object({
|
|
|
4634
4634
|
.describe("The ID of the vulnerability to confirm (numeric or GraphQL global ID)"),
|
|
4635
4635
|
comment: z.string().optional().describe("Optional comment explaining the confirmation"),
|
|
4636
4636
|
});
|
|
4637
|
+
// --- GitLab Orbit (knowledge graph) ---
|
|
4638
|
+
// Query the Orbit property graph: groups, projects, MRs, pipelines, issues,
|
|
4639
|
+
// vulnerabilities, and source code indexed as one queryable graph.
|
|
4640
|
+
// Requires Premium/Ultimate; Beta; query calls consume GitLab credits.
|
|
4641
|
+
export const OrbitQuerySchema = z.object({
|
|
4642
|
+
query: z
|
|
4643
|
+
.record(z.string(), z.unknown())
|
|
4644
|
+
.describe("GitLab Orbit query DSL object (see the Orbit query-language reference for node/edge types and operators)"),
|
|
4645
|
+
format: z
|
|
4646
|
+
.enum(["raw", "llm"])
|
|
4647
|
+
.optional()
|
|
4648
|
+
.default("llm")
|
|
4649
|
+
.describe("Response format: 'raw' for structured JSON, 'llm' for compact agent-optimized text (default)"),
|
|
4650
|
+
});
|
|
4651
|
+
// Schema for fetching the current Orbit graph schema (node/edge types)
|
|
4652
|
+
export const OrbitSchemaSchema = z.object({});
|
|
4653
|
+
// Schema for checking Orbit indexing status
|
|
4654
|
+
export const OrbitStatusSchema = z.object({});
|
|
4655
|
+
// Schema for listing the MCP tool definitions Orbit exposes
|
|
4656
|
+
export const OrbitToolsSchema = z.object({});
|
|
@@ -119,6 +119,10 @@ const GROUP_META = {
|
|
|
119
119
|
title: "Vulnerabilities",
|
|
120
120
|
blurb: "AI-assisted vulnerability triage — list findings, inspect details, dismiss with reason, or confirm for remediation. Backed by the GitLab GraphQL API; requires GitLab Ultimate.",
|
|
121
121
|
},
|
|
122
|
+
orbit: {
|
|
123
|
+
title: "GitLab Orbit",
|
|
124
|
+
blurb: "Query the Orbit SDLC knowledge graph (Beta; Premium/Ultimate). Graph queries consume GitLab credits; schema, status, and tool listing are free.",
|
|
125
|
+
},
|
|
122
126
|
};
|
|
123
127
|
const GROUP_ORDER = [
|
|
124
128
|
"projects",
|
|
@@ -141,6 +145,7 @@ const GROUP_ORDER = [
|
|
|
141
145
|
"search",
|
|
142
146
|
"dependency_proxy",
|
|
143
147
|
"vulnerabilities",
|
|
148
|
+
"orbit",
|
|
144
149
|
];
|
|
145
150
|
// Authoritative classification — uses the `readOnlyTools` set from
|
|
146
151
|
// tools/registry.ts. That set is what the server itself consults to decide
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { describe, test, before, after } from "node:test";
|
|
2
|
+
import assert from "node:assert";
|
|
3
|
+
import { spawn } from "child_process";
|
|
4
|
+
import { MockGitLabServer, findMockServerPort } from "./utils/mock-gitlab-server.js";
|
|
5
|
+
const MOCK_TOKEN = "glpat-mock-token-12345";
|
|
6
|
+
const mockSchema = {
|
|
7
|
+
nodes: [{ name: "Project", properties: ["id", "name"] }],
|
|
8
|
+
edges: [{ name: "HAS_MERGE_REQUEST", from: "Project", to: "MergeRequest" }],
|
|
9
|
+
};
|
|
10
|
+
const mockStatus = {
|
|
11
|
+
status: "ready",
|
|
12
|
+
last_indexed_at: "2026-09-05T10:00:00Z",
|
|
13
|
+
indexed_groups: 3,
|
|
14
|
+
};
|
|
15
|
+
const mockTools = {
|
|
16
|
+
tools: [{ name: "orbit_query", description: "Execute a graph query" }],
|
|
17
|
+
};
|
|
18
|
+
const mockQueryRaw = {
|
|
19
|
+
results: [{ project: "group/a", failures: 7 }],
|
|
20
|
+
};
|
|
21
|
+
const mockQueryLlm = "Top failing project: group/a (7 failures).";
|
|
22
|
+
function baseEnv(mockGitLabUrl) {
|
|
23
|
+
return {
|
|
24
|
+
GITLAB_API_URL: `${mockGitLabUrl}/api/v4`,
|
|
25
|
+
GITLAB_PERSONAL_ACCESS_TOKEN: MOCK_TOKEN,
|
|
26
|
+
GITLAB_TOOLSETS: "orbit",
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
async function callToolAsync(env, name, args) {
|
|
30
|
+
return new Promise((resolve, reject) => {
|
|
31
|
+
const proc = spawn("node", ["build/index.js"], {
|
|
32
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
33
|
+
env: { ...process.env, ...env },
|
|
34
|
+
});
|
|
35
|
+
let output = "";
|
|
36
|
+
let errorOutput = "";
|
|
37
|
+
proc.stdout?.on("data", (chunk) => (output += chunk));
|
|
38
|
+
proc.stderr?.on("data", (chunk) => (errorOutput += chunk));
|
|
39
|
+
proc.on("close", code => {
|
|
40
|
+
if (code !== 0) {
|
|
41
|
+
return reject(new Error(`Process exited with code ${code}: ${errorOutput}`));
|
|
42
|
+
}
|
|
43
|
+
const line = output.split("\n").find(entry => entry.startsWith("{"));
|
|
44
|
+
if (!line) {
|
|
45
|
+
return reject(new Error("No JSON output found"));
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
const response = JSON.parse(line);
|
|
49
|
+
if (response.error) {
|
|
50
|
+
reject(new Error(JSON.stringify(response.error)));
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const content = response.result?.content?.[0]?.text;
|
|
54
|
+
if (content === undefined) {
|
|
55
|
+
reject(new Error("No tool result content"));
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
resolve(content);
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
reject(error);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
proc.stdin?.end(JSON.stringify({
|
|
65
|
+
jsonrpc: "2.0",
|
|
66
|
+
id: 1,
|
|
67
|
+
method: "tools/call",
|
|
68
|
+
params: { name, arguments: args },
|
|
69
|
+
}) + "\n");
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
describe("orbit tools", () => {
|
|
73
|
+
let mockGitLab;
|
|
74
|
+
let mockGitLabUrl;
|
|
75
|
+
let lastQueryBody = null;
|
|
76
|
+
before(async () => {
|
|
77
|
+
const mockPort = await findMockServerPort();
|
|
78
|
+
mockGitLab = new MockGitLabServer({
|
|
79
|
+
port: mockPort,
|
|
80
|
+
validTokens: [MOCK_TOKEN],
|
|
81
|
+
});
|
|
82
|
+
mockGitLab.addMockHandler("get", "/orbit/schema", (_req, res) => {
|
|
83
|
+
res.json(mockSchema);
|
|
84
|
+
});
|
|
85
|
+
mockGitLab.addMockHandler("get", "/orbit/status", (_req, res) => {
|
|
86
|
+
res.json(mockStatus);
|
|
87
|
+
});
|
|
88
|
+
mockGitLab.addMockHandler("get", "/orbit/tools", (_req, res) => {
|
|
89
|
+
res.json(mockTools);
|
|
90
|
+
});
|
|
91
|
+
mockGitLab.addMockHandler("post", "/orbit/query", (req, res) => {
|
|
92
|
+
lastQueryBody = req.body;
|
|
93
|
+
if (req.body?.format === "raw") {
|
|
94
|
+
res.json(mockQueryRaw);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
res.type("text/plain").send(mockQueryLlm);
|
|
98
|
+
});
|
|
99
|
+
await mockGitLab.start();
|
|
100
|
+
mockGitLabUrl = mockGitLab.getUrl();
|
|
101
|
+
});
|
|
102
|
+
after(async () => {
|
|
103
|
+
await mockGitLab.stop();
|
|
104
|
+
});
|
|
105
|
+
test("orbit_get_schema returns the graph schema", async () => {
|
|
106
|
+
const text = await callToolAsync(baseEnv(mockGitLabUrl), "orbit_get_schema", {});
|
|
107
|
+
assert.deepEqual(JSON.parse(text), mockSchema);
|
|
108
|
+
});
|
|
109
|
+
test("orbit_get_status returns indexing status", async () => {
|
|
110
|
+
const text = await callToolAsync(baseEnv(mockGitLabUrl), "orbit_get_status", {});
|
|
111
|
+
assert.deepEqual(JSON.parse(text), mockStatus);
|
|
112
|
+
});
|
|
113
|
+
test("orbit_list_tools returns tool definitions", async () => {
|
|
114
|
+
const text = await callToolAsync(baseEnv(mockGitLabUrl), "orbit_list_tools", {});
|
|
115
|
+
assert.deepEqual(JSON.parse(text), mockTools);
|
|
116
|
+
});
|
|
117
|
+
test("orbit_query with format=raw returns structured JSON", async () => {
|
|
118
|
+
const query = { node: "Project", limit: 5 };
|
|
119
|
+
const text = await callToolAsync(baseEnv(mockGitLabUrl), "orbit_query", {
|
|
120
|
+
query,
|
|
121
|
+
format: "raw",
|
|
122
|
+
});
|
|
123
|
+
assert.deepEqual(JSON.parse(text), mockQueryRaw);
|
|
124
|
+
assert.deepEqual(lastQueryBody, { query, format: "raw" });
|
|
125
|
+
});
|
|
126
|
+
test("orbit_query defaults to llm format and passes text through", async () => {
|
|
127
|
+
const query = { node: "Project", limit: 5 };
|
|
128
|
+
const text = await callToolAsync(baseEnv(mockGitLabUrl), "orbit_query", { query });
|
|
129
|
+
assert.equal(text, mockQueryLlm);
|
|
130
|
+
assert.deepEqual(lastQueryBody, { query, format: "llm" });
|
|
131
|
+
});
|
|
132
|
+
for (const toolName of [
|
|
133
|
+
"orbit_query",
|
|
134
|
+
"orbit_get_schema",
|
|
135
|
+
"orbit_get_status",
|
|
136
|
+
"orbit_list_tools",
|
|
137
|
+
]) {
|
|
138
|
+
test(`${toolName} is refused under strict project scope`, async () => {
|
|
139
|
+
const env = {
|
|
140
|
+
...baseEnv(mockGitLabUrl),
|
|
141
|
+
ENABLE_STRICT_PROJECT_SCOPE: "true",
|
|
142
|
+
GITLAB_ALLOWED_PROJECT_IDS: "1,2",
|
|
143
|
+
};
|
|
144
|
+
const args = toolName === "orbit_query" ? { query: {} } : {};
|
|
145
|
+
let message = "";
|
|
146
|
+
try {
|
|
147
|
+
message = await callToolAsync(env, toolName, args);
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
message = error.message;
|
|
151
|
+
}
|
|
152
|
+
assert.match(message, /not allowed while a project allowlist is in effect/);
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
});
|
|
@@ -36,6 +36,7 @@ const TOOLSET_TOOL_COUNTS = {
|
|
|
36
36
|
variables: 10,
|
|
37
37
|
dependency_proxy: 4,
|
|
38
38
|
vulnerabilities: 4,
|
|
39
|
+
orbit: 4,
|
|
39
40
|
};
|
|
40
41
|
const LEGACY_PIPELINE_CI_TOOL_COUNT = 2;
|
|
41
42
|
const LEGACY_PIPELINE_TOOL_COUNT = TOOLSET_TOOL_COUNTS.pipelines + LEGACY_PIPELINE_CI_TOOL_COUNT;
|
|
@@ -62,6 +63,7 @@ const NON_DEFAULT_TOOLSETS = [
|
|
|
62
63
|
"variables",
|
|
63
64
|
"dependency_proxy",
|
|
64
65
|
"vulnerabilities",
|
|
66
|
+
"orbit",
|
|
65
67
|
];
|
|
66
68
|
// discover_tools meta-tool is always force-injected (Step 5.5)
|
|
67
69
|
const DISCOVER_TOOLS_COUNT = 1;
|
package/build/tools/registry.js
CHANGED
|
@@ -2,7 +2,7 @@ import { zodToJsonSchema } from "zod-to-json-schema";
|
|
|
2
2
|
import { toJSONSchema } from "../utils/schema.js";
|
|
3
3
|
import { USE_GITLAB_WIKI, USE_MILESTONE, USE_PIPELINE, SSE, STREAMABLE_HTTP, } from "../config.js";
|
|
4
4
|
import { getToolDescription } from "./tool-descriptions.js";
|
|
5
|
-
import { ApproveMergeRequestSchema, BulkPublishDraftNotesSchema, CancelPipelineJobSchema, ErasePipelineJobSchema, CancelPipelineSchema, ConvertWorkItemTypeSchema, CreateBranchSchema, CreateDraftNoteSchema, CreateGroupSchema, CreateGroupWikiPageSchema, CreateIssueLinkSchema, CreateIssueNoteSchema, CreateIssueSchema, CreateIssueEmojiReactionSchema, CreateIssueNoteEmojiReactionSchema, ListIssueEmojiReactionsSchema, ListIssueNoteEmojiReactionsSchema, CreateLabelSchema, MarkAllTodosDoneSchema, ListTodosSchema, MarkTodoDoneSchema, CreateMergeRequestDiscussionNoteSchema, CreateMergeRequestEmojiReactionSchema, ListMergeRequestEmojiReactionsSchema, ListMergeRequestNoteEmojiReactionsSchema, CreateMergeRequestNoteSchema, CreateMergeRequestNoteEmojiReactionSchema, CreateMergeRequestSchema, CreateMergeRequestThreadSchema, CreateNoteSchema, CreateCommitStatusSchema, CreateOrUpdateFileSchema, CreatePipelineSchema, CreateProjectMilestoneSchema, CreateGroupMilestoneSchema, CreateReleaseEvidenceSchema, CreateReleaseSchema, CreateRepositorySchema, CreateTagSchema, CreateTimelineEventSchema, CreateWebhookSchema, CreateWikiPageSchema, CreateWorkItemNoteSchema, CreateWorkItemEmojiReactionSchema, CreateWorkItemNoteEmojiReactionSchema, ListWorkItemEmojiReactionsSchema, ListWorkItemNoteEmojiReactionsSchema, CreateWorkItemSchema, DeleteBranchSchema, GetProtectedBranchSchema, ListProtectedBranchesSchema, ProtectBranchSchema, UnprotectBranchSchema, UpdateDefaultBranchSchema, DeleteDraftNoteSchema, DeleteGroupMilestoneSchema, DeleteGroupWikiPageSchema, DeleteIssueLinkSchema, DeleteIssueSchema, DeleteIssueEmojiReactionSchema, DeleteIssueNoteEmojiReactionSchema, DeleteLabelSchema, DeleteMergeRequestDiscussionNoteSchema, DeleteMergeRequestNoteSchema, DeleteMergeRequestEmojiReactionSchema, DeleteMergeRequestNoteEmojiReactionSchema, DeleteProjectMilestoneSchema, DeleteReleaseSchema, DeleteTagSchema, DeleteWebhookSchema, DeleteWikiPageSchema, DeleteWorkItemEmojiReactionSchema, DeleteWorkItemNoteEmojiReactionSchema, DownloadAttachmentSchema, DownloadAttachmentRemoteSchema, DownloadJobArtifactsSchema, DownloadJobArtifactsRemoteSchema, DownloadReleaseAssetSchema, EditProjectMilestoneSchema, EditGroupMilestoneSchema, ExecuteGraphQLSchema, ForkRepositorySchema, HealthCheckSchema, GetBranchSchema, GetBranchDiffsSchema, GetCommitDiffSchema, GetCommitSchema, GetFileBlameSchema, GetDeploymentSchema, CreateDeploymentSchema, UpdateDeploymentSchema, DeploymentApprovalSchema, ListDeploymentMergeRequestsSchema, GetDraftNoteSchema, GetEnvironmentSchema, UpdateEnvironmentSchema, StopEnvironmentSchema, StopStaleEnvironmentsSchema, DeleteReviewAppEnvironmentsSchema, PipelineTriggerIdSchema, ListPipelineTriggersSchema, CreatePipelineTriggerSchema, UpdatePipelineTriggerSchema, TriggerPipelineSchema, GetFileContentsSchema, GetGroupWikiPageSchema, GetIssueLinkSchema, GetIssueSchema, GetJobArtifactFileSchema, GetLabelSchema, GetMergeRequestApprovalStateSchema, GetMergeRequestConflictsSchema, GetMergeRequestDiffsSchema, GetMergeRequestFileDiffSchema, GetMergeRequestNoteSchema, GetMergeRequestNotesSchema, GetMergeRequestSchema, GetMergeRequestVersionSchema, GetMilestoneBurndownEventsSchema, GetMilestoneIssuesSchema, GetMilestoneMergeRequestsSchema, GetGroupMilestoneSchema, GetGroupMilestoneIssuesSchema, GetGroupMilestoneMergeRequestsSchema, GetGroupMilestoneBurndownEventsSchema, GetNamespaceSchema, GetPipelineJobOutputSchema, PipelineJobControlSchema, GetPipelineSchema, GetPipelineVariablesSchema, UpdatePipelineMetadataSchema, DeletePipelineSchema, PipelineReportSchema, WaitForPipelineSchema, WaitForPipelineJobSchema, PlayPipelineJobsSchema, GetProjectEventsSchema, GetProjectMilestoneSchema, GetProjectSchema, GetReleaseSchema, GetRepositoryTreeSchema, GetTagSchema, GetTagSignatureSchema, GetTimelineEventsSchema, GetUsersSchema, GetUserSchema, WhoAmISchema, GetWebhookEventSchema, GetWikiPageSchema, GetWorkItemSchema, ListBranchesSchema, ListCommitsSchema, ListCommitStatusesSchema, ListCustomFieldDefinitionsSchema, ListDeploymentsSchema, ListDraftNotesSchema, ListEnvironmentsSchema, ListEventsSchema, ListGroupIterationsSchema, ListGroupMilestonesSchema, ListGroupProjectsSchema, ListGroupWikiPagesSchema, ListIssueDiscussionsSchema, ListIssueLinksSchema, ListIssuesSchema, ListJobArtifactsSchema, ListLabelsSchema, ListMergeRequestChangedFilesSchema, ListMergeRequestDiffsSchema, ListMergeRequestDiscussionsSchema, ListMergeRequestPipelinesSchema, ListMergeRequestVersionsSchema, ListMergeRequestsSchema, ListGroupMergeRequestsSchema, ListNamespacesSchema, ListPipelineJobsSchema, ListPipelineTriggerJobsSchema, ValidateCiLintSchema, ValidateProjectCiLintSchema, ListCiCatalogResourcesSchema, GetCiCatalogResourceSchema, ListPipelinesSchema, ListPipelineSchedulesSchema, GetPipelineScheduleSchema, ListPipelineSchedulePipelinesSchema, CreatePipelineScheduleSchema, UpdatePipelineScheduleSchema, DeletePipelineScheduleSchema, PlayPipelineScheduleSchema, TakeOwnershipPipelineScheduleSchema, GetPipelineScheduleVariableSchema, CreatePipelineScheduleVariableSchema, UpdatePipelineScheduleVariableSchema, DeletePipelineScheduleVariableSchema, ListGroupMembersSchema, ListProjectMembersSchema, ListProjectMilestonesSchema, ListProjectsSchema, ListReleasesSchema, ListTagsSchema, ListWebhookEventsSchema, ListWebhooksSchema, ListWikiPagesSchema, ListWorkItemNotesSchema, ListWorkItemStatusesSchema, ListWorkItemsSchema, MarkdownUploadSchema, MarkdownUploadRemoteSchema, MergeMergeRequestSchema, MoveWorkItemSchema, MyIssuesSchema, PlayPipelineJobSchema, PromoteProjectMilestoneSchema, PublishDraftNoteSchema, PushFilesSchema, ResolveMergeRequestThreadSchema, RetryPipelineJobSchema, RetryPipelineSchema, SearchCodeSchema, SearchGroupCodeSchema, SearchProjectCodeSchema, SearchRepositoriesSchema, UnapproveMergeRequestSchema, UpdateDraftNoteSchema, UpdateGroupWikiPageSchema, UpdateIssueNoteSchema, UpdateIssueSchema, UpdateIssueDescriptionPatchSchema, UpdateLabelSchema, UpdateProjectSchema, UpdateMergeRequestDiscussionNoteSchema, UpdateMergeRequestNoteSchema, UpdateMergeRequestSchema, UpdateReleaseSchema, UpdateWebhookSchema, UpdateWikiPageSchema, UpdateWorkItemSchema, VerifyNamespaceSchema, ListProjectVariablesSchema, GetProjectVariableSchema, CreateProjectVariableSchema, UpdateProjectVariableSchema, DeleteProjectVariableSchema, ListGroupVariablesSchema, GetGroupVariableSchema, CreateGroupVariableSchema, UpdateGroupVariableSchema, DeleteGroupVariableSchema, GetDependencyProxySettingsSchema, UpdateDependencyProxySettingsSchema, ListDependencyProxyBlobsSchema, PurgeDependencyProxyCacheSchema, ListProjectVulnerabilitiesSchema, GetVulnerabilitySchema, DismissVulnerabilitySchema, ConfirmVulnerabilitySchema, } from "../schemas.js";
|
|
5
|
+
import { ApproveMergeRequestSchema, BulkPublishDraftNotesSchema, CancelPipelineJobSchema, ErasePipelineJobSchema, CancelPipelineSchema, ConvertWorkItemTypeSchema, CreateBranchSchema, CreateDraftNoteSchema, CreateGroupSchema, CreateGroupWikiPageSchema, CreateIssueLinkSchema, CreateIssueNoteSchema, CreateIssueSchema, CreateIssueEmojiReactionSchema, CreateIssueNoteEmojiReactionSchema, ListIssueEmojiReactionsSchema, ListIssueNoteEmojiReactionsSchema, CreateLabelSchema, MarkAllTodosDoneSchema, ListTodosSchema, MarkTodoDoneSchema, CreateMergeRequestDiscussionNoteSchema, CreateMergeRequestEmojiReactionSchema, ListMergeRequestEmojiReactionsSchema, ListMergeRequestNoteEmojiReactionsSchema, CreateMergeRequestNoteSchema, CreateMergeRequestNoteEmojiReactionSchema, CreateMergeRequestSchema, CreateMergeRequestThreadSchema, CreateNoteSchema, CreateCommitStatusSchema, CreateOrUpdateFileSchema, CreatePipelineSchema, CreateProjectMilestoneSchema, CreateGroupMilestoneSchema, CreateReleaseEvidenceSchema, CreateReleaseSchema, CreateRepositorySchema, CreateTagSchema, CreateTimelineEventSchema, CreateWebhookSchema, CreateWikiPageSchema, CreateWorkItemNoteSchema, CreateWorkItemEmojiReactionSchema, CreateWorkItemNoteEmojiReactionSchema, ListWorkItemEmojiReactionsSchema, ListWorkItemNoteEmojiReactionsSchema, CreateWorkItemSchema, DeleteBranchSchema, GetProtectedBranchSchema, ListProtectedBranchesSchema, ProtectBranchSchema, UnprotectBranchSchema, UpdateDefaultBranchSchema, DeleteDraftNoteSchema, DeleteGroupMilestoneSchema, DeleteGroupWikiPageSchema, DeleteIssueLinkSchema, DeleteIssueSchema, DeleteIssueEmojiReactionSchema, DeleteIssueNoteEmojiReactionSchema, DeleteLabelSchema, DeleteMergeRequestDiscussionNoteSchema, DeleteMergeRequestNoteSchema, DeleteMergeRequestEmojiReactionSchema, DeleteMergeRequestNoteEmojiReactionSchema, DeleteProjectMilestoneSchema, DeleteReleaseSchema, DeleteTagSchema, DeleteWebhookSchema, DeleteWikiPageSchema, DeleteWorkItemEmojiReactionSchema, DeleteWorkItemNoteEmojiReactionSchema, DownloadAttachmentSchema, DownloadAttachmentRemoteSchema, DownloadJobArtifactsSchema, DownloadJobArtifactsRemoteSchema, DownloadReleaseAssetSchema, EditProjectMilestoneSchema, EditGroupMilestoneSchema, ExecuteGraphQLSchema, ForkRepositorySchema, HealthCheckSchema, GetBranchSchema, GetBranchDiffsSchema, GetCommitDiffSchema, GetCommitSchema, GetFileBlameSchema, GetDeploymentSchema, CreateDeploymentSchema, UpdateDeploymentSchema, DeploymentApprovalSchema, ListDeploymentMergeRequestsSchema, GetDraftNoteSchema, GetEnvironmentSchema, UpdateEnvironmentSchema, StopEnvironmentSchema, StopStaleEnvironmentsSchema, DeleteReviewAppEnvironmentsSchema, PipelineTriggerIdSchema, ListPipelineTriggersSchema, CreatePipelineTriggerSchema, UpdatePipelineTriggerSchema, TriggerPipelineSchema, GetFileContentsSchema, GetGroupWikiPageSchema, GetIssueLinkSchema, GetIssueSchema, GetJobArtifactFileSchema, GetLabelSchema, GetMergeRequestApprovalStateSchema, GetMergeRequestConflictsSchema, GetMergeRequestDiffsSchema, GetMergeRequestFileDiffSchema, GetMergeRequestNoteSchema, GetMergeRequestNotesSchema, GetMergeRequestSchema, GetMergeRequestVersionSchema, GetMilestoneBurndownEventsSchema, GetMilestoneIssuesSchema, GetMilestoneMergeRequestsSchema, GetGroupMilestoneSchema, GetGroupMilestoneIssuesSchema, GetGroupMilestoneMergeRequestsSchema, GetGroupMilestoneBurndownEventsSchema, GetNamespaceSchema, GetPipelineJobOutputSchema, PipelineJobControlSchema, GetPipelineSchema, GetPipelineVariablesSchema, UpdatePipelineMetadataSchema, DeletePipelineSchema, PipelineReportSchema, WaitForPipelineSchema, WaitForPipelineJobSchema, PlayPipelineJobsSchema, GetProjectEventsSchema, GetProjectMilestoneSchema, GetProjectSchema, GetReleaseSchema, GetRepositoryTreeSchema, GetTagSchema, GetTagSignatureSchema, GetTimelineEventsSchema, GetUsersSchema, GetUserSchema, WhoAmISchema, GetWebhookEventSchema, GetWikiPageSchema, GetWorkItemSchema, ListBranchesSchema, ListCommitsSchema, ListCommitStatusesSchema, ListCustomFieldDefinitionsSchema, ListDeploymentsSchema, ListDraftNotesSchema, ListEnvironmentsSchema, ListEventsSchema, ListGroupIterationsSchema, ListGroupMilestonesSchema, ListGroupProjectsSchema, ListGroupWikiPagesSchema, ListIssueDiscussionsSchema, ListIssueLinksSchema, ListIssuesSchema, ListJobArtifactsSchema, ListLabelsSchema, ListMergeRequestChangedFilesSchema, ListMergeRequestDiffsSchema, ListMergeRequestDiscussionsSchema, ListMergeRequestPipelinesSchema, ListMergeRequestVersionsSchema, ListMergeRequestsSchema, ListGroupMergeRequestsSchema, ListNamespacesSchema, ListPipelineJobsSchema, ListPipelineTriggerJobsSchema, ValidateCiLintSchema, ValidateProjectCiLintSchema, ListCiCatalogResourcesSchema, GetCiCatalogResourceSchema, ListPipelinesSchema, ListPipelineSchedulesSchema, GetPipelineScheduleSchema, ListPipelineSchedulePipelinesSchema, CreatePipelineScheduleSchema, UpdatePipelineScheduleSchema, DeletePipelineScheduleSchema, PlayPipelineScheduleSchema, TakeOwnershipPipelineScheduleSchema, GetPipelineScheduleVariableSchema, CreatePipelineScheduleVariableSchema, UpdatePipelineScheduleVariableSchema, DeletePipelineScheduleVariableSchema, ListGroupMembersSchema, ListProjectMembersSchema, ListProjectMilestonesSchema, ListProjectsSchema, ListReleasesSchema, ListTagsSchema, ListWebhookEventsSchema, ListWebhooksSchema, ListWikiPagesSchema, ListWorkItemNotesSchema, ListWorkItemStatusesSchema, ListWorkItemsSchema, MarkdownUploadSchema, MarkdownUploadRemoteSchema, MergeMergeRequestSchema, MoveWorkItemSchema, MyIssuesSchema, OrbitQuerySchema, OrbitSchemaSchema, OrbitStatusSchema, OrbitToolsSchema, PlayPipelineJobSchema, PromoteProjectMilestoneSchema, PublishDraftNoteSchema, PushFilesSchema, ResolveMergeRequestThreadSchema, RetryPipelineJobSchema, RetryPipelineSchema, SearchCodeSchema, SearchGroupCodeSchema, SearchProjectCodeSchema, SearchRepositoriesSchema, UnapproveMergeRequestSchema, UpdateDraftNoteSchema, UpdateGroupWikiPageSchema, UpdateIssueNoteSchema, UpdateIssueSchema, UpdateIssueDescriptionPatchSchema, UpdateLabelSchema, UpdateProjectSchema, UpdateMergeRequestDiscussionNoteSchema, UpdateMergeRequestNoteSchema, UpdateMergeRequestSchema, UpdateReleaseSchema, UpdateWebhookSchema, UpdateWikiPageSchema, UpdateWorkItemSchema, VerifyNamespaceSchema, ListProjectVariablesSchema, GetProjectVariableSchema, CreateProjectVariableSchema, UpdateProjectVariableSchema, DeleteProjectVariableSchema, ListGroupVariablesSchema, GetGroupVariableSchema, CreateGroupVariableSchema, UpdateGroupVariableSchema, DeleteGroupVariableSchema, GetDependencyProxySettingsSchema, UpdateDependencyProxySettingsSchema, ListDependencyProxyBlobsSchema, PurgeDependencyProxyCacheSchema, ListProjectVulnerabilitiesSchema, GetVulnerabilitySchema, DismissVulnerabilitySchema, ConfirmVulnerabilitySchema, } from "../schemas.js";
|
|
6
6
|
const IS_REMOTE = SSE || STREAMABLE_HTTP;
|
|
7
7
|
// Define all available tools
|
|
8
8
|
export const allTools = [
|
|
@@ -1223,6 +1223,27 @@ export const allTools = [
|
|
|
1223
1223
|
description: "Confirm a vulnerability as a real finding requiring remediation",
|
|
1224
1224
|
inputSchema: toJSONSchema(ConfirmVulnerabilitySchema),
|
|
1225
1225
|
},
|
|
1226
|
+
// --- GitLab Orbit (knowledge graph) tools ---
|
|
1227
|
+
{
|
|
1228
|
+
name: "orbit_query",
|
|
1229
|
+
description: "Execute a GitLab Orbit graph query over the indexed SDLC knowledge graph",
|
|
1230
|
+
inputSchema: toJSONSchema(OrbitQuerySchema),
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
name: "orbit_get_schema",
|
|
1234
|
+
description: "Fetch the current GitLab Orbit graph schema (node and edge types)",
|
|
1235
|
+
inputSchema: toJSONSchema(OrbitSchemaSchema),
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
name: "orbit_get_status",
|
|
1239
|
+
description: "Check GitLab Orbit indexing status for the enabled scope",
|
|
1240
|
+
inputSchema: toJSONSchema(OrbitStatusSchema),
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
name: "orbit_list_tools",
|
|
1244
|
+
description: "List the MCP tool definitions exposed by GitLab Orbit",
|
|
1245
|
+
inputSchema: toJSONSchema(OrbitToolsSchema),
|
|
1246
|
+
},
|
|
1226
1247
|
// --- Meta tool: Dynamic tool discovery ---
|
|
1227
1248
|
{
|
|
1228
1249
|
name: "discover_tools",
|
|
@@ -1373,6 +1394,10 @@ export const readOnlyTools = new Set([
|
|
|
1373
1394
|
"list_dependency_proxy_blobs",
|
|
1374
1395
|
"list_project_vulnerabilities",
|
|
1375
1396
|
"get_vulnerability",
|
|
1397
|
+
"orbit_query",
|
|
1398
|
+
"orbit_get_schema",
|
|
1399
|
+
"orbit_get_status",
|
|
1400
|
+
"orbit_list_tools",
|
|
1376
1401
|
]);
|
|
1377
1402
|
// Define which tools are destructive (data loss potential)
|
|
1378
1403
|
export const destructiveTools = new Set([
|
|
@@ -1917,6 +1942,11 @@ export const TOOLSET_DEFINITIONS = [
|
|
|
1917
1942
|
"confirm_vulnerability",
|
|
1918
1943
|
]),
|
|
1919
1944
|
},
|
|
1945
|
+
{
|
|
1946
|
+
id: "orbit",
|
|
1947
|
+
isDefault: false,
|
|
1948
|
+
tools: new Set(["orbit_query", "orbit_get_schema", "orbit_get_status", "orbit_list_tools"]),
|
|
1949
|
+
},
|
|
1920
1950
|
];
|
|
1921
1951
|
// Derived lookup: tool name → toolset ID
|
|
1922
1952
|
export const TOOLSET_BY_TOOL_NAME = new Map();
|
|
@@ -48,6 +48,10 @@ const TOOL_GUIDANCE = {
|
|
|
48
48
|
delete_pipeline_schedule_variable: "Use this only after confirming the key with `get_pipeline_schedule` or `get_pipeline_schedule_variable`; use `update_pipeline_schedule_variable` to change a value without removing it. The operation permanently removes the variable from the schedule so later scheduled pipelines no longer receive it, requires the Developer, Maintainer, or Owner role and ownership of the schedule, and returns a confirmation or a missing-key or permission error.",
|
|
49
49
|
stop_stale_environments: "Use this to stop eligible stale environments in a project. GitLab excludes protected environments, and this operation stops environments without deleting them. It requires the necessary project permission and returns the result or a validation, permission, or rate-limit error.",
|
|
50
50
|
delete_review_app_environments: "Use this to clean up stopped review-app environments after verifying the scope. GitLab schedules deletion one week later rather than deleting environments immediately; `dry_run` defaults to `true`, so actual scheduling requires `dry_run: false`. It requires the necessary project permission and returns the cleanup result or a validation, permission, or rate-limit error.",
|
|
51
|
+
orbit_query: "Use this to answer cross-project relationship questions (blast radius, file-to-MR history, dependency fans) in one call instead of chaining list/get tools; use `orbit_get_schema` first when the node/edge types are unknown. It is read-only but each call consumes GitLab credits, requires Premium/Ultimate on an Orbit-enabled scope, and returns the graph result or a query/permission error.",
|
|
52
|
+
orbit_get_schema: "Use this to learn the node and edge types available for `orbit_query` before writing a query; use `orbit_get_status` when the concern is index freshness rather than shape. It is read-only and free of credit charges, and returns the current graph schema or a permission error.",
|
|
53
|
+
orbit_get_status: "Use this to check whether Orbit indexing has completed before trusting `orbit_query` results; results reflect the last index cycle, not real-time state. It is read-only and free of credit charges, and returns the indexing status or a permission error.",
|
|
54
|
+
orbit_list_tools: "Use this to see which MCP tool definitions Orbit itself exposes; use `orbit_query` to run graph queries directly. It is read-only and free of credit charges, and returns the tool definition list or a permission error.",
|
|
51
55
|
};
|
|
52
56
|
const PARAMETER_GUIDANCE = "When `project_id` or `group_id` is accepted, provide the numeric ID or complete URL-encoded path described by the schema; use required identifiers and pagination fields exactly as documented.";
|
|
53
57
|
function ensureSentence(text) {
|
package/package.json
CHANGED