@zereight/mcp-gitlab 1.0.50 → 1.0.52

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/schemas.js CHANGED
@@ -20,13 +20,16 @@ export const GitLabPipelineSchema = z.object({
20
20
  started_at: z.string().nullable().optional(),
21
21
  finished_at: z.string().nullable().optional(),
22
22
  coverage: z.number().nullable().optional(),
23
- user: z.object({
23
+ user: z
24
+ .object({
24
25
  id: z.number(),
25
26
  name: z.string(),
26
27
  username: z.string(),
27
28
  avatar_url: z.string().nullable().optional(),
28
- }).optional(),
29
- detailed_status: z.object({
29
+ })
30
+ .optional(),
31
+ detailed_status: z
32
+ .object({
30
33
  icon: z.string().optional(),
31
34
  text: z.string().optional(),
32
35
  label: z.string().optional(),
@@ -34,13 +37,17 @@ export const GitLabPipelineSchema = z.object({
34
37
  tooltip: z.string().optional(),
35
38
  has_details: z.boolean().optional(),
36
39
  details_path: z.string().optional(),
37
- illustration: z.object({
40
+ illustration: z
41
+ .object({
38
42
  image: z.string().optional(),
39
43
  size: z.string().optional(),
40
44
  title: z.string().optional(),
41
- }).nullable().optional(),
45
+ })
46
+ .nullable()
47
+ .optional(),
42
48
  favicon: z.string().optional(),
43
- }).optional(),
49
+ })
50
+ .optional(),
44
51
  });
45
52
  // Pipeline job related schemas
46
53
  export const GitLabPipelineJobSchema = z.object({
@@ -55,41 +62,74 @@ export const GitLabPipelineJobSchema = z.object({
55
62
  started_at: z.string().nullable().optional(),
56
63
  finished_at: z.string().nullable().optional(),
57
64
  duration: z.number().nullable().optional(),
58
- user: z.object({
65
+ user: z
66
+ .object({
59
67
  id: z.number(),
60
68
  name: z.string(),
61
69
  username: z.string(),
62
70
  avatar_url: z.string().nullable().optional(),
63
- }).optional(),
64
- commit: z.object({
71
+ })
72
+ .optional(),
73
+ commit: z
74
+ .object({
65
75
  id: z.string(),
66
76
  short_id: z.string(),
67
77
  title: z.string(),
68
78
  author_name: z.string(),
69
79
  author_email: z.string(),
70
- }).optional(),
71
- pipeline: z.object({
80
+ })
81
+ .optional(),
82
+ pipeline: z
83
+ .object({
72
84
  id: z.number(),
73
85
  project_id: z.number(),
74
86
  status: z.string(),
75
87
  ref: z.string(),
76
88
  sha: z.string(),
77
- }).optional(),
89
+ })
90
+ .optional(),
78
91
  web_url: z.string().optional(),
79
92
  });
80
93
  // Schema for listing pipelines
81
94
  export const ListPipelinesSchema = z.object({
82
95
  project_id: z.string().describe("Project ID or URL-encoded path"),
83
- scope: z.enum(['running', 'pending', 'finished', 'branches', 'tags']).optional().describe("The scope of pipelines"),
84
- status: z.enum(['created', 'waiting_for_resource', 'preparing', 'pending', 'running', 'success', 'failed', 'canceled', 'skipped', 'manual', 'scheduled']).optional().describe("The status of pipelines"),
96
+ scope: z
97
+ .enum(["running", "pending", "finished", "branches", "tags"])
98
+ .optional()
99
+ .describe("The scope of pipelines"),
100
+ status: z
101
+ .enum([
102
+ "created",
103
+ "waiting_for_resource",
104
+ "preparing",
105
+ "pending",
106
+ "running",
107
+ "success",
108
+ "failed",
109
+ "canceled",
110
+ "skipped",
111
+ "manual",
112
+ "scheduled",
113
+ ])
114
+ .optional()
115
+ .describe("The status of pipelines"),
85
116
  ref: z.string().optional().describe("The ref of pipelines"),
86
117
  sha: z.string().optional().describe("The SHA of pipelines"),
87
118
  yaml_errors: z.boolean().optional().describe("Returns pipelines with invalid configurations"),
88
119
  username: z.string().optional().describe("The username of the user who triggered pipelines"),
89
- updated_after: z.string().optional().describe("Return pipelines updated after the specified date"),
90
- updated_before: z.string().optional().describe("Return pipelines updated before the specified date"),
91
- order_by: z.enum(['id', 'status', 'ref', 'updated_at', 'user_id']).optional().describe("Order pipelines by"),
92
- sort: z.enum(['asc', 'desc']).optional().describe("Sort pipelines"),
120
+ updated_after: z
121
+ .string()
122
+ .optional()
123
+ .describe("Return pipelines updated after the specified date"),
124
+ updated_before: z
125
+ .string()
126
+ .optional()
127
+ .describe("Return pipelines updated before the specified date"),
128
+ order_by: z
129
+ .enum(["id", "status", "ref", "updated_at", "user_id"])
130
+ .optional()
131
+ .describe("Order pipelines by"),
132
+ sort: z.enum(["asc", "desc"]).optional().describe("Sort pipelines"),
93
133
  page: z.number().optional().describe("Page number for pagination"),
94
134
  per_page: z.number().optional().describe("Number of items per page (max 100)"),
95
135
  });
@@ -102,11 +142,36 @@ export const GetPipelineSchema = z.object({
102
142
  export const ListPipelineJobsSchema = z.object({
103
143
  project_id: z.string().describe("Project ID or URL-encoded path"),
104
144
  pipeline_id: z.number().describe("The ID of the pipeline"),
105
- scope: z.enum(['created', 'pending', 'running', 'failed', 'success', 'canceled', 'skipped', 'manual']).optional().describe("The scope of jobs to show"),
145
+ scope: z
146
+ .enum(["created", "pending", "running", "failed", "success", "canceled", "skipped", "manual"])
147
+ .optional()
148
+ .describe("The scope of jobs to show"),
106
149
  include_retried: z.boolean().optional().describe("Whether to include retried jobs"),
107
150
  page: z.number().optional().describe("Page number for pagination"),
108
151
  per_page: z.number().optional().describe("Number of items per page (max 100)"),
109
152
  });
153
+ // Schema for creating a new pipeline
154
+ export const CreatePipelineSchema = z.object({
155
+ project_id: z.string().describe("Project ID or URL-encoded path"),
156
+ ref: z.string().describe("The branch or tag to run the pipeline on"),
157
+ variables: z
158
+ .array(z.object({
159
+ key: z.string().describe("The key of the variable"),
160
+ value: z.string().describe("The value of the variable"),
161
+ }))
162
+ .optional()
163
+ .describe("An array of variables to use for the pipeline"),
164
+ });
165
+ // Schema for retrying a pipeline
166
+ export const RetryPipelineSchema = z.object({
167
+ project_id: z.string().describe("Project ID or URL-encoded path"),
168
+ pipeline_id: z.number().describe("The ID of the pipeline to retry"),
169
+ });
170
+ // Schema for canceling a pipeline
171
+ export const CancelPipelineSchema = z.object({
172
+ project_id: z.string().describe("Project ID or URL-encoded path"),
173
+ pipeline_id: z.number().describe("The ID of the pipeline to cancel"),
174
+ });
110
175
  // Schema for the input parameters for pipeline job operations
111
176
  export const GetPipelineJobOutputSchema = z.object({
112
177
  project_id: z.string().describe("Project ID or URL-encoded path"),
@@ -267,18 +332,9 @@ export const GetRepositoryTreeSchema = z.object({
267
332
  .string()
268
333
  .optional()
269
334
  .describe("The name of a repository branch or tag. Defaults to the default branch."),
270
- recursive: z
271
- .boolean()
272
- .optional()
273
- .describe("Boolean value to get a recursive tree"),
274
- per_page: z
275
- .number()
276
- .optional()
277
- .describe("Number of results to show per page"),
278
- page_token: z
279
- .string()
280
- .optional()
281
- .describe("The tree record ID for pagination"),
335
+ recursive: z.boolean().optional().describe("Boolean value to get a recursive tree"),
336
+ per_page: z.number().optional().describe("Number of results to show per page"),
337
+ page_token: z.string().optional().describe("The tree record ID for pagination"),
282
338
  pagination: z.string().optional().describe("Pagination method (keyset)"),
283
339
  });
284
340
  export const GitLabTreeSchema = z.object({
@@ -319,7 +375,7 @@ export const GitLabMilestonesSchema = z.object({
319
375
  updated_at: z.string(),
320
376
  created_at: z.string(),
321
377
  expired: z.boolean(),
322
- web_url: z.string().optional()
378
+ web_url: z.string().optional(),
323
379
  });
324
380
  // Input schemas for operations
325
381
  export const CreateRepositoryOptionsSchema = z.object({
@@ -558,10 +614,12 @@ export const UpdateMergeRequestNoteSchema = ProjectParamsSchema.extend({
558
614
  note_id: z.number().describe("The ID of a thread note"),
559
615
  body: z.string().optional().describe("The content of the note or reply"),
560
616
  resolved: z.boolean().optional().describe("Resolve or unresolve the note"),
561
- }).refine(data => data.body !== undefined || data.resolved !== undefined, {
562
- message: "At least one of 'body' or 'resolved' must be provided"
563
- }).refine(data => !(data.body !== undefined && data.resolved !== undefined), {
564
- message: "Only one of 'body' or 'resolved' can be provided, not both"
617
+ })
618
+ .refine(data => data.body !== undefined || data.resolved !== undefined, {
619
+ message: "At least one of 'body' or 'resolved' must be provided",
620
+ })
621
+ .refine(data => !(data.body !== undefined && data.resolved !== undefined), {
622
+ message: "Only one of 'body' or 'resolved' can be provided, not both",
565
623
  });
566
624
  // Input schema for adding a note to an existing merge request discussion
567
625
  export const CreateMergeRequestNoteSchema = ProjectParamsSchema.extend({
@@ -590,26 +648,14 @@ export const CreateOrUpdateFileSchema = ProjectParamsSchema.extend({
590
648
  content: z.string().describe("Content of the file"),
591
649
  commit_message: z.string().describe("Commit message"),
592
650
  branch: z.string().describe("Branch to create/update the file in"),
593
- previous_path: z
594
- .string()
595
- .optional()
596
- .describe("Path of the file to move/rename"),
651
+ previous_path: z.string().optional().describe("Path of the file to move/rename"),
597
652
  last_commit_id: z.string().optional().describe("Last known file commit ID"),
598
- commit_id: z
599
- .string()
600
- .optional()
601
- .describe("Current file commit ID (for update operations)"),
653
+ commit_id: z.string().optional().describe("Current file commit ID (for update operations)"),
602
654
  });
603
655
  export const SearchRepositoriesSchema = z.object({
604
656
  search: z.string().describe("Search query"), // Changed from query to match GitLab API
605
- page: z
606
- .number()
607
- .optional()
608
- .describe("Page number for pagination (default: 1)"),
609
- per_page: z
610
- .number()
611
- .optional()
612
- .describe("Number of results per page (default: 20)"),
657
+ page: z.number().optional().describe("Page number for pagination (default: 1)"),
658
+ per_page: z.number().optional().describe("Number of results per page (default: 20)"),
613
659
  });
614
660
  export const CreateRepositorySchema = z.object({
615
661
  name: z.string().describe("Repository name"),
@@ -618,10 +664,7 @@ export const CreateRepositorySchema = z.object({
618
664
  .enum(["private", "internal", "public"])
619
665
  .optional()
620
666
  .describe("Repository visibility level"),
621
- initialize_with_readme: z
622
- .boolean()
623
- .optional()
624
- .describe("Initialize with README.md"),
667
+ initialize_with_readme: z.boolean().optional().describe("Initialize with README.md"),
625
668
  });
626
669
  export const GetFileContentsSchema = ProjectParamsSchema.extend({
627
670
  file_path: z.string().describe("Path to the file or directory"),
@@ -640,10 +683,7 @@ export const PushFilesSchema = ProjectParamsSchema.extend({
640
683
  export const CreateIssueSchema = ProjectParamsSchema.extend({
641
684
  title: z.string().describe("Issue title"),
642
685
  description: z.string().optional().describe("Issue description"),
643
- assignee_ids: z
644
- .array(z.number())
645
- .optional()
646
- .describe("Array of user IDs to assign"),
686
+ assignee_ids: z.array(z.number()).optional().describe("Array of user IDs to assign"),
647
687
  labels: z.array(z.string()).optional().describe("Array of label names"),
648
688
  milestone_id: z.number().optional().describe("Milestone ID to assign"),
649
689
  });
@@ -653,10 +693,7 @@ export const CreateMergeRequestSchema = ProjectParamsSchema.extend({
653
693
  source_branch: z.string().describe("Branch containing changes"),
654
694
  target_branch: z.string().describe("Branch to merge into"),
655
695
  draft: z.boolean().optional().describe("Create as draft merge request"),
656
- allow_collaboration: z
657
- .boolean()
658
- .optional()
659
- .describe("Allow commits from upstream members"),
696
+ allow_collaboration: z.boolean().optional().describe("Allow commits from upstream members"),
660
697
  });
661
698
  export const ForkRepositorySchema = ProjectParamsSchema.extend({
662
699
  namespace: z.string().optional().describe("Namespace to fork to (full path)"),
@@ -676,23 +713,14 @@ export const GitLabMergeRequestDiffSchema = z.object({
676
713
  deleted_file: z.boolean(),
677
714
  });
678
715
  export const GetMergeRequestSchema = ProjectParamsSchema.extend({
679
- merge_request_iid: z
680
- .number()
681
- .optional()
682
- .describe("The IID of a merge request"),
716
+ merge_request_iid: z.number().optional().describe("The IID of a merge request"),
683
717
  source_branch: z.string().optional().describe("Source branch name"),
684
718
  });
685
719
  export const UpdateMergeRequestSchema = GetMergeRequestSchema.extend({
686
720
  title: z.string().optional().describe("The title of the merge request"),
687
- description: z
688
- .string()
689
- .optional()
690
- .describe("The description of the merge request"),
721
+ description: z.string().optional().describe("The description of the merge request"),
691
722
  target_branch: z.string().optional().describe("The target branch"),
692
- assignee_ids: z
693
- .array(z.number())
694
- .optional()
695
- .describe("The ID of the users to assign the MR to"),
723
+ assignee_ids: z.array(z.number()).optional().describe("The ID of the users to assign the MR to"),
696
724
  labels: z.array(z.string()).optional().describe("Labels for the MR"),
697
725
  state_event: z
698
726
  .enum(["close", "reopen"])
@@ -702,10 +730,7 @@ export const UpdateMergeRequestSchema = GetMergeRequestSchema.extend({
702
730
  .boolean()
703
731
  .optional()
704
732
  .describe("Flag indicating if the source branch should be removed"),
705
- squash: z
706
- .boolean()
707
- .optional()
708
- .describe("Squash commits into a single commit when merging"),
733
+ squash: z.boolean().optional().describe("Squash commits into a single commit when merging"),
709
734
  draft: z.boolean().optional().describe("Work in progress merge request"),
710
735
  });
711
736
  export const GetMergeRequestDiffsSchema = GetMergeRequestSchema.extend({
@@ -722,38 +747,14 @@ export const CreateNoteSchema = z.object({
722
747
  // Issues API operation schemas
723
748
  export const ListIssuesSchema = z.object({
724
749
  project_id: z.string().describe("Project ID or URL-encoded path"),
725
- assignee_id: z
726
- .number()
727
- .optional()
728
- .describe("Return issues assigned to the given user ID"),
729
- assignee_username: z
730
- .string()
731
- .optional()
732
- .describe("Return issues assigned to the given username"),
733
- author_id: z
734
- .number()
735
- .optional()
736
- .describe("Return issues created by the given user ID"),
737
- author_username: z
738
- .string()
739
- .optional()
740
- .describe("Return issues created by the given username"),
741
- confidential: z
742
- .boolean()
743
- .optional()
744
- .describe("Filter confidential or public issues"),
745
- created_after: z
746
- .string()
747
- .optional()
748
- .describe("Return issues created after the given time"),
749
- created_before: z
750
- .string()
751
- .optional()
752
- .describe("Return issues created before the given time"),
753
- due_date: z
754
- .string()
755
- .optional()
756
- .describe("Return issues that have the due date"),
750
+ assignee_id: z.number().optional().describe("Return issues assigned to the given user ID"),
751
+ assignee_username: z.string().optional().describe("Return issues assigned to the given username"),
752
+ author_id: z.number().optional().describe("Return issues created by the given user ID"),
753
+ author_username: z.string().optional().describe("Return issues created by the given username"),
754
+ confidential: z.boolean().optional().describe("Filter confidential or public issues"),
755
+ created_after: z.string().optional().describe("Return issues created after the given time"),
756
+ created_before: z.string().optional().describe("Return issues created before the given time"),
757
+ due_date: z.string().optional().describe("Return issues that have the due date"),
757
758
  label_name: z.array(z.string()).optional().describe("Array of label names"),
758
759
  milestone: z.string().optional().describe("Milestone title"),
759
760
  scope: z
@@ -765,18 +766,9 @@ export const ListIssuesSchema = z.object({
765
766
  .enum(["opened", "closed", "all"])
766
767
  .optional()
767
768
  .describe("Return issues with a specific state"),
768
- updated_after: z
769
- .string()
770
- .optional()
771
- .describe("Return issues updated after the given time"),
772
- updated_before: z
773
- .string()
774
- .optional()
775
- .describe("Return issues updated before the given time"),
776
- with_labels_details: z
777
- .boolean()
778
- .optional()
779
- .describe("Return more details for each label"),
769
+ updated_after: z.string().optional().describe("Return issues updated after the given time"),
770
+ updated_before: z.string().optional().describe("Return issues updated before the given time"),
771
+ with_labels_details: z.boolean().optional().describe("Return more details for each label"),
780
772
  page: z.number().optional().describe("Page number for pagination"),
781
773
  per_page: z.number().optional().describe("Number of items per page"),
782
774
  });
@@ -791,10 +783,7 @@ export const ListMergeRequestsSchema = z.object({
791
783
  .string()
792
784
  .optional()
793
785
  .describe("Returns merge requests assigned to the given username"),
794
- author_id: z
795
- .number()
796
- .optional()
797
- .describe("Returns merge requests created by the given user ID"),
786
+ author_id: z.number().optional().describe("Returns merge requests created by the given user ID"),
798
787
  author_username: z
799
788
  .string()
800
789
  .optional()
@@ -850,14 +839,8 @@ export const ListMergeRequestsSchema = z.object({
850
839
  .string()
851
840
  .optional()
852
841
  .describe("Return merge requests from a specific source branch"),
853
- wip: z
854
- .enum(["yes", "no"])
855
- .optional()
856
- .describe("Filter merge requests against their wip status"),
857
- with_labels_details: z
858
- .boolean()
859
- .optional()
860
- .describe("Return more details for each label"),
842
+ wip: z.enum(["yes", "no"]).optional().describe("Filter merge requests against their wip status"),
843
+ with_labels_details: z.boolean().optional().describe("Return more details for each label"),
861
844
  page: z.number().optional().describe("Page number for pagination"),
862
845
  per_page: z.number().optional().describe("Number of items per page"),
863
846
  });
@@ -870,28 +853,13 @@ export const UpdateIssueSchema = z.object({
870
853
  issue_iid: z.number().describe("The internal ID of the project issue"),
871
854
  title: z.string().optional().describe("The title of the issue"),
872
855
  description: z.string().optional().describe("The description of the issue"),
873
- assignee_ids: z
874
- .array(z.number())
875
- .optional()
876
- .describe("Array of user IDs to assign issue to"),
877
- confidential: z
878
- .boolean()
879
- .optional()
880
- .describe("Set the issue to be confidential"),
881
- discussion_locked: z
882
- .boolean()
883
- .optional()
884
- .describe("Flag to lock discussions"),
885
- due_date: z
886
- .string()
887
- .optional()
888
- .describe("Date the issue is due (YYYY-MM-DD)"),
856
+ assignee_ids: z.array(z.number()).optional().describe("Array of user IDs to assign issue to"),
857
+ confidential: z.boolean().optional().describe("Set the issue to be confidential"),
858
+ discussion_locked: z.boolean().optional().describe("Flag to lock discussions"),
859
+ due_date: z.string().optional().describe("Date the issue is due (YYYY-MM-DD)"),
889
860
  labels: z.array(z.string()).optional().describe("Array of label names"),
890
861
  milestone_id: z.number().optional().describe("Milestone ID to assign"),
891
- state_event: z
892
- .enum(["close", "reopen"])
893
- .optional()
894
- .describe("Update issue state (close/reopen)"),
862
+ state_event: z.enum(["close", "reopen"]).optional().describe("Update issue state (close/reopen)"),
895
863
  weight: z.number().optional().describe("Weight of the issue (0-9)"),
896
864
  });
897
865
  export const DeleteIssueSchema = z.object({
@@ -913,8 +881,14 @@ export const ListIssueDiscussionsSchema = z.object({
913
881
  issue_iid: z.number().describe("The internal ID of the project issue"),
914
882
  page: z.number().optional().describe("Page number for pagination"),
915
883
  per_page: z.number().optional().describe("Number of items per page"),
916
- sort: z.enum(["asc", "desc"]).optional().describe("Return issue discussions sorted in ascending or descending order"),
917
- order_by: z.enum(["created_at", "updated_at"]).optional().describe("Return issue discussions ordered by created_at or updated_at fields"),
884
+ sort: z
885
+ .enum(["asc", "desc"])
886
+ .optional()
887
+ .describe("Return issue discussions sorted in ascending or descending order"),
888
+ order_by: z
889
+ .enum(["created_at", "updated_at"])
890
+ .optional()
891
+ .describe("Return issue discussions ordered by created_at or updated_at fields"),
918
892
  });
919
893
  export const GetIssueLinkSchema = z.object({
920
894
  project_id: z.string().describe("Project ID or URL-encoded path"),
@@ -924,12 +898,8 @@ export const GetIssueLinkSchema = z.object({
924
898
  export const CreateIssueLinkSchema = z.object({
925
899
  project_id: z.string().describe("Project ID or URL-encoded path"),
926
900
  issue_iid: z.number().describe("The internal ID of a project's issue"),
927
- target_project_id: z
928
- .string()
929
- .describe("The ID or URL-encoded path of a target project"),
930
- target_issue_iid: z
931
- .number()
932
- .describe("The internal ID of a target project's issue"),
901
+ target_project_id: z.string().describe("The ID or URL-encoded path of a target project"),
902
+ target_issue_iid: z.number().describe("The internal ID of a target project's issue"),
933
903
  link_type: z
934
904
  .enum(["relates_to", "blocks", "is_blocked_by"])
935
905
  .optional()
@@ -945,10 +915,7 @@ export const ListNamespacesSchema = z.object({
945
915
  search: z.string().optional().describe("Search term for namespaces"),
946
916
  page: z.number().optional().describe("Page number for pagination"),
947
917
  per_page: z.number().optional().describe("Number of items per page"),
948
- owned: z
949
- .boolean()
950
- .optional()
951
- .describe("Filter for namespaces owned by current user"),
918
+ owned: z.boolean().optional().describe("Filter for namespaces owned by current user"),
952
919
  });
953
920
  export const GetNamespaceSchema = z.object({
954
921
  namespace_id: z.string().describe("Namespace ID or full path"),
@@ -964,18 +931,9 @@ export const ListProjectsSchema = z.object({
964
931
  search: z.string().optional().describe("Search term for projects"),
965
932
  page: z.number().optional().describe("Page number for pagination"),
966
933
  per_page: z.number().optional().describe("Number of items per page"),
967
- search_namespaces: z
968
- .boolean()
969
- .optional()
970
- .describe("Needs to be true if search is full path"),
971
- owned: z
972
- .boolean()
973
- .optional()
974
- .describe("Filter for projects owned by current user"),
975
- membership: z
976
- .boolean()
977
- .optional()
978
- .describe("Filter for projects where current user is a member"),
934
+ search_namespaces: z.boolean().optional().describe("Needs to be true if search is full path"),
935
+ owned: z.boolean().optional().describe("Filter for projects owned by current user"),
936
+ membership: z.boolean().optional().describe("Filter for projects where current user is a member"),
979
937
  simple: z.boolean().optional().describe("Return only limited fields"),
980
938
  archived: z.boolean().optional().describe("Filter for archived projects"),
981
939
  visibility: z
@@ -983,14 +941,7 @@ export const ListProjectsSchema = z.object({
983
941
  .optional()
984
942
  .describe("Filter by project visibility"),
985
943
  order_by: z
986
- .enum([
987
- "id",
988
- "name",
989
- "path",
990
- "created_at",
991
- "updated_at",
992
- "last_activity_at",
993
- ])
944
+ .enum(["id", "name", "path", "created_at", "updated_at", "last_activity_at"])
994
945
  .optional()
995
946
  .describe("Return projects ordered by field"),
996
947
  sort: z
@@ -1005,10 +956,7 @@ export const ListProjectsSchema = z.object({
1005
956
  .boolean()
1006
957
  .optional()
1007
958
  .describe("Filter projects with merge requests feature enabled"),
1008
- min_access_level: z
1009
- .number()
1010
- .optional()
1011
- .describe("Filter by minimum access level"),
959
+ min_access_level: z.number().optional().describe("Filter by minimum access level"),
1012
960
  });
1013
961
  // Label operation schemas
1014
962
  export const ListLabelsSchema = z.object({
@@ -1017,19 +965,13 @@ export const ListLabelsSchema = z.object({
1017
965
  .boolean()
1018
966
  .optional()
1019
967
  .describe("Whether or not to include issue and merge request counts"),
1020
- include_ancestor_groups: z
1021
- .boolean()
1022
- .optional()
1023
- .describe("Include ancestor groups"),
968
+ include_ancestor_groups: z.boolean().optional().describe("Include ancestor groups"),
1024
969
  search: z.string().optional().describe("Keyword to filter labels by"),
1025
970
  });
1026
971
  export const GetLabelSchema = z.object({
1027
972
  project_id: z.string().describe("Project ID or URL-encoded path"),
1028
973
  label_id: z.string().describe("The ID or title of a project's label"),
1029
- include_ancestor_groups: z
1030
- .boolean()
1031
- .optional()
1032
- .describe("Include ancestor groups"),
974
+ include_ancestor_groups: z.boolean().optional().describe("Include ancestor groups"),
1033
975
  });
1034
976
  export const CreateLabelSchema = z.object({
1035
977
  project_id: z.string().describe("Project ID or URL-encoded path"),
@@ -1038,11 +980,7 @@ export const CreateLabelSchema = z.object({
1038
980
  .string()
1039
981
  .describe("The color of the label given in 6-digit hex notation with leading '#' sign"),
1040
982
  description: z.string().optional().describe("The description of the label"),
1041
- priority: z
1042
- .number()
1043
- .nullable()
1044
- .optional()
1045
- .describe("The priority of the label"),
983
+ priority: z.number().nullable().optional().describe("The priority of the label"),
1046
984
  });
1047
985
  export const UpdateLabelSchema = z.object({
1048
986
  project_id: z.string().describe("Project ID or URL-encoded path"),
@@ -1052,15 +990,8 @@ export const UpdateLabelSchema = z.object({
1052
990
  .string()
1053
991
  .optional()
1054
992
  .describe("The color of the label given in 6-digit hex notation with leading '#' sign"),
1055
- description: z
1056
- .string()
1057
- .optional()
1058
- .describe("The new description of the label"),
1059
- priority: z
1060
- .number()
1061
- .nullable()
1062
- .optional()
1063
- .describe("The new priority of the label"),
993
+ description: z.string().optional().describe("The new description of the label"),
994
+ priority: z.number().nullable().optional().describe("The new priority of the label"),
1064
995
  });
1065
996
  export const DeleteLabelSchema = z.object({
1066
997
  project_id: z.string().describe("Project ID or URL-encoded path"),
@@ -1069,10 +1000,7 @@ export const DeleteLabelSchema = z.object({
1069
1000
  // Group projects schema
1070
1001
  export const ListGroupProjectsSchema = z.object({
1071
1002
  group_id: z.string().describe("Group ID or path"),
1072
- include_subgroups: z
1073
- .boolean()
1074
- .optional()
1075
- .describe("Include projects from subgroups"),
1003
+ include_subgroups: z.boolean().optional().describe("Include projects from subgroups"),
1076
1004
  search: z.string().optional().describe("Search term to filter projects"),
1077
1005
  order_by: z
1078
1006
  .enum(["name", "path", "created_at", "updated_at", "last_activity_at"])
@@ -1094,24 +1022,12 @@ export const ListGroupProjectsSchema = z.object({
1094
1022
  .boolean()
1095
1023
  .optional()
1096
1024
  .describe("Filter projects with merge requests feature enabled"),
1097
- min_access_level: z
1098
- .number()
1099
- .optional()
1100
- .describe("Filter by minimum access level"),
1101
- with_programming_language: z
1102
- .string()
1103
- .optional()
1104
- .describe("Filter by programming language"),
1025
+ min_access_level: z.number().optional().describe("Filter by minimum access level"),
1026
+ with_programming_language: z.string().optional().describe("Filter by programming language"),
1105
1027
  starred: z.boolean().optional().describe("Filter by starred projects"),
1106
1028
  statistics: z.boolean().optional().describe("Include project statistics"),
1107
- with_custom_attributes: z
1108
- .boolean()
1109
- .optional()
1110
- .describe("Include custom attributes"),
1111
- with_security_reports: z
1112
- .boolean()
1113
- .optional()
1114
- .describe("Include security reports"),
1029
+ with_custom_attributes: z.boolean().optional().describe("Include custom attributes"),
1030
+ with_security_reports: z.boolean().optional().describe("Include security reports"),
1115
1031
  });
1116
1032
  // Add wiki operation schemas
1117
1033
  export const ListWikiPagesSchema = z.object({
@@ -1127,20 +1043,14 @@ export const CreateWikiPageSchema = z.object({
1127
1043
  project_id: z.string().describe("Project ID or URL-encoded path"),
1128
1044
  title: z.string().describe("Title of the wiki page"),
1129
1045
  content: z.string().describe("Content of the wiki page"),
1130
- format: z
1131
- .string()
1132
- .optional()
1133
- .describe("Content format, e.g., markdown, rdoc"),
1046
+ format: z.string().optional().describe("Content format, e.g., markdown, rdoc"),
1134
1047
  });
1135
1048
  export const UpdateWikiPageSchema = z.object({
1136
1049
  project_id: z.string().describe("Project ID or URL-encoded path"),
1137
1050
  slug: z.string().describe("URL-encoded slug of the wiki page"),
1138
1051
  title: z.string().optional().describe("New title of the wiki page"),
1139
1052
  content: z.string().optional().describe("New content of the wiki page"),
1140
- format: z
1141
- .string()
1142
- .optional()
1143
- .describe("Content format, e.g., markdown, rdoc"),
1053
+ format: z.string().optional().describe("Content format, e.g., markdown, rdoc"),
1144
1054
  });
1145
1055
  export const DeleteWikiPageSchema = z.object({
1146
1056
  project_id: z.string().describe("Project ID or URL-encoded path"),
@@ -1181,12 +1091,27 @@ export const CreateMergeRequestThreadSchema = ProjectParamsSchema.extend({
1181
1091
  // Schema for listing project milestones
1182
1092
  export const ListProjectMilestonesSchema = ProjectParamsSchema.extend({
1183
1093
  iids: z.array(z.number()).optional().describe("Return only the milestones having the given iid"),
1184
- state: z.enum(["active", "closed"]).optional().describe("Return only active or closed milestones"),
1185
- title: z.string().optional().describe("Return only milestones with a title matching the provided string"),
1186
- search: z.string().optional().describe("Return only milestones with a title or description matching the provided string"),
1094
+ state: z
1095
+ .enum(["active", "closed"])
1096
+ .optional()
1097
+ .describe("Return only active or closed milestones"),
1098
+ title: z
1099
+ .string()
1100
+ .optional()
1101
+ .describe("Return only milestones with a title matching the provided string"),
1102
+ search: z
1103
+ .string()
1104
+ .optional()
1105
+ .describe("Return only milestones with a title or description matching the provided string"),
1187
1106
  include_ancestors: z.boolean().optional().describe("Include ancestor groups"),
1188
- updated_before: z.string().optional().describe("Return milestones updated before the specified date (ISO 8601 format)"),
1189
- updated_after: z.string().optional().describe("Return milestones updated after the specified date (ISO 8601 format)"),
1107
+ updated_before: z
1108
+ .string()
1109
+ .optional()
1110
+ .describe("Return milestones updated before the specified date (ISO 8601 format)"),
1111
+ updated_after: z
1112
+ .string()
1113
+ .optional()
1114
+ .describe("Return milestones updated after the specified date (ISO 8601 format)"),
1190
1115
  page: z.number().optional().describe("Page number for pagination"),
1191
1116
  per_page: z.number().optional().describe("Number of items per page (max 100)"),
1192
1117
  });
@@ -1207,7 +1132,10 @@ export const EditProjectMilestoneSchema = GetProjectMilestoneSchema.extend({
1207
1132
  description: z.string().optional().describe("The description of the milestone"),
1208
1133
  due_date: z.string().optional().describe("The due date of the milestone (YYYY-MM-DD)"),
1209
1134
  start_date: z.string().optional().describe("The start date of the milestone (YYYY-MM-DD)"),
1210
- state_event: z.enum(["close", "activate"]).optional().describe("The state event of the milestone"),
1135
+ state_event: z
1136
+ .enum(["close", "activate"])
1137
+ .optional()
1138
+ .describe("The state event of the milestone"),
1211
1139
  });
1212
1140
  // Schema for deleting a milestone
1213
1141
  export const DeleteProjectMilestoneSchema = GetProjectMilestoneSchema;