@zereight/mcp-gitlab 1.0.71 → 1.0.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -29,7 +29,6 @@ GitLabDiscussionNoteSchema, // Added
29
29
  GitLabDiscussionSchema, PaginatedDiscussionsResponseSchema, UpdateMergeRequestNoteSchema, // Added
30
30
  CreateMergeRequestNoteSchema, // Added
31
31
  ListMergeRequestDiscussionsSchema, UpdateIssueNoteSchema, CreateIssueNoteSchema, ListMergeRequestsSchema, GitLabMilestonesSchema, ListProjectMilestonesSchema, GetProjectMilestoneSchema, CreateProjectMilestoneSchema, EditProjectMilestoneSchema, DeleteProjectMilestoneSchema, GetMilestoneIssuesSchema, GetMilestoneMergeRequestsSchema, PromoteProjectMilestoneSchema, GetMilestoneBurndownEventsSchema, GitLabCompareResultSchema, GetBranchDiffsSchema, ListCommitsSchema, GetCommitSchema, GetCommitDiffSchema, ListMergeRequestDiffsSchema, } from "./schemas.js";
32
- import { formatBoolean } from "./utils.js";
33
32
  import { randomUUID } from "crypto";
34
33
  import { pino } from 'pino';
35
34
  const logger = pino({
@@ -1059,7 +1058,7 @@ async function createMergeRequest(projectId, options) {
1059
1058
  labels: options.labels?.join(","),
1060
1059
  allow_collaboration: options.allow_collaboration,
1061
1060
  draft: options.draft,
1062
- remove_source_branch: formatBoolean(options.remove_source_branch),
1061
+ remove_source_branch: options.remove_source_branch,
1063
1062
  squash: options.squash,
1064
1063
  }),
1065
1064
  });
package/build/schemas.js CHANGED
@@ -1,4 +1,10 @@
1
1
  import { z } from "zod";
2
+ const flexibleBoolean = z.preprocess((val) => {
3
+ if (typeof val === 'string') {
4
+ return val.toLowerCase() === 'true';
5
+ }
6
+ return val;
7
+ }, z.boolean());
2
8
  // Base schemas for common types
3
9
  export const GitLabAuthorSchema = z.object({
4
10
  name: z.string(),
@@ -35,7 +41,7 @@ export const GitLabPipelineSchema = z.object({
35
41
  label: z.string().optional(),
36
42
  group: z.string().optional(),
37
43
  tooltip: z.string().optional(),
38
- has_details: z.boolean().optional(),
44
+ has_details: flexibleBoolean.optional(),
39
45
  details_path: z.string().optional(),
40
46
  illustration: z
41
47
  .object({
@@ -56,7 +62,7 @@ export const GitLabPipelineJobSchema = z.object({
56
62
  stage: z.string(),
57
63
  name: z.string(),
58
64
  ref: z.string(),
59
- tag: z.boolean(),
65
+ tag: flexibleBoolean,
60
66
  coverage: z.number().nullable().optional(),
61
67
  created_at: z.string(),
62
68
  started_at: z.string().nullable().optional(),
@@ -121,7 +127,7 @@ export const ListPipelinesSchema = z.object({
121
127
  .describe("The status of pipelines"),
122
128
  ref: z.string().optional().describe("The ref of pipelines"),
123
129
  sha: z.string().optional().describe("The SHA of pipelines"),
124
- yaml_errors: z.boolean().optional().describe("Returns pipelines with invalid configurations"),
130
+ yaml_errors: flexibleBoolean.optional().describe("Returns pipelines with invalid configurations"),
125
131
  username: z.string().optional().describe("The username of the user who triggered pipelines"),
126
132
  updated_after: z
127
133
  .string()
@@ -150,7 +156,7 @@ export const ListPipelineJobsSchema = z.object({
150
156
  .enum(["created", "pending", "running", "failed", "success", "canceled", "skipped", "manual"])
151
157
  .optional()
152
158
  .describe("The scope of jobs to show"),
153
- include_retried: z.boolean().optional().describe("Whether to include retried jobs"),
159
+ include_retried: flexibleBoolean.optional().describe("Whether to include retried jobs"),
154
160
  }).merge(PaginationOptionsSchema);
155
161
  // Schema for creating a new pipeline
156
162
  export const CreatePipelineSchema = z.object({
@@ -220,12 +226,12 @@ export const GitLabNamespaceSchema = z.object({
220
226
  plan: z.string().optional(),
221
227
  end_date: z.string().nullable().optional(),
222
228
  trial_ends_on: z.string().nullable().optional(),
223
- trial: z.boolean().optional(),
229
+ trial: flexibleBoolean.optional(),
224
230
  root_repository_size: z.number().optional(),
225
231
  projects_count: z.number().optional(),
226
232
  });
227
233
  export const GitLabNamespaceExistsResponseSchema = z.object({
228
- exists: z.boolean(),
234
+ exists: flexibleBoolean,
229
235
  suggests: z.array(z.string()).optional(),
230
236
  });
231
237
  // Repository related schemas
@@ -245,7 +251,7 @@ export const GitLabRepositorySchema = z.object({
245
251
  owner: GitLabOwnerSchema.optional(),
246
252
  web_url: z.string().optional(),
247
253
  description: z.string().nullable(),
248
- fork: z.boolean().optional(),
254
+ fork: flexibleBoolean.optional(),
249
255
  ssh_url_to_repo: z.string().optional(),
250
256
  http_url_to_repo: z.string().optional(),
251
257
  created_at: z.string().optional(),
@@ -266,7 +272,7 @@ export const GitLabRepositorySchema = z.object({
266
272
  topics: z.array(z.string()).optional(),
267
273
  tag_list: z.array(z.string()).optional(), // deprecated but still present
268
274
  open_issues_count: z.number().optional(),
269
- archived: z.boolean().optional(),
275
+ archived: flexibleBoolean.optional(),
270
276
  forks_count: z.number().optional(),
271
277
  star_count: z.number().optional(),
272
278
  permissions: z
@@ -287,17 +293,17 @@ export const GitLabRepositorySchema = z.object({
287
293
  .nullable(),
288
294
  })
289
295
  .optional(),
290
- container_registry_enabled: z.boolean().optional(),
296
+ container_registry_enabled: flexibleBoolean.optional(),
291
297
  container_registry_access_level: z.string().optional(),
292
- issues_enabled: z.boolean().optional(),
293
- merge_requests_enabled: z.boolean().optional(),
298
+ issues_enabled: flexibleBoolean.optional(),
299
+ merge_requests_enabled: flexibleBoolean.optional(),
294
300
  merge_requests_template: z.string().nullable().optional(),
295
- wiki_enabled: z.boolean().optional(),
296
- jobs_enabled: z.boolean().optional(),
297
- snippets_enabled: z.boolean().optional(),
298
- can_create_merge_request_in: z.boolean().optional(),
299
- resolve_outdated_diff_discussions: z.boolean().nullable().optional(),
300
- shared_runners_enabled: z.boolean().optional(),
301
+ wiki_enabled: flexibleBoolean.optional(),
302
+ jobs_enabled: flexibleBoolean.optional(),
303
+ snippets_enabled: flexibleBoolean.optional(),
304
+ can_create_merge_request_in: flexibleBoolean.optional(),
305
+ resolve_outdated_diff_discussions: flexibleBoolean.nullable().optional(),
306
+ shared_runners_enabled: flexibleBoolean.optional(),
301
307
  shared_with_groups: z
302
308
  .array(z.object({
303
309
  group_id: z.string().or(z.number()),
@@ -321,7 +327,7 @@ export const GitLabFileContentSchema = z.object({
321
327
  blob_id: z.string(), // Added to match GitLab API
322
328
  commit_id: z.string(), // ID of the current file version
323
329
  last_commit_id: z.string(), // Added to match GitLab API
324
- execute_filemode: z.boolean().optional(), // Added to match GitLab API
330
+ execute_filemode: flexibleBoolean.optional(), // Added to match GitLab API
325
331
  });
326
332
  export const GitLabDirectoryContentSchema = z.object({
327
333
  name: z.string(),
@@ -355,7 +361,7 @@ export const GetRepositoryTreeSchema = z.object({
355
361
  .string()
356
362
  .optional()
357
363
  .describe("The name of a repository branch or tag. Defaults to the default branch."),
358
- recursive: z.boolean().optional().describe("Boolean value to get a recursive tree"),
364
+ recursive: flexibleBoolean.optional().describe("Boolean value to get a recursive tree"),
359
365
  per_page: z.number().optional().describe("Number of results to show per page"),
360
366
  page_token: z.string().optional().describe("The tree record ID for pagination"),
361
367
  pagination: z.string().optional().describe("Pagination method (keyset)"),
@@ -406,7 +412,7 @@ export const GitLabMilestonesSchema = z.object({
406
412
  state: z.string(),
407
413
  updated_at: z.string(),
408
414
  created_at: z.string(),
409
- expired: z.boolean(),
415
+ expired: flexibleBoolean,
410
416
  web_url: z.string().optional(),
411
417
  });
412
418
  // Input schemas for operations
@@ -414,7 +420,7 @@ export const CreateRepositoryOptionsSchema = z.object({
414
420
  name: z.string(),
415
421
  description: z.string().optional(),
416
422
  visibility: z.enum(["private", "internal", "public"]).optional(), // Changed from private to match GitLab API
417
- initialize_with_readme: z.boolean().optional(), // Changed from auto_init to match GitLab API
423
+ initialize_with_readme: flexibleBoolean.optional(), // Changed from auto_init to match GitLab API
418
424
  });
419
425
  export const CreateIssueOptionsSchema = z.object({
420
426
  title: z.string(),
@@ -429,9 +435,9 @@ export const GitLabDiffSchema = z.object({
429
435
  a_mode: z.string(),
430
436
  b_mode: z.string(),
431
437
  diff: z.string(),
432
- new_file: z.boolean(),
433
- renamed_file: z.boolean(),
434
- deleted_file: z.boolean(),
438
+ new_file: flexibleBoolean,
439
+ renamed_file: flexibleBoolean,
440
+ deleted_file: flexibleBoolean,
435
441
  });
436
442
  // Response schemas for operations
437
443
  export const GitLabCreateUpdateFileResponseSchema = z.object({
@@ -462,8 +468,8 @@ export const GitLabCompareResultSchema = z.object({
462
468
  }).optional(),
463
469
  commits: z.array(GitLabCommitSchema),
464
470
  diffs: z.array(GitLabDiffSchema),
465
- compare_timeout: z.boolean().optional(),
466
- compare_same_ref: z.boolean().optional(),
471
+ compare_timeout: flexibleBoolean.optional(),
472
+ compare_same_ref: flexibleBoolean.optional(),
467
473
  });
468
474
  // Issue related schemas
469
475
  export const GitLabLabelSchema = z.object({
@@ -476,9 +482,9 @@ export const GitLabLabelSchema = z.object({
476
482
  open_issues_count: z.number().optional(),
477
483
  closed_issues_count: z.number().optional(),
478
484
  open_merge_requests_count: z.number().optional(),
479
- subscribed: z.boolean().optional(),
485
+ subscribed: flexibleBoolean.optional(),
480
486
  priority: z.number().nullable().optional(),
481
- is_project_label: z.boolean().optional(),
487
+ is_project_label: flexibleBoolean.optional(),
482
488
  });
483
489
  export const GitLabMilestoneSchema = z.object({
484
490
  id: z.string().or(z.number()),
@@ -518,9 +524,9 @@ export const GitLabIssueSchema = z.object({
518
524
  human_total_time_spent: z.string().nullable(),
519
525
  })
520
526
  .optional(),
521
- confidential: z.boolean().optional(),
527
+ confidential: flexibleBoolean.optional(),
522
528
  due_date: z.string().nullable().optional(),
523
- discussion_locked: z.boolean().nullable().optional(),
529
+ discussion_locked: flexibleBoolean.nullable().optional(),
524
530
  weight: z.number().nullable().optional(),
525
531
  });
526
532
  // NEW SCHEMA: For issue with link details (used in listing issue links)
@@ -559,8 +565,8 @@ export const GitLabMergeRequestSchema = z.object({
559
565
  title: z.string(),
560
566
  description: z.string().nullable(),
561
567
  state: z.string(),
562
- merged: z.boolean().optional(),
563
- draft: z.boolean().optional(),
568
+ merged: flexibleBoolean.optional(),
569
+ draft: flexibleBoolean.optional(),
564
570
  author: GitLabUserSchema,
565
571
  assignees: z.array(GitLabUserSchema).optional(),
566
572
  reviewers: z.array(GitLabUserSchema).optional(),
@@ -576,15 +582,15 @@ export const GitLabMergeRequestSchema = z.object({
576
582
  detailed_merge_status: z.string().optional(),
577
583
  merge_status: z.string().optional(),
578
584
  merge_error: z.string().nullable().optional(),
579
- work_in_progress: z.boolean().optional(),
580
- blocking_discussions_resolved: z.boolean().optional(),
581
- should_remove_source_branch: z.boolean().nullable().optional(),
582
- force_remove_source_branch: z.boolean().nullable().optional(),
583
- allow_collaboration: z.boolean().optional(),
584
- allow_maintainer_to_push: z.boolean().optional(),
585
+ work_in_progress: flexibleBoolean.optional(),
586
+ blocking_discussions_resolved: flexibleBoolean.optional(),
587
+ should_remove_source_branch: flexibleBoolean.nullable().optional(),
588
+ force_remove_source_branch: flexibleBoolean.nullable().optional(),
589
+ allow_collaboration: flexibleBoolean.optional(),
590
+ allow_maintainer_to_push: flexibleBoolean.optional(),
585
591
  changes_count: z.string().nullable().optional(),
586
- merge_when_pipeline_succeeds: z.boolean().optional(),
587
- squash: z.boolean().optional(),
592
+ merge_when_pipeline_succeeds: flexibleBoolean.optional(),
593
+ squash: flexibleBoolean.optional(),
588
594
  labels: z.array(z.string()).optional(),
589
595
  });
590
596
  export const LineRangeSchema = z.object({
@@ -610,13 +616,13 @@ export const GitLabDiscussionNoteSchema = z.object({
610
616
  author: GitLabUserSchema,
611
617
  created_at: z.string(),
612
618
  updated_at: z.string(),
613
- system: z.boolean(),
619
+ system: flexibleBoolean,
614
620
  noteable_id: z.string().or(z.number()),
615
621
  noteable_type: z.enum(["Issue", "MergeRequest", "Snippet", "Commit", "Epic"]),
616
622
  project_id: z.string().or(z.number().optional()), // Optional for group-level discussions like Epics
617
623
  noteable_iid: z.coerce.number().nullable(),
618
- resolvable: z.boolean().optional(),
619
- resolved: z.boolean().optional(),
624
+ resolvable: flexibleBoolean.optional(),
625
+ resolved: flexibleBoolean.optional(),
620
626
  resolved_by: GitLabUserSchema.nullable().optional(),
621
627
  resolved_at: z.string().nullable().optional(),
622
628
  position: z
@@ -655,7 +661,7 @@ export const PaginatedResponseSchema = z.object({
655
661
  });
656
662
  export const GitLabDiscussionSchema = z.object({
657
663
  id: z.string(),
658
- individual_note: z.boolean(),
664
+ individual_note: flexibleBoolean,
659
665
  notes: z.array(GitLabDiscussionNoteSchema),
660
666
  });
661
667
  // Create a schema for paginated discussions response
@@ -677,7 +683,7 @@ export const UpdateMergeRequestNoteSchema = ProjectParamsSchema.extend({
677
683
  discussion_id: z.string().describe("The ID of a thread"),
678
684
  note_id: z.string().or(z.number().describe("The ID of a thread note")),
679
685
  body: z.string().optional().describe("The content of the note or reply"),
680
- resolved: z.boolean().optional().describe("Resolve or unresolve the note"),
686
+ resolved: flexibleBoolean.optional().describe("Resolve or unresolve the note"),
681
687
  })
682
688
  .refine(data => data.body !== undefined || data.resolved !== undefined, {
683
689
  message: "At least one of 'body' or 'resolved' must be provided",
@@ -726,7 +732,7 @@ export const CreateRepositorySchema = z.object({
726
732
  .enum(["private", "internal", "public"])
727
733
  .optional()
728
734
  .describe("Repository visibility level"),
729
- initialize_with_readme: z.boolean().optional().describe("Initialize with README.md"),
735
+ initialize_with_readme: flexibleBoolean.optional().describe("Initialize with README.md"),
730
736
  });
731
737
  export const GetFileContentsSchema = ProjectParamsSchema.extend({
732
738
  file_path: z.string().describe("Path to the file or directory"),
@@ -763,13 +769,13 @@ const MergeRequestOptionsSchema = {
763
769
  .optional()
764
770
  .describe("The ID of the users to assign as reviewers of the MR"),
765
771
  labels: z.array(z.string()).optional().describe("Labels for the MR"),
766
- draft: z.boolean().optional().describe("Create as draft merge request"),
772
+ draft: flexibleBoolean.optional().describe("Create as draft merge request"),
767
773
  allow_collaboration: z
768
774
  .boolean()
769
775
  .optional()
770
776
  .describe("Allow commits from upstream members"),
771
- remove_source_branch: z.boolean().optional().nullable().describe("Flag indicating if a merge request should remove the source branch when merging."),
772
- squash: z.boolean().optional().nullable().describe("If true, squash all commits into a single commit on merge."),
777
+ remove_source_branch: flexibleBoolean.optional().nullable().describe("Flag indicating if a merge request should remove the source branch when merging."),
778
+ squash: flexibleBoolean.optional().nullable().describe("If true, squash all commits into a single commit on merge."),
773
779
  };
774
780
  export const CreateMergeRequestOptionsSchema = z.object(MergeRequestOptionsSchema);
775
781
  export const CreateMergeRequestSchema = ProjectParamsSchema.extend(MergeRequestOptionsSchema);
@@ -784,7 +790,7 @@ export const CreateBranchSchema = ProjectParamsSchema.extend({
784
790
  export const GetBranchDiffsSchema = ProjectParamsSchema.extend({
785
791
  from: z.string().describe("The base branch or commit SHA to compare from"),
786
792
  to: z.string().describe("The target branch or commit SHA to compare to"),
787
- straight: z.boolean().optional().describe("Comparison method: false for '...' (default), true for '--'"),
793
+ straight: flexibleBoolean.optional().describe("Comparison method: false for '...' (default), true for '--'"),
788
794
  excluded_file_patterns: z.array(z.string()).optional().describe("Array of regex patterns to exclude files from the diff results. Each pattern is a JavaScript-compatible regular expression that matches file paths to ignore. Examples: [\"^test/mocks/\", \"\\.spec\\.ts$\", \"package-lock\\.json\"]"),
789
795
  });
790
796
  export const GetMergeRequestSchema = ProjectParamsSchema.extend({
@@ -812,8 +818,8 @@ export const UpdateMergeRequestSchema = GetMergeRequestSchema.extend({
812
818
  .boolean()
813
819
  .optional()
814
820
  .describe("Flag indicating if the source branch should be removed"),
815
- squash: z.boolean().optional().describe("Squash commits into a single commit when merging"),
816
- draft: z.boolean().optional().describe("Work in progress merge request"),
821
+ squash: flexibleBoolean.optional().describe("Squash commits into a single commit when merging"),
822
+ draft: flexibleBoolean.optional().describe("Work in progress merge request"),
817
823
  });
818
824
  export const GetMergeRequestDiffsSchema = GetMergeRequestSchema.extend({
819
825
  view: z.enum(["inline", "parallel"]).optional().describe("Diff view type"),
@@ -821,7 +827,7 @@ export const GetMergeRequestDiffsSchema = GetMergeRequestSchema.extend({
821
827
  export const ListMergeRequestDiffsSchema = GetMergeRequestSchema.extend({
822
828
  page: z.number().optional().describe("Page number for pagination (default: 1)"),
823
829
  per_page: z.number().optional().describe("Number of items per page (max: 100, default: 20)"),
824
- unidiff: z.boolean().optional().describe("Present diffs in the unified diff format. Default is false. Introduced in GitLab 16.5."),
830
+ unidiff: flexibleBoolean.optional().describe("Present diffs in the unified diff format. Default is false. Introduced in GitLab 16.5."),
825
831
  });
826
832
  export const CreateNoteSchema = z.object({
827
833
  project_id: z.string().describe("Project ID or namespace/project_path"),
@@ -838,7 +844,7 @@ export const ListIssuesSchema = z.object({
838
844
  assignee_username: z.array(z.string()).optional().describe("Return issues assigned to the given username"),
839
845
  author_id: z.string().or(z.number().optional().describe("Return issues created by the given user ID")),
840
846
  author_username: z.string().optional().describe("Return issues created by the given username"),
841
- confidential: z.boolean().optional().describe("Filter confidential or public issues"),
847
+ confidential: flexibleBoolean.optional().describe("Filter confidential or public issues"),
842
848
  created_after: z.string().optional().describe("Return issues created after the given time"),
843
849
  created_before: z.string().optional().describe("Return issues created before the given time"),
844
850
  due_date: z.string().optional().describe("Return issues that have the due date"),
@@ -855,7 +861,7 @@ export const ListIssuesSchema = z.object({
855
861
  .describe("Return issues with a specific state"),
856
862
  updated_after: z.string().optional().describe("Return issues updated after the given time"),
857
863
  updated_before: z.string().optional().describe("Return issues updated before the given time"),
858
- with_labels_details: z.boolean().optional().describe("Return more details for each label"),
864
+ with_labels_details: flexibleBoolean.optional().describe("Return more details for each label"),
859
865
  }).merge(PaginationOptionsSchema);
860
866
  // Merge Requests API operation schemas
861
867
  export const ListMergeRequestsSchema = z.object({
@@ -925,7 +931,7 @@ export const ListMergeRequestsSchema = z.object({
925
931
  .optional()
926
932
  .describe("Return merge requests from a specific source branch"),
927
933
  wip: z.enum(["yes", "no"]).optional().describe("Filter merge requests against their wip status"),
928
- with_labels_details: z.boolean().optional().describe("Return more details for each label"),
934
+ with_labels_details: flexibleBoolean.optional().describe("Return more details for each label"),
929
935
  }).merge(PaginationOptionsSchema);
930
936
  export const GetIssueSchema = z.object({
931
937
  project_id: z.string().describe("Project ID or URL-encoded path"),
@@ -937,8 +943,8 @@ export const UpdateIssueSchema = z.object({
937
943
  title: z.string().optional().describe("The title of the issue"),
938
944
  description: z.string().optional().describe("The description of the issue"),
939
945
  assignee_ids: z.array(z.number()).optional().describe("Array of user IDs to assign issue to"),
940
- confidential: z.boolean().optional().describe("Set the issue to be confidential"),
941
- discussion_locked: z.boolean().optional().describe("Flag to lock discussions"),
946
+ confidential: flexibleBoolean.optional().describe("Set the issue to be confidential"),
947
+ discussion_locked: flexibleBoolean.optional().describe("Flag to lock discussions"),
942
948
  due_date: z.string().optional().describe("Date the issue is due (YYYY-MM-DD)"),
943
949
  labels: z.array(z.string()).optional().describe("Array of label names"),
944
950
  milestone_id: z.string().or(z.number().optional().describe("Milestone ID to assign")),
@@ -982,7 +988,7 @@ export const DeleteIssueLinkSchema = z.object({
982
988
  // Namespace API operation schemas
983
989
  export const ListNamespacesSchema = z.object({
984
990
  search: z.string().optional().describe("Search term for namespaces"),
985
- owned: z.boolean().optional().describe("Filter for namespaces owned by current user"),
991
+ owned: flexibleBoolean.optional().describe("Filter for namespaces owned by current user"),
986
992
  }).merge(PaginationOptionsSchema);
987
993
  export const GetNamespaceSchema = z.object({
988
994
  namespace_id: z.string().describe("Namespace ID or full path"),
@@ -996,11 +1002,11 @@ export const GetProjectSchema = z.object({
996
1002
  });
997
1003
  export const ListProjectsSchema = z.object({
998
1004
  search: z.string().optional().describe("Search term for projects"),
999
- search_namespaces: z.boolean().optional().describe("Needs to be true if search is full path"),
1000
- owned: z.boolean().optional().describe("Filter for projects owned by current user"),
1001
- membership: z.boolean().optional().describe("Filter for projects where current user is a member"),
1002
- simple: z.boolean().optional().describe("Return only limited fields"),
1003
- archived: z.boolean().optional().describe("Filter for archived projects"),
1005
+ search_namespaces: flexibleBoolean.optional().describe("Needs to be true if search is full path"),
1006
+ owned: flexibleBoolean.optional().describe("Filter for projects owned by current user"),
1007
+ membership: flexibleBoolean.optional().describe("Filter for projects where current user is a member"),
1008
+ simple: flexibleBoolean.optional().describe("Return only limited fields"),
1009
+ archived: flexibleBoolean.optional().describe("Filter for archived projects"),
1004
1010
  visibility: z
1005
1011
  .enum(["public", "internal", "private"])
1006
1012
  .optional()
@@ -1030,13 +1036,13 @@ export const ListLabelsSchema = z.object({
1030
1036
  .boolean()
1031
1037
  .optional()
1032
1038
  .describe("Whether or not to include issue and merge request counts"),
1033
- include_ancestor_groups: z.boolean().optional().describe("Include ancestor groups"),
1039
+ include_ancestor_groups: flexibleBoolean.optional().describe("Include ancestor groups"),
1034
1040
  search: z.string().optional().describe("Keyword to filter labels by"),
1035
1041
  });
1036
1042
  export const GetLabelSchema = z.object({
1037
1043
  project_id: z.string().describe("Project ID or URL-encoded path"),
1038
1044
  label_id: z.string().describe("The ID or title of a project's label"),
1039
- include_ancestor_groups: z.boolean().optional().describe("Include ancestor groups"),
1045
+ include_ancestor_groups: flexibleBoolean.optional().describe("Include ancestor groups"),
1040
1046
  });
1041
1047
  export const CreateLabelSchema = z.object({
1042
1048
  project_id: z.string().describe("Project ID or URL-encoded path"),
@@ -1065,14 +1071,14 @@ export const DeleteLabelSchema = z.object({
1065
1071
  // Group projects schema
1066
1072
  export const ListGroupProjectsSchema = z.object({
1067
1073
  group_id: z.string().describe("Group ID or path"),
1068
- include_subgroups: z.boolean().optional().describe("Include projects from subgroups"),
1074
+ include_subgroups: flexibleBoolean.optional().describe("Include projects from subgroups"),
1069
1075
  search: z.string().optional().describe("Search term to filter projects"),
1070
1076
  order_by: z
1071
1077
  .enum(["name", "path", "created_at", "updated_at", "last_activity_at"])
1072
1078
  .optional()
1073
1079
  .describe("Field to sort by"),
1074
1080
  sort: z.enum(["asc", "desc"]).optional().describe("Sort direction"),
1075
- archived: z.boolean().optional().describe("Filter for archived projects"),
1081
+ archived: flexibleBoolean.optional().describe("Filter for archived projects"),
1076
1082
  visibility: z
1077
1083
  .enum(["public", "internal", "private"])
1078
1084
  .optional()
@@ -1087,15 +1093,15 @@ export const ListGroupProjectsSchema = z.object({
1087
1093
  .describe("Filter projects with merge requests feature enabled"),
1088
1094
  min_access_level: z.number().optional().describe("Filter by minimum access level"),
1089
1095
  with_programming_language: z.string().optional().describe("Filter by programming language"),
1090
- starred: z.boolean().optional().describe("Filter by starred projects"),
1091
- statistics: z.boolean().optional().describe("Include project statistics"),
1092
- with_custom_attributes: z.boolean().optional().describe("Include custom attributes"),
1093
- with_security_reports: z.boolean().optional().describe("Include security reports"),
1096
+ starred: flexibleBoolean.optional().describe("Filter by starred projects"),
1097
+ statistics: flexibleBoolean.optional().describe("Include project statistics"),
1098
+ with_custom_attributes: flexibleBoolean.optional().describe("Include custom attributes"),
1099
+ with_security_reports: flexibleBoolean.optional().describe("Include security reports"),
1094
1100
  }).merge(PaginationOptionsSchema);
1095
1101
  // Add wiki operation schemas
1096
1102
  export const ListWikiPagesSchema = z.object({
1097
1103
  project_id: z.string().describe("Project ID or URL-encoded path"),
1098
- with_content: z.boolean().optional().describe("Include content of the wiki pages"),
1104
+ with_content: flexibleBoolean.optional().describe("Include content of the wiki pages"),
1099
1105
  }).merge(PaginationOptionsSchema);
1100
1106
  export const GetWikiPageSchema = z.object({
1101
1107
  project_id: z.string().describe("Project ID or URL-encoded path"),
@@ -1166,7 +1172,7 @@ export const ListProjectMilestonesSchema = ProjectParamsSchema.extend({
1166
1172
  .string()
1167
1173
  .optional()
1168
1174
  .describe("Return only milestones with a title or description matching the provided string"),
1169
- include_ancestors: z.boolean().optional().describe("Include ancestor groups"),
1175
+ include_ancestors: flexibleBoolean.optional().describe("Include ancestor groups"),
1170
1176
  updated_before: z
1171
1177
  .string()
1172
1178
  .optional()
@@ -1216,18 +1222,18 @@ export const ListCommitsSchema = z.object({
1216
1222
  until: z.string().optional().describe("Only commits before or on this date are returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ"),
1217
1223
  path: z.string().optional().describe("The file path"),
1218
1224
  author: z.string().optional().describe("Search commits by commit author"),
1219
- all: z.boolean().optional().describe("Retrieve every commit from the repository"),
1220
- with_stats: z.boolean().optional().describe("Stats about each commit are added to the response"),
1221
- first_parent: z.boolean().optional().describe("Follow only the first parent commit upon seeing a merge commit"),
1225
+ all: flexibleBoolean.optional().describe("Retrieve every commit from the repository"),
1226
+ with_stats: flexibleBoolean.optional().describe("Stats about each commit are added to the response"),
1227
+ first_parent: flexibleBoolean.optional().describe("Follow only the first parent commit upon seeing a merge commit"),
1222
1228
  order: z.enum(["default", "topo"]).optional().describe("List commits in order"),
1223
- trailers: z.boolean().optional().describe("Parse and include Git trailers for every commit"),
1229
+ trailers: flexibleBoolean.optional().describe("Parse and include Git trailers for every commit"),
1224
1230
  page: z.number().optional().describe("Page number for pagination (default: 1)"),
1225
1231
  per_page: z.number().optional().describe("Number of items per page (max: 100, default: 20)"),
1226
1232
  });
1227
1233
  export const GetCommitSchema = z.object({
1228
1234
  project_id: z.string().describe("Project ID or complete URL-encoded path to project"),
1229
1235
  sha: z.string().describe("The commit hash or name of a repository branch or tag"),
1230
- stats: z.boolean().optional().describe("Include commit stats"),
1236
+ stats: flexibleBoolean.optional().describe("Include commit stats"),
1231
1237
  });
1232
1238
  export const GetCommitDiffSchema = z.object({
1233
1239
  project_id: z.string().describe("Project ID or complete URL-encoded path to project"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zereight/mcp-gitlab",
3
- "version": "1.0.71",
3
+ "version": "1.0.72",
4
4
  "description": "MCP server for using the GitLab API",
5
5
  "license": "MIT",
6
6
  "author": "zereight",