@zereight/mcp-gitlab 2.1.58 → 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 +13 -1
- package/README.md +163 -126
- package/README.zh-CN.md +13 -1
- package/build/index.js +303 -13
- package/build/schemas.js +157 -3
- package/build/scripts/check-skill-sync.js +5 -0
- package/build/scripts/generate-tool-docs.js +5 -0
- package/build/test/test-deployment-tools.js +84 -1
- package/build/test/test-orbit.js +155 -0
- package/build/test/test-permission-mode.js +1 -0
- package/build/test/test-toolset-filtering.js +3 -1
- package/build/tools/registry.js +136 -2
- package/build/tools/tool-descriptions.js +6 -0
- package/build/utils/redact-sensitive.js +11 -4
- package/package.json +1 -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, 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, GetDraftNoteSchema, GetEnvironmentSchema, 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, 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 = [
|
|
@@ -550,6 +550,15 @@ export const allTools = [
|
|
|
550
550
|
description: "Get details of a specific pipeline",
|
|
551
551
|
inputSchema: toJSONSchema(GetPipelineSchema),
|
|
552
552
|
},
|
|
553
|
+
{
|
|
554
|
+
name: "get_pipeline_variables",
|
|
555
|
+
description: "Get variables configured for a pipeline",
|
|
556
|
+
inputSchema: toJSONSchema(GetPipelineVariablesSchema),
|
|
557
|
+
},
|
|
558
|
+
{ name: "get_pipeline_test_report", description: "Get pipeline test report", inputSchema: toJSONSchema(PipelineReportSchema) },
|
|
559
|
+
{ name: "get_pipeline_test_report_summary", description: "Get pipeline test report summary", inputSchema: toJSONSchema(PipelineReportSchema) },
|
|
560
|
+
{ name: "delete_pipeline", description: "Delete a pipeline. Requires the project Owner role, cannot be undone, and does not automatically delete child pipelines.", inputSchema: toJSONSchema(DeletePipelineSchema) },
|
|
561
|
+
{ name: "update_pipeline_metadata", description: "Update pipeline metadata", inputSchema: toJSONSchema(UpdatePipelineMetadataSchema) },
|
|
553
562
|
{
|
|
554
563
|
name: "list_deployments",
|
|
555
564
|
description: "List deployments with filtering options",
|
|
@@ -557,9 +566,14 @@ export const allTools = [
|
|
|
557
566
|
},
|
|
558
567
|
{
|
|
559
568
|
name: "get_deployment",
|
|
560
|
-
description: "Get details
|
|
569
|
+
description: "Get deployment details, including approval_summary, approvals, and pending_approval_count when GitLab provides them",
|
|
561
570
|
inputSchema: toJSONSchema(GetDeploymentSchema),
|
|
562
571
|
},
|
|
572
|
+
{ name: "create_deployment", description: "Create a deployment", inputSchema: toJSONSchema(CreateDeploymentSchema) },
|
|
573
|
+
{ name: "update_deployment", description: "Update a deployment status", inputSchema: toJSONSchema(UpdateDeploymentSchema) },
|
|
574
|
+
{ name: "delete_deployment", description: "Delete a deployment", inputSchema: toJSONSchema(GetDeploymentSchema) },
|
|
575
|
+
{ name: "list_deployment_merge_requests", description: "List merge requests shipped with a deployment", inputSchema: toJSONSchema(ListDeploymentMergeRequestsSchema) },
|
|
576
|
+
{ name: "approve_deployment", description: "Approve or reject a protected-environment deployment", inputSchema: toJSONSchema(DeploymentApprovalSchema) },
|
|
563
577
|
{
|
|
564
578
|
name: "list_environments",
|
|
565
579
|
description: "List environments in a project",
|
|
@@ -570,6 +584,17 @@ export const allTools = [
|
|
|
570
584
|
description: "Get details of a specific environment",
|
|
571
585
|
inputSchema: toJSONSchema(GetEnvironmentSchema),
|
|
572
586
|
},
|
|
587
|
+
{ name: "update_environment", description: "Update an environment", inputSchema: toJSONSchema(UpdateEnvironmentSchema) },
|
|
588
|
+
{ name: "delete_environment", description: "Delete a stopped environment", inputSchema: toJSONSchema(GetEnvironmentSchema) },
|
|
589
|
+
{ name: "stop_environment", description: "Stop an environment", inputSchema: toJSONSchema(StopEnvironmentSchema) },
|
|
590
|
+
{ name: "stop_stale_environments", description: "Stop eligible stale environments; protected environments are excluded and environments are stopped, not deleted", inputSchema: toJSONSchema(StopStaleEnvironmentsSchema) },
|
|
591
|
+
{ name: "delete_review_app_environments", description: "Schedule deletion of stopped review-app environments one week later; dry_run defaults to true and actual scheduling requires dry_run=false", inputSchema: toJSONSchema(DeleteReviewAppEnvironmentsSchema) },
|
|
592
|
+
{ name: "list_pipeline_triggers", description: "List project pipeline trigger tokens", inputSchema: toJSONSchema(ListPipelineTriggersSchema) },
|
|
593
|
+
{ name: "get_pipeline_trigger", description: "Get a project pipeline trigger", inputSchema: toJSONSchema(PipelineTriggerIdSchema) },
|
|
594
|
+
{ name: "create_pipeline_trigger", description: "Create a project pipeline trigger", inputSchema: toJSONSchema(CreatePipelineTriggerSchema) },
|
|
595
|
+
{ name: "update_pipeline_trigger", description: "Update a project pipeline trigger", inputSchema: toJSONSchema(UpdatePipelineTriggerSchema) },
|
|
596
|
+
{ name: "delete_pipeline_trigger", description: "Delete a project pipeline trigger", inputSchema: toJSONSchema(PipelineTriggerIdSchema) },
|
|
597
|
+
{ name: "trigger_pipeline", description: "Trigger a pipeline with a pipeline trigger token", inputSchema: toJSONSchema(TriggerPipelineSchema) },
|
|
573
598
|
{
|
|
574
599
|
name: "list_pipeline_jobs",
|
|
575
600
|
description: "List all jobs in a specific pipeline",
|
|
@@ -690,6 +715,11 @@ export const allTools = [
|
|
|
690
715
|
description: "Run a manual pipeline job",
|
|
691
716
|
inputSchema: toJSONSchema(PlayPipelineJobSchema),
|
|
692
717
|
},
|
|
718
|
+
{
|
|
719
|
+
name: "play_pipeline_jobs",
|
|
720
|
+
description: "Play multiple manual pipeline jobs sequentially",
|
|
721
|
+
inputSchema: toJSONSchema(PlayPipelineJobsSchema),
|
|
722
|
+
},
|
|
693
723
|
{
|
|
694
724
|
name: "retry_pipeline_job",
|
|
695
725
|
description: "Retry a failed or canceled pipeline job",
|
|
@@ -700,6 +730,9 @@ export const allTools = [
|
|
|
700
730
|
description: "Cancel a running pipeline job",
|
|
701
731
|
inputSchema: toJSONSchema(CancelPipelineJobSchema),
|
|
702
732
|
},
|
|
733
|
+
{ name: "erase_pipeline_job", description: "Erase a pipeline job log and artifacts", inputSchema: toJSONSchema(ErasePipelineJobSchema) },
|
|
734
|
+
{ name: "wait_for_pipeline", description: "Wait for a pipeline to reach a terminal status", inputSchema: toJSONSchema(WaitForPipelineSchema) },
|
|
735
|
+
{ name: "wait_for_job", description: "Wait for a job to reach a terminal status", inputSchema: toJSONSchema(WaitForPipelineJobSchema) },
|
|
703
736
|
{
|
|
704
737
|
name: "list_job_artifacts",
|
|
705
738
|
description: "List artifact files in a job's archive",
|
|
@@ -1190,6 +1223,27 @@ export const allTools = [
|
|
|
1190
1223
|
description: "Confirm a vulnerability as a real finding requiring remediation",
|
|
1191
1224
|
inputSchema: toJSONSchema(ConfirmVulnerabilitySchema),
|
|
1192
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
|
+
},
|
|
1193
1247
|
// --- Meta tool: Dynamic tool discovery ---
|
|
1194
1248
|
{
|
|
1195
1249
|
name: "discover_tools",
|
|
@@ -1250,6 +1304,9 @@ export const readOnlyTools = new Set([
|
|
|
1250
1304
|
"list_project_members",
|
|
1251
1305
|
"list_group_members",
|
|
1252
1306
|
"get_pipeline",
|
|
1307
|
+
"get_pipeline_variables",
|
|
1308
|
+
"get_pipeline_test_report",
|
|
1309
|
+
"get_pipeline_test_report_summary",
|
|
1253
1310
|
"list_pipelines",
|
|
1254
1311
|
"list_pipeline_schedules",
|
|
1255
1312
|
"get_pipeline_schedule",
|
|
@@ -1257,12 +1314,17 @@ export const readOnlyTools = new Set([
|
|
|
1257
1314
|
"get_pipeline_schedule_variable",
|
|
1258
1315
|
"list_deployments",
|
|
1259
1316
|
"get_deployment",
|
|
1317
|
+
"list_deployment_merge_requests",
|
|
1260
1318
|
"list_environments",
|
|
1261
1319
|
"get_environment",
|
|
1320
|
+
"list_pipeline_triggers",
|
|
1321
|
+
"get_pipeline_trigger",
|
|
1262
1322
|
"list_pipeline_jobs",
|
|
1263
1323
|
"list_pipeline_trigger_jobs",
|
|
1264
1324
|
"get_pipeline_job",
|
|
1265
1325
|
"get_pipeline_job_output",
|
|
1326
|
+
"wait_for_pipeline",
|
|
1327
|
+
"wait_for_job",
|
|
1266
1328
|
"validate_ci_lint",
|
|
1267
1329
|
"validate_project_ci_lint",
|
|
1268
1330
|
"list_ci_catalog_resources",
|
|
@@ -1332,9 +1394,20 @@ export const readOnlyTools = new Set([
|
|
|
1332
1394
|
"list_dependency_proxy_blobs",
|
|
1333
1395
|
"list_project_vulnerabilities",
|
|
1334
1396
|
"get_vulnerability",
|
|
1397
|
+
"orbit_query",
|
|
1398
|
+
"orbit_get_schema",
|
|
1399
|
+
"orbit_get_status",
|
|
1400
|
+
"orbit_list_tools",
|
|
1335
1401
|
]);
|
|
1336
1402
|
// Define which tools are destructive (data loss potential)
|
|
1337
1403
|
export const destructiveTools = new Set([
|
|
1404
|
+
"delete_pipeline",
|
|
1405
|
+
"erase_pipeline_job",
|
|
1406
|
+
"delete_deployment",
|
|
1407
|
+
"approve_deployment",
|
|
1408
|
+
"delete_environment",
|
|
1409
|
+
"delete_review_app_environments",
|
|
1410
|
+
"delete_pipeline_trigger",
|
|
1338
1411
|
"delete_issue",
|
|
1339
1412
|
"delete_issue_link",
|
|
1340
1413
|
"delete_label",
|
|
@@ -1369,6 +1442,12 @@ export const destructiveTools = new Set([
|
|
|
1369
1442
|
// Tools that permanently delete resources — blocked in "modify" permission mode.
|
|
1370
1443
|
// Narrower than destructiveTools: merge/protect/push are modifications, not deletions.
|
|
1371
1444
|
export const deleteTools = new Set([
|
|
1445
|
+
"delete_pipeline",
|
|
1446
|
+
"erase_pipeline_job",
|
|
1447
|
+
"delete_deployment",
|
|
1448
|
+
"delete_environment",
|
|
1449
|
+
"delete_review_app_environments",
|
|
1450
|
+
"delete_pipeline_trigger",
|
|
1372
1451
|
"delete_branch",
|
|
1373
1452
|
"delete_draft_note",
|
|
1374
1453
|
"delete_group_variable",
|
|
@@ -1433,14 +1512,39 @@ export const milestoneToolNames = new Set([
|
|
|
1433
1512
|
export const pipelineToolNames = new Set([
|
|
1434
1513
|
"list_pipelines",
|
|
1435
1514
|
"get_pipeline",
|
|
1515
|
+
"get_pipeline_variables",
|
|
1516
|
+
"get_pipeline_test_report",
|
|
1517
|
+
"get_pipeline_test_report_summary",
|
|
1518
|
+
"delete_pipeline",
|
|
1519
|
+
"update_pipeline_metadata",
|
|
1436
1520
|
"list_deployments",
|
|
1437
1521
|
"get_deployment",
|
|
1522
|
+
"create_deployment",
|
|
1523
|
+
"update_deployment",
|
|
1524
|
+
"delete_deployment",
|
|
1525
|
+
"list_deployment_merge_requests",
|
|
1526
|
+
"approve_deployment",
|
|
1438
1527
|
"list_environments",
|
|
1439
1528
|
"get_environment",
|
|
1529
|
+
"update_environment",
|
|
1530
|
+
"delete_environment",
|
|
1531
|
+
"stop_environment",
|
|
1532
|
+
"stop_stale_environments",
|
|
1533
|
+
"delete_review_app_environments",
|
|
1534
|
+
"list_pipeline_triggers",
|
|
1535
|
+
"get_pipeline_trigger",
|
|
1536
|
+
"create_pipeline_trigger",
|
|
1537
|
+
"update_pipeline_trigger",
|
|
1538
|
+
"delete_pipeline_trigger",
|
|
1539
|
+
"trigger_pipeline",
|
|
1440
1540
|
"list_pipeline_jobs",
|
|
1441
1541
|
"list_pipeline_trigger_jobs",
|
|
1442
1542
|
"get_pipeline_job",
|
|
1443
1543
|
"get_pipeline_job_output",
|
|
1544
|
+
"play_pipeline_jobs",
|
|
1545
|
+
"erase_pipeline_job",
|
|
1546
|
+
"wait_for_pipeline",
|
|
1547
|
+
"wait_for_job",
|
|
1444
1548
|
"validate_ci_lint",
|
|
1445
1549
|
"validate_project_ci_lint",
|
|
1446
1550
|
"create_pipeline",
|
|
@@ -1629,10 +1733,31 @@ export const TOOLSET_DEFINITIONS = [
|
|
|
1629
1733
|
tools: new Set([
|
|
1630
1734
|
"list_pipelines",
|
|
1631
1735
|
"get_pipeline",
|
|
1736
|
+
"get_pipeline_variables",
|
|
1737
|
+
"get_pipeline_test_report",
|
|
1738
|
+
"get_pipeline_test_report_summary",
|
|
1739
|
+
"delete_pipeline",
|
|
1740
|
+
"update_pipeline_metadata",
|
|
1632
1741
|
"list_deployments",
|
|
1633
1742
|
"get_deployment",
|
|
1743
|
+
"create_deployment",
|
|
1744
|
+
"update_deployment",
|
|
1745
|
+
"delete_deployment",
|
|
1746
|
+
"list_deployment_merge_requests",
|
|
1747
|
+
"approve_deployment",
|
|
1634
1748
|
"list_environments",
|
|
1635
1749
|
"get_environment",
|
|
1750
|
+
"update_environment",
|
|
1751
|
+
"delete_environment",
|
|
1752
|
+
"stop_environment",
|
|
1753
|
+
"stop_stale_environments",
|
|
1754
|
+
"delete_review_app_environments",
|
|
1755
|
+
"list_pipeline_triggers",
|
|
1756
|
+
"get_pipeline_trigger",
|
|
1757
|
+
"create_pipeline_trigger",
|
|
1758
|
+
"update_pipeline_trigger",
|
|
1759
|
+
"delete_pipeline_trigger",
|
|
1760
|
+
"trigger_pipeline",
|
|
1636
1761
|
"list_pipeline_jobs",
|
|
1637
1762
|
"list_pipeline_trigger_jobs",
|
|
1638
1763
|
"get_pipeline_job",
|
|
@@ -1653,8 +1778,12 @@ export const TOOLSET_DEFINITIONS = [
|
|
|
1653
1778
|
"update_pipeline_schedule_variable",
|
|
1654
1779
|
"delete_pipeline_schedule_variable",
|
|
1655
1780
|
"play_pipeline_job",
|
|
1781
|
+
"play_pipeline_jobs",
|
|
1656
1782
|
"retry_pipeline_job",
|
|
1657
1783
|
"cancel_pipeline_job",
|
|
1784
|
+
"erase_pipeline_job",
|
|
1785
|
+
"wait_for_pipeline",
|
|
1786
|
+
"wait_for_job",
|
|
1658
1787
|
"list_job_artifacts",
|
|
1659
1788
|
"download_job_artifacts",
|
|
1660
1789
|
"get_job_artifact_file",
|
|
@@ -1813,6 +1942,11 @@ export const TOOLSET_DEFINITIONS = [
|
|
|
1813
1942
|
"confirm_vulnerability",
|
|
1814
1943
|
]),
|
|
1815
1944
|
},
|
|
1945
|
+
{
|
|
1946
|
+
id: "orbit",
|
|
1947
|
+
isDefault: false,
|
|
1948
|
+
tools: new Set(["orbit_query", "orbit_get_schema", "orbit_get_status", "orbit_list_tools"]),
|
|
1949
|
+
},
|
|
1816
1950
|
];
|
|
1817
1951
|
// Derived lookup: tool name → toolset ID
|
|
1818
1952
|
export const TOOLSET_BY_TOOL_NAME = new Map();
|
|
@@ -46,6 +46,12 @@ const TOOL_GUIDANCE = {
|
|
|
46
46
|
create_pipeline_schedule_variable: "Use this to attach a new variable to a pipeline schedule so its scheduled pipelines receive it; use `update_pipeline_schedule_variable` when the key already exists and `create_project_variable` for a project-wide variable. `variable_type` defaults to `env_var` and `key` is limited to 255 characters matching /[a-zA-Z0-9_]+/. It creates remote CI configuration, requires the Developer, Maintainer, or Owner role and ownership of the schedule, and returns the new variable or a validation, duplicate-key, or permission error.",
|
|
47
47
|
update_pipeline_schedule_variable: "Use this to change the value or type of an existing pipeline schedule variable; use `create_pipeline_schedule_variable` when the key does not exist yet. It changes remote CI configuration that scheduled pipelines consume, requires the Developer, Maintainer, or Owner role and ownership of the schedule, and returns the updated variable or a missing-key, validation, or permission error.",
|
|
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
|
+
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
|
+
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.",
|
|
49
55
|
};
|
|
50
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.";
|
|
51
57
|
function ensureSentence(text) {
|
|
@@ -3,16 +3,23 @@
|
|
|
3
3
|
* MCP tool results become part of the AI conversation context, so these must
|
|
4
4
|
* never be forwarded to the model.
|
|
5
5
|
*/
|
|
6
|
-
const SENSITIVE_GITLAB_FIELDS = ["runners_token", "import_url"];
|
|
6
|
+
const SENSITIVE_GITLAB_FIELDS = ["runners_token", "import_url", "token"];
|
|
7
7
|
/**
|
|
8
8
|
* Strip known sensitive fields from a GitLab API response object before it is
|
|
9
9
|
* returned as an MCP tool result. Mutates and returns the same object.
|
|
10
|
+
* Recurses into arrays (e.g. list responses) since those hold one object per item.
|
|
10
11
|
*
|
|
11
|
-
* Used for raw passthrough responses (get_project / update_project
|
|
12
|
-
* go through a Zod schema, since Zod
|
|
12
|
+
* Used for raw passthrough responses (get_project / update_project,
|
|
13
|
+
* list/get_pipeline_trigger) that do not go through a Zod schema, since Zod
|
|
14
|
+
* would otherwise strip unknown keys for us. Do NOT apply to
|
|
15
|
+
* create_pipeline_trigger: its response carries the newly issued token once.
|
|
13
16
|
*/
|
|
14
17
|
export function redactSensitiveGitLabFields(data) {
|
|
15
|
-
if (data
|
|
18
|
+
if (Array.isArray(data)) {
|
|
19
|
+
for (const item of data)
|
|
20
|
+
redactSensitiveGitLabFields(item);
|
|
21
|
+
}
|
|
22
|
+
else if (data && typeof data === "object") {
|
|
16
23
|
for (const key of SENSITIVE_GITLAB_FIELDS) {
|
|
17
24
|
delete data[key];
|
|
18
25
|
}
|
package/package.json
CHANGED