@@ -130,21 +130,18 @@ export const issuesToolSchema = {
130
130
project_key : z . string ( ) . optional ( ) . describe ( 'Single project key for backward compatibility' ) , // Made optional to support projects array
131
131
projects : z
132
132
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
133
- . transform ( parseJsonStringArray )
134
133
. nullable ( )
135
134
. optional ( )
136
135
. describe ( 'Filter by project keys' ) ,
137
136
component_keys : z
138
137
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
139
- . transform ( parseJsonStringArray )
140
138
. nullable ( )
141
139
. optional ( )
142
140
. describe (
143
141
'Filter by component keys (file paths, directories, or modules). Use this to filter issues by specific files or folders'
144
142
) ,
145
143
components : z
146
144
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
147
- . transform ( parseJsonStringArray )
148
145
. nullable ( )
149
146
. optional ( )
150
147
. describe ( 'Alias for component_keys - filter by file paths, directories, or modules' ) ,
@@ -155,26 +152,16 @@ export const issuesToolSchema = {
155
152
. describe ( 'Return only issues on the specified components, not on their sub-components' ) ,
156
153
directories : z
157
154
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
158
- . transform ( parseJsonStringArray )
159
155
. nullable ( )
160
156
. optional ( )
161
157
. describe ( 'Filter by directory paths' ) ,
162
158
files : z
163
159
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
164
- . transform ( parseJsonStringArray )
165
160
. nullable ( )
166
161
. optional ( )
167
162
. describe ( 'Filter by specific file paths' ) ,
168
163
scopes : z
169
164
. union ( [ z . array ( z . enum ( [ 'MAIN' , 'TEST' , 'OVERALL' ] ) ) , z . string ( ) ] )
170
- . transform ( ( val ) => {
171
- const parsed = parseJsonStringArray ( val ) ;
172
- // Validate that all values are valid scopes
173
- if ( parsed && Array . isArray ( parsed ) ) {
174
- return parsed . filter ( ( v ) => [ 'MAIN' , 'TEST' , 'OVERALL' ] . includes ( v ) ) ;
175
- }
176
- return parsed ;
177
- } )
178
165
. nullable ( )
179
166
. optional ( )
180
167
. describe ( 'Filter by issue scopes (MAIN, TEST, OVERALL)' ) ,
@@ -186,7 +173,6 @@ export const issuesToolSchema = {
186
173
// Issue filters
187
174
issues : z
188
175
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
189
- . transform ( parseJsonStringArray )
190
176
. nullable ( )
191
177
. optional ( ) ,
192
178
severity : severitySchema , // Deprecated single value
@@ -208,13 +194,11 @@ export const issuesToolSchema = {
208
194
// Rules and tags
209
195
rules : z
210
196
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
211
- . transform ( parseJsonStringArray )
212
197
. nullable ( )
213
198
. optional ( )
214
199
. describe ( 'Filter by rule keys' ) ,
215
200
tags : z
216
201
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
217
- . transform ( parseJsonStringArray )
218
202
. nullable ( )
219
203
. optional ( )
220
204
. describe (
@@ -235,7 +219,6 @@ export const issuesToolSchema = {
235
219
. describe ( 'Filter to only assigned (true) or unassigned (false) issues' ) ,
236
220
assignees : z
237
221
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
238
- . transform ( parseJsonStringArray )
239
222
. nullable ( )
240
223
. optional ( )
241
224
. describe (
@@ -244,54 +227,45 @@ export const issuesToolSchema = {
244
227
author : z . string ( ) . nullable ( ) . optional ( ) . describe ( 'Filter by single issue author' ) , // Single author
245
228
authors : z
246
229
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
247
- . transform ( parseJsonStringArray )
248
230
. nullable ( )
249
231
. optional ( )
250
232
. describe ( 'Filter by multiple issue authors' ) , // Multiple authors
251
233
252
234
// Security standards
253
235
cwe : z
254
236
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
255
- . transform ( parseJsonStringArray )
256
237
. nullable ( )
257
238
. optional ( ) ,
258
239
owasp_top10 : z
259
240
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
260
- . transform ( parseJsonStringArray )
261
241
. nullable ( )
262
242
. optional ( ) ,
263
243
owasp_top10_v2021 : z
264
244
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
265
- . transform ( parseJsonStringArray )
266
245
. nullable ( )
267
246
. optional ( ) , // New 2021 version
268
247
sans_top25 : z
269
248
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
270
- . transform ( parseJsonStringArray )
271
249
. nullable ( )
272
250
. optional ( ) ,
273
251
sonarsource_security : z
274
252
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
275
- . transform ( parseJsonStringArray )
276
253
. nullable ( )
277
254
. optional ( ) ,
278
255
sonarsource_security_category : z
279
256
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
280
- . transform ( parseJsonStringArray )
281
257
. nullable ( )
282
258
. optional ( ) ,
283
259
284
260
// Languages
285
261
languages : z
286
262
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
287
- . transform ( parseJsonStringArray )
288
263
. nullable ( )
289
264
. optional ( ) ,
290
265
291
266
// Facets
292
267
facets : z
293
268
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
294
- . transform ( parseJsonStringArray )
295
269
. nullable ( )
296
270
. optional ( )
297
271
. describe (
@@ -325,7 +299,6 @@ export const issuesToolSchema = {
325
299
// Response optimization
326
300
additional_fields : z
327
301
. union ( [ z . array ( z . string ( ) ) , z . string ( ) ] )
328
- . transform ( parseJsonStringArray )
329
302
. nullable ( )
330
303
. optional ( ) ,
331
304
0 commit comments