You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add enum constraints and validation to unit parameter on metrics tools
- Add JSON Schema enum arrays to all unit properties in tool definitions
(quarter/month/week, plus sprint for team_metrics)
- Add _validateEnums() to ApiTool that checks enum-constrained params
before calling the API, returning actionable error messages
- Add tests for enum validation (rejects invalid, accepts valid, skips
non-enum fields)
Resolves LLMF-123
Co-Authored-By: Claude <noreply@anthropic.com>
series: {type: "boolean",description: "Whether to return series data"},
188
204
decimal_places: {type: "integer",description: "Show FTE amounts rounded to this many decimal places (1 to 3). Defaults to 1."},
189
205
include_below_threshold_card_keys: {type: "boolean",description: "Include allocated card keys that round to 0 FTE. Omit when using max_n_allocation_card_keys (default true works well). Set to false when omitting max_n_allocation_card_keys to limit excessive data volume from minor allocations."},
@@ -202,7 +218,7 @@ const apiTools = [
202
218
properties: {
203
219
start_date: {type: "string",description: "Start date (YYYY-MM-DD)"},
204
220
end_date: {type: "string",description: "End date (YYYY-MM-DD)"},
205
-
unit: {type: "string",description: "Time unit (\"quarter\", \"month\", \"week\")"},
series: {type: "boolean",description: "Whether to return series data"},
207
223
decimal_places: {type: "integer",description: "Show FTE amounts rounded to this many decimal places (1 to 3). Defaults to 1."},
208
224
include_below_threshold_card_keys: {type: "boolean",description: "Include allocated card keys that round to 0 FTE. Omit when using max_n_allocation_card_keys (default true works well). Set to false when omitting max_n_allocation_card_keys to limit excessive data volume from minor allocations."},
@@ -223,7 +239,7 @@ const apiTools = [
223
239
properties: {
224
240
start_date: {type: "string",description: "Start date (YYYY-MM-DD)"},
225
241
end_date: {type: "string",description: "End date (YYYY-MM-DD)"},
226
-
unit: {type: "string",description: "Time unit (\"quarter\", \"month\", \"week\")"},
series: {type: "boolean",description: "Whether to return series data"},
228
244
decimal_places: {type: "integer",description: "Show FTE amounts rounded to this many decimal places (1 to 3). Defaults to 1."},
229
245
include_below_threshold_card_keys: {type: "boolean",description: "Include allocated card keys that round to 0 FTE. Omit when using max_n_allocation_card_keys (default true works well). Set to false when omitting max_n_allocation_card_keys to limit excessive data volume from minor allocations."},
@@ -242,7 +258,7 @@ const apiTools = [
242
258
properties: {
243
259
start_date: {type: "string",description: "Start date (YYYY-MM-DD)"},
244
260
end_date: {type: "string",description: "End date (YYYY-MM-DD)"},
245
-
unit: {type: "string",description: "Time unit (\"quarter\", \"month\", \"week\")"},
series: {type: "boolean",description: "Whether to return series data"},
247
263
decimal_places: {type: "integer",description: "Show FTE amounts rounded to this many decimal places (1 to 3). Defaults to 1."},
248
264
include_below_threshold_card_keys: {type: "boolean",description: "Include allocated card keys that round to 0 FTE. Omit when using max_n_allocation_card_keys (default true works well). Set to false when omitting max_n_allocation_card_keys to limit excessive data volume from minor allocations."},
@@ -261,7 +277,7 @@ const apiTools = [
261
277
properties: {
262
278
start_date: {type: "string",description: "Start date (YYYY-MM-DD)"},
263
279
end_date: {type: "string",description: "End date (YYYY-MM-DD)"},
264
-
unit: {type: "string",description: "Time unit (\"quarter\", \"month\", \"week\")"},
series: {type: "boolean",description: "Whether to return series data"},
266
282
decimal_places: {type: "integer",description: "Show FTE amounts rounded to this many decimal places (1 to 3). Defaults to 1."},
267
283
include_below_threshold_card_keys: {type: "boolean",description: "Include allocated card keys that round to 0 FTE. Omit when using max_n_allocation_card_keys (default true works well). Set to false when omitting max_n_allocation_card_keys to limit excessive data volume from minor allocations."},
@@ -282,7 +298,7 @@ const apiTools = [
282
298
properties: {
283
299
start_date: {type: "string",description: "Start date (YYYY-MM-DD)"},
284
300
end_date: {type: "string",description: "End date (YYYY-MM-DD)"},
285
-
unit: {type: "string",description: "Time unit (\"quarter\", \"month\", \"week\")"},
series: {type: "boolean",description: "Whether to return series data"},
287
303
decimal_places: {type: "integer",description: "Show FTE amounts rounded to this many decimal places (1 to 3). Defaults to 1."},
288
304
include_below_threshold_card_keys: {type: "boolean",description: "Include allocated card keys that round to 0 FTE. Omit when using max_n_allocation_card_keys (default true works well). Set to false when omitting max_n_allocation_card_keys to limit excessive data volume from minor allocations."},
@@ -302,7 +318,7 @@ const apiTools = [
302
318
properties: {
303
319
start_date: {type: "string",description: "Start date (YYYY-MM-DD)"},
304
320
end_date: {type: "string",description: "End date (YYYY-MM-DD)"},
305
-
unit: {type: "string",description: "Time unit (\"quarter\", \"month\", \"week\")"},
series: {type: "boolean",description: "Whether to return series data"},
307
323
decimal_places: {type: "integer",description: "Show FTE amounts rounded to this many decimal places (1 to 3). Defaults to 1."},
308
324
include_below_threshold_card_keys: {type: "boolean",description: "Include allocated card keys that round to 0 FTE. Omit when using max_n_allocation_card_keys (default true works well). Set to false when omitting max_n_allocation_card_keys to limit excessive data volume from minor allocations."},
@@ -322,7 +338,7 @@ const apiTools = [
322
338
properties: {
323
339
start_date: {type: "string",description: "Start date (YYYY-MM-DD)"},
324
340
end_date: {type: "string",description: "End date (YYYY-MM-DD)"},
325
-
unit: {type: "string",description: "Time unit (\"quarter\", \"month\", \"week\")"},
series: {type: "boolean",description: "Whether to return series data"},
327
343
decimal_places: {type: "integer",description: "Show FTE amounts rounded to this many decimal places (1 to 3). Defaults to 1."},
328
344
include_below_threshold_card_keys: {type: "boolean",description: "Include allocated card keys that round to 0 FTE. Omit when using max_n_allocation_card_keys (default true works well). Set to false when omitting max_n_allocation_card_keys to limit excessive data volume from minor allocations."},
@@ -355,7 +371,7 @@ const apiTools = [
355
371
properties: {
356
372
start_date: {type: "string",description: "Start date (YYYY-MM-DD)"},
357
373
end_date: {type: "string",description: "End date (YYYY-MM-DD)"},
358
-
unit: {type: "string",description: "Time unit (\"quarter\", \"month\", \"week\", \"sprint\")"},
series: {type: "boolean",description: "Whether to return series data"},
360
376
decimal_places: {type: "integer",description: "Show FTE amounts rounded to this many decimal places (1 to 3). Defaults to 1."},
361
377
include_below_threshold_card_keys: {type: "boolean",description: "Include allocated card keys that round to 0 FTE. Omit when using max_n_allocation_card_keys (default true works well). Set to false when omitting max_n_allocation_card_keys to limit excessive data volume from minor allocations."},
@@ -378,7 +394,7 @@ const apiTools = [
378
394
properties: {
379
395
start_date: {type: "string",description: "Start date (YYYY-MM-DD)"},
380
396
end_date: {type: "string",description: "End date (YYYY-MM-DD)"},
381
-
unit: {type: "string",description: "Time unit (\"quarter\", \"month\", \"week\", \"sprint\")"},
series: {type: "boolean",description: "Whether to return series data"},
383
399
decimal_places: {type: "integer",description: "Show FTE amounts rounded to this many decimal places (1 to 3). Defaults to 1."},
384
400
include_below_threshold_card_keys: {type: "boolean",description: "Include allocated card keys that round to 0 FTE. Omit when using max_n_allocation_card_keys (default true works well). Set to false when omitting max_n_allocation_card_keys to limit excessive data volume from minor allocations."},
0 commit comments