@smartbear/mcp 0.26.0 → 0.27.0

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.
Files changed (32) hide show
  1. package/README.md +10 -2
  2. package/dist/package.json.js +1 -1
  3. package/dist/qmetry/client/api/client-api.js +13 -1
  4. package/dist/qmetry/client/auto-resolve.js +23 -1
  5. package/dist/qmetry/client/handlers.js +10 -2
  6. package/dist/qmetry/client/issues.js +113 -1
  7. package/dist/qmetry/client/testcase.js +82 -1
  8. package/dist/qmetry/client/testsuite.js +20 -8
  9. package/dist/qmetry/client/tools/index.js +5 -2
  10. package/dist/qmetry/client/tools/issue-tools.js +163 -1
  11. package/dist/qmetry/client/tools/testcase-tools.js +81 -7
  12. package/dist/qmetry/client/tools/testsuite-tools.js +291 -26
  13. package/dist/qmetry/client/tools/udf-tools.js +294 -0
  14. package/dist/qmetry/client/udf.js +376 -0
  15. package/dist/qmetry/client.js +30 -3
  16. package/dist/qmetry/config/constants.js +63 -2
  17. package/dist/qmetry/config/rest-endpoints.js +7 -1
  18. package/dist/qmetry/types/common.js +85 -47
  19. package/dist/qmetry/types/issues.js +5 -0
  20. package/dist/qmetry/types/udf.js +77 -0
  21. package/dist/swagger/client/api.js +421 -8
  22. package/dist/swagger/client/configuration.js +9 -0
  23. package/dist/swagger/client/functional-testing-api.js +38 -2
  24. package/dist/swagger/client/functional-testing-tools.js +18 -0
  25. package/dist/swagger/client/functional-testing-types.js +11 -0
  26. package/dist/swagger/client/portal-types.js +35 -3
  27. package/dist/swagger/client/portal-utils.js +50 -0
  28. package/dist/swagger/client/registry-types.js +8 -0
  29. package/dist/swagger/client/tools.js +25 -4
  30. package/dist/swagger/client/utils.js +37 -0
  31. package/dist/swagger/client.js +37 -5
  32. package/package.json +1 -1
@@ -703,53 +703,229 @@ const TESTSUITE_TOOLS = [
703
703
  {
704
704
  title: "Fetch Test Case Runs by Test Suite Run",
705
705
  toolset: "Test Suites",
706
- summary: "Get test case runs under a specific test suite run execution in QMetry",
706
+ summary: "Get test case runs under a specific test suite run execution in QMetry, including Test Run UDF values. ALWAYS present results as a unified table: Test Case Key | Test Case Summary | Executed Version | Execution Status | <UDF Label columns…>. NEVER show a separate type+value breakdown — always combine identification fields and UDF values in one table per run.",
707
707
  handler: QMetryToolsHandlers.FETCH_TESTCASE_RUNS_BY_TESTSUITE_RUN,
708
708
  inputSchema: TestCaseRunsByTestSuiteRunArgsSchema,
709
- purpose: "Retrieve detailed test case run information for a specific test suite run execution. This tool provides comprehensive test case run data including execution status, test results, tester information, execution dates, and other run metadata. Essential for detailed execution analysis, test run reporting, and execution audit trails. NOTE: Uses simplified payload structure with only essential parameters (start, page, limit, tsrunID, viewId).",
709
+ formatResponse: (result) => {
710
+ if (!result?.data || !Array.isArray(result.data)) return result;
711
+ if (result.hasTcRunUdf === false) {
712
+ return {
713
+ ...result,
714
+ testRunUdfNote: "No Test Run UDFs are configured for this project. The 'testRunUdfs' field will not be present in execution records. To enable Test Run UDF features, a project administrator must define Test Run UDF fields in the project settings."
715
+ };
716
+ }
717
+ return {
718
+ ...result,
719
+ data: result.data.map((row) => {
720
+ if (!row.udfjson) return row;
721
+ let testRunUdfs = {};
722
+ try {
723
+ const parsed = JSON.parse(row.udfjson);
724
+ testRunUdfs = Object.fromEntries(
725
+ Object.entries(parsed).map(([key, val]) => {
726
+ if (typeof val === "string" && /<[^>]+>/.test(val)) {
727
+ const text = val.replace(/<[^>]*>/g, " ").replace(/&(nbsp|amp|lt|gt|quot);/g, (_, entity) => {
728
+ if (entity === "nbsp") return " ";
729
+ if (entity === "amp") return "&";
730
+ if (entity === "lt") return "<";
731
+ if (entity === "gt") return ">";
732
+ if (entity === "quot") return '"';
733
+ return `&${entity};`;
734
+ }).replace(/\s+/g, " ").trim();
735
+ return [key, text];
736
+ }
737
+ return [key, val];
738
+ })
739
+ );
740
+ } catch {
741
+ testRunUdfs = {};
742
+ }
743
+ const { udfjson: _udfjson, ...rest } = row;
744
+ return { ...rest, testRunUdfs };
745
+ })
746
+ };
747
+ },
748
+ purpose: "Retrieve detailed test case run information for a specific test suite run execution. This tool provides comprehensive test case run data including execution status, test results, tester information, execution dates, Test Run UDF values, and other run metadata. Supports filtering by standard fields, test case UDFs (udfFilter), and Test Run UDFs (tcrUdfFilter). Essential for detailed execution analysis, test run reporting, UDF value inspection, and execution audit trails. IMPORTANT: Every response row contains key identification fields — Test Case Key (entityKey), Test Case Summary (summary), Executed Version (latestVersion), Execution Status (runStatus), and Test Run UDF values (testRunUdfs). These MUST always be shown in the response so users can identify which test case run each record represents.",
710
749
  useCases: [
711
750
  "Get all test case runs under a specific test suite run execution",
712
- "Analyze individual test case execution results and status",
751
+ "Fetch Test Run UDF values for all test case executions in a test suite run — always show Test Case Key, Summary, and Execution Status alongside UDFs",
752
+ "Fetch Test Run UDF values for a specific test case execution by tcRunID",
753
+ "Filter test case runs by Test Run UDF field values (e.g. show only runs where dropdown UDF = specific option)",
754
+ "Analyze individual test case execution results, status, and custom UDF metadata",
713
755
  "Monitor test case run performance and execution trends",
714
- "Generate detailed test execution reports for specific runs",
756
+ "Generate detailed test execution reports including custom UDF data",
715
757
  "Track test case run history and execution patterns",
716
758
  "Validate test case run coverage and execution completeness",
717
- "Audit test case run data for compliance and quality assurance",
718
- "Export detailed test case run data for external reporting",
759
+ "Audit test case run data with UDF values for compliance and quality assurance",
760
+ "Export detailed test case run data including Test Run UDFs for external reporting",
719
761
  "Retrieve paginated test case run results for large test suite executions"
720
762
  ],
721
763
  examples: [
722
764
  {
723
765
  description: "Get all test case runs for test suite run ID '107021'",
724
766
  parameters: { tsrunID: "107021", viewId: 6887 },
725
- // This is an example viewId, must be resolved per project TE viewId
726
- expectedOutput: "List of test case runs with execution details, status, and metadata"
767
+ expectedOutput: "Present as ONE unified table — never as a separate type+value breakdown. Example:\n| Test Case Key | Test Case Summary | Executed Version | Execution Status | Tested By | Environments UDF | Execution Type | Country |\n| MAC-TC-5 | Login - valid credential | v1 | Passed | varis | chrome, edge, safari | Functional | India > i3 |\n| MAC-TC-6 | Login - invalid password | v2 | Failed | john | firefox | Regression | - |\nColumns: Test Case Key (entityKey) | Test Case Summary (summary) | Executed Version (latestVersion) | Execution Status (runStatus) | then one column per UDF label. Use the UDF 'label' as column header. Show null UDF values as '-'."
727
768
  },
728
769
  {
729
- description: "Get test case runs with linked defects",
770
+ description: "Fetch Test Run UDF values for all executions in test suite run '728995'",
730
771
  parameters: {
731
- tsrunID: "107021",
732
- viewId: 6887,
733
- // This is an example viewId, must be resolved per project TE viewId
772
+ tsrunID: "728995",
773
+ viewId: 79451,
774
+ start: 0,
734
775
  page: 1,
735
- limit: 25
776
+ limit: 20
777
+ },
778
+ expectedOutput: "Present as ONE unified table combining identification fields and UDF values — never a separate type+value breakdown. Example:\n| Test Case Key | Test Case Summary | Executed Version | Execution Status | Tested By | Environments UDF | Planned Execution Date | Execution Type |\n| MAC-TC-5 | Login test | v1 | Passed | varis | chrome, edge, safari | - | Functional |\nHTML is stripped from LARGETEXT UDF fields. Null values shown as '-'."
779
+ },
780
+ {
781
+ description: "Filter by Test Run UDF list/dropdown field (single-select or multi-select lookup) — runs where UDF '8260LUP' has list item IDs 5108701 or 5108697",
782
+ parameters: {
783
+ tsrunID: "728995",
784
+ viewId: 79451,
785
+ tcrUdfFilter: '[{"type":"list","value":[5108701,5108697],"field":"8260LUP"}]'
786
+ },
787
+ expectedOutput: "Filtered test case runs matching the lookup list UDF values"
788
+ },
789
+ {
790
+ description: "Filter by Test Run UDF multi-lookup list field — runs where multi-select UDF 'PGTE_MULTILOOKUPLIST' contains list item IDs 5126503 or 5126502",
791
+ parameters: {
792
+ tsrunID: "728995",
793
+ viewId: 79451,
794
+ tcrUdfFilter: '[{"type":"list","value":[5126503,5126502],"field":"PGTE_MULTILOOKUPLIST"}]'
795
+ },
796
+ expectedOutput: "Filtered test case runs where multi-lookup UDF matches any of the given list item IDs"
797
+ },
798
+ {
799
+ description: "Filter by Test Run UDF cascading dropdown field — runs where cascading UDF 'cascade_vK' has list item IDs 5126498 or 5126499 (must set isCascading:true)",
800
+ parameters: {
801
+ tsrunID: "728995",
802
+ viewId: 79451,
803
+ tcrUdfFilter: '[{"type":"list","value":[5126498,5126499],"field":"cascade_vK","isCascading":true}]'
804
+ },
805
+ expectedOutput: "Filtered test case runs matching the cascading dropdown UDF values"
806
+ },
807
+ {
808
+ description: "Filter by Test Run UDF short text field — runs where text UDF 'TRString' contains the value 'str'",
809
+ parameters: {
810
+ tsrunID: "728995",
811
+ viewId: 79451,
812
+ tcrUdfFilter: '[{"type":"string","field":"TRString","value":"str"}]'
813
+ },
814
+ expectedOutput: "Filtered test case runs where short text UDF matches the search string"
815
+ },
816
+ {
817
+ description: "Filter by Test Run UDF large text field — runs where large text UDF 'vk_large_text' contains 'this is large text'",
818
+ parameters: {
819
+ tsrunID: "728995",
820
+ viewId: 79451,
821
+ tcrUdfFilter: '[{"type":"string","field":"vk_large_text","value":"this is large text"}]'
822
+ },
823
+ expectedOutput: "Filtered test case runs where large text UDF matches the search string"
824
+ },
825
+ {
826
+ description: "Filter by Test Run UDF date field — runs where date UDF 'PGTE_DATEPICKER' is after a specific date (comparison: gt) and before another date (comparison: lt)",
827
+ parameters: {
828
+ tsrunID: "728995",
829
+ viewId: 79451,
830
+ tcrUdfFilter: '[{"type":"date","field":"PGTE_DATEPICKER","comparison":"gt","value":"06-01-2026"},{"type":"date","field":"PGTE_DATEPICKER","comparison":"lt","value":"06-30-2026"}]'
831
+ },
832
+ expectedOutput: "Filtered test case runs where date UDF falls within the specified range"
833
+ },
834
+ {
835
+ description: "Filter by Test Run UDF numeric field — runs where numeric UDF 'NB_number_TR' equals 2",
836
+ parameters: {
837
+ tsrunID: "728995",
838
+ viewId: 79451,
839
+ tcrUdfFilter: '[{"type":"numeric","value":2,"field":"NB_number_TR"}]'
840
+ },
841
+ expectedOutput: "Filtered test case runs where numeric UDF equals the specified value"
842
+ },
843
+ {
844
+ description: "Combine multiple Test Run UDF filters — filter by list UDF AND string UDF AND numeric UDF simultaneously",
845
+ parameters: {
846
+ tsrunID: "728995",
847
+ viewId: 79451,
848
+ start: 0,
849
+ page: 1,
850
+ limit: 20,
851
+ tcrUdfFilter: '[{"type":"list","value":[5108701,5108697],"field":"8260LUP"},{"type":"string","field":"TRString","value":"str"},{"type":"numeric","value":2,"field":"NB_number_TR"}]'
852
+ },
853
+ expectedOutput: "Test case runs matching ALL specified UDF filter conditions (AND logic)"
854
+ },
855
+ {
856
+ description: "Full filter combination — standard field filter + Test Run UDF filter + show only runs with defects",
857
+ parameters: {
858
+ tsrunID: "728995",
859
+ viewId: 79451,
860
+ start: 0,
861
+ page: 1,
862
+ limit: 20,
863
+ filter: "[]",
864
+ udfFilter: "[]",
865
+ tcrUdfFilter: '[{"type":"list","value":[5108701,5108697],"field":"8260LUP"},{"type":"string","field":"TRString","value":"str"},{"type":"string","field":"vk_large_text","value":"this is large text"},{"type":"date","field":"PGTE_DATEPICKER","comparison":"gt","value":""},{"type":"date","field":"PGTE_DATEPICKER","comparison":"lt","value":""},{"type":"list","value":[5126503,5126502],"field":"PGTE_MULTILOOKUPLIST"},{"type":"list","value":[5126498,5126499],"field":"cascade_vK","isCascading":true},{"type":"numeric","value":2,"field":"NB_number_TR"}]',
866
+ showTcWithDefects: false
736
867
  },
737
- expectedOutput: "Paginated list of test case runs with 25 items per page"
868
+ expectedOutput: "Test case runs filtered by all 7 UDF field type conditions simultaneously"
738
869
  },
739
870
  {
740
- description: "Get test case runs for test suite run ID '2362144'",
871
+ description: "Get paginated test case runs with standard runStatus filter",
741
872
  parameters: {
742
873
  tsrunID: "2362144",
743
874
  viewId: 104123,
744
- // This is an example viewId, must be resolved per project TE viewId
745
875
  start: 0,
746
876
  page: 1,
747
- limit: 25
877
+ limit: 25,
878
+ filter: '[{"type":"string","value":"Failed","field":"runStatus"}]'
748
879
  },
749
- expectedOutput: "Test case runs from the specified test suite run execution"
880
+ expectedOutput: "Paginated list of Failed test case runs with 25 items per page including testRunUdfs"
881
+ },
882
+ {
883
+ description: "Show only test case runs with linked defects, filtered by Test Run UDF list value",
884
+ parameters: {
885
+ tsrunID: "107021",
886
+ viewId: 6887,
887
+ showTcWithDefects: true,
888
+ tcrUdfFilter: '[{"type":"list","value":[5108701],"field":"8260LUP"}]'
889
+ },
890
+ expectedOutput: "Test case runs with defects where the specified Test Run UDF matches"
750
891
  }
751
892
  ],
752
893
  hints: [
894
+ "=== MANDATORY RESPONSE FORMAT — READ THIS BEFORE RENDERING ANY OUTPUT ===",
895
+ "",
896
+ "PIVOT RULE — CRITICAL:",
897
+ "The 'testRunUdfs' field on each row is a key-value map (object) of UDF field keys to their values.",
898
+ "You MUST pivot this into TABLE COLUMNS — do NOT render it as rows.",
899
+ " → Each key in testRunUdfs = use the UDF human-readable label as the column header",
900
+ " → Each value in testRunUdfs = the cell value for that run's row",
901
+ " → 'fieldType' / 'fieldID' = INTERNAL METADATA — NEVER show these as columns",
902
+ "",
903
+ "FORBIDDEN PATTERNS — NEVER do any of these:",
904
+ " ❌ Do NOT render a separate sub-table (Label | Type | Value) per tcRunID",
905
+ " ❌ Do NOT show 'Type' or 'fieldType' as a visible column",
906
+ " ❌ Do NOT group output by tcRunID with individual breakdowns beneath each",
907
+ " ❌ Do NOT show raw UDF field keys (e.g. 'TRString', '8260LUP') as column headers — use human-readable labels",
908
+ "",
909
+ "REQUIRED OUTPUT — ONE unified table, all runs as rows:",
910
+ "| Test Case Key | Test Case Summary | Executed Version | Execution Status | <UDF Label 1> | <UDF Label 2> | ... |",
911
+ "|---------------|-------------------|------------------|------------------|---------------|---------------|-----|",
912
+ "| VKMCP-TC-1 | Login test | v1 | Not Run | varis | chrome, edge | ... |",
913
+ "| VKMCP-TC-2 | Invalid password | v2 | Not Run | john | firefox | ... |",
914
+ "",
915
+ "MANDATORY COLUMNS (always first, in this order):",
916
+ " 1. Test Case Key → entityKey (e.g. 'VKMCP-TC-1')",
917
+ " 2. Test Case Summary → summary (test case name)",
918
+ " 3. Executed Version → latestVersion (e.g. 'v1', 'v2')",
919
+ " 4. Execution Status → runStatus (e.g. 'Not Run', 'Passed', 'Failed')",
920
+ " 5. Tested By → testedBy/executedBy when present",
921
+ " 6+. One column per UDF field — use the human-readable label as header, the value as the cell.",
922
+ "",
923
+ "Null UDF values → show as '-' in the cell.",
924
+ "If testRunUdfs is empty or hasTcRunUdf is false, still show columns 1-5.",
925
+ "CHAINING WITH FETCH TEST RUN UDF VALUES:",
926
+ "If the user explicitly asks for Test Run UDFs with these test case runs, call 'Fetch Test Run UDF Values' after this tool with sourceContext='testSuiteRun' and sourceRows=<this response data>. Render that tool's unifiedTableRows as the final answer.",
927
+ "=== END MANDATORY RESPONSE FORMAT ===",
928
+ "",
753
929
  "CRITICAL WORKFLOW FOR FETCHING ALL EXECUTIONS OF A TEST SUITE:",
754
930
  "When user asks to:",
755
931
  " - 'fetch all executions'",
@@ -830,26 +1006,115 @@ const TESTSUITE_TOOLS = [
830
1006
  " {",
831
1007
  ' tsrunID: "2362144",',
832
1008
  " viewId: 104123,",
833
- // This is an example viewId, must be resolved per project TE viewId
834
1009
  " start: 0,",
835
1010
  " page: 1,",
836
1011
  " limit: 25",
837
1012
  " }",
838
1013
  "This ensures the tool fetches the proper execution runs data for the selected project context.",
839
- "SIMPLIFIED PAYLOAD: API only accepts essential parameters",
840
- "SUPPORTED PARAMETERS: start, page, limit, tsrunID, viewId",
841
- "REMOVED PARAMETERS: filter, sort, showTcWithDefects, udfFilter (cause API errors)",
1014
+ "SUPPORTED PARAMETERS: start, page, limit, tsrunID, viewId, filter, udfFilter, tcrUdfFilter, showTcWithDefects",
842
1015
  "PAGINATION: Use start, page, and limit for result pagination",
843
- "API REQUIREMENT: Must use exact payload structure that works in Postman",
844
1016
  'PAYLOAD FORMAT: {"start": 0, "page": 1, "limit": 10, "tsrunID": "2362144", "viewId": 104123}',
845
- // Example payload, must use resolved viewId per project TE viewId
1017
+ "",
1018
+ "=== TEST RUN UDF (tcrUdfFilter) — ALL 7 FIELD TYPE FORMATS ===",
1019
+ "tcrUdfFilter filters test case RUNS by Test Run UDF values (not test case UDFs — use udfFilter for those).",
1020
+ "Value is a JSON array string. Multiple conditions are combined with AND logic.",
1021
+ 'Base structure: {"type":"<fieldType>", "field":"<udfFieldKey>", "value":<value> [,"comparison":"..."] [,"isCascading":true]}',
1022
+ "",
1023
+ "--- TYPE 1: list (single-select lookup / dropdown) ---",
1024
+ "Use for: single-select lookup list UDF fields (one value selected from a list).",
1025
+ "value: array of numeric list item IDs — get IDs from FETCH_CUSTOM_LIST_ITEMS tool.",
1026
+ 'Format: {"type":"list", "field":"<fieldKey>", "value":[<id1>,<id2>]}',
1027
+ 'Example: [{"type":"list","value":[5108701,5108697],"field":"8260LUP"}]',
1028
+ "Matches runs where the UDF value is ANY of the provided list item IDs (OR within the array).",
1029
+ "",
1030
+ "--- TYPE 2: list (multi-select lookup list) ---",
1031
+ "Use for: multi-select lookup list UDF fields (multiple values can be selected).",
1032
+ "Syntax identical to single-select list — same format, just the UDF field itself is multi-select.",
1033
+ 'Format: {"type":"list", "field":"<fieldKey>", "value":[<id1>,<id2>]}',
1034
+ 'Example: [{"type":"list","value":[5126503,5126502],"field":"PGTE_MULTILOOKUPLIST"}]',
1035
+ "Matches runs where ANY of the UDF's selected values match any of the provided IDs.",
1036
+ "",
1037
+ "--- TYPE 3: list (cascading dropdown) ---",
1038
+ "Use for: cascading dropdown UDF fields (parent-child linked dropdowns). MUST add isCascading:true.",
1039
+ 'Format: {"type":"list", "field":"<fieldKey>", "value":[<id1>,<id2>], "isCascading":true}',
1040
+ 'Example: [{"type":"list","value":[5126498,5126499],"field":"cascade_vK","isCascading":true}]',
1041
+ "CRITICAL: missing isCascading:true on a cascading field will cause incorrect results or API error.",
1042
+ "",
1043
+ "--- TYPE 4: string (short text) ---",
1044
+ "Use for: single-line text UDF fields.",
1045
+ "value: the string to search for (partial match / contains).",
1046
+ 'Format: {"type":"string", "field":"<fieldKey>", "value":"<searchText>"}',
1047
+ 'Example: [{"type":"string","field":"TRString","value":"str"}]',
1048
+ "",
1049
+ "--- TYPE 5: string (large text / rich text) ---",
1050
+ "Use for: multi-line or rich text UDF fields. Syntax is identical to short text string type.",
1051
+ 'Format: {"type":"string", "field":"<fieldKey>", "value":"<searchText>"}',
1052
+ 'Example: [{"type":"string","field":"vk_large_text","value":"this is large text"}]',
1053
+ "NOTE: Search is against the raw (HTML) content stored in the field; plain text search terms work fine.",
1054
+ "",
1055
+ "--- TYPE 6: date ---",
1056
+ "Use for: date picker UDF fields. REQUIRES a 'comparison' property.",
1057
+ "comparison: 'gt' = after the date (greater than), 'lt' = before the date (less than).",
1058
+ "value: date string in 'MM-DD-YYYY' format, or empty string '' to leave the bound open.",
1059
+ 'Format: {"type":"date", "field":"<fieldKey>", "comparison":"gt"|"lt", "value":"MM-DD-YYYY"}',
1060
+ 'Example — date range: [{"type":"date","field":"PGTE_DATEPICKER","comparison":"gt","value":"06-01-2026"},{"type":"date","field":"PGTE_DATEPICKER","comparison":"lt","value":"06-30-2026"}]',
1061
+ 'Example — open-ended (no upper bound): [{"type":"date","field":"PGTE_DATEPICKER","comparison":"gt","value":"06-01-2026"}]',
1062
+ "To filter by a single date use two conditions (gt day-before AND lt day-after) or just one bound.",
1063
+ "CRITICAL: 'comparison' field is mandatory for date type — omitting it causes API error.",
1064
+ "",
1065
+ "--- TYPE 7: numeric ---",
1066
+ "Use for: number UDF fields.",
1067
+ "value: a number (integer or decimal).",
1068
+ 'Format: {"type":"numeric", "field":"<fieldKey>", "value":<number>}',
1069
+ 'Example: [{"type":"numeric","value":2,"field":"NB_number_TR"}]',
1070
+ "",
1071
+ "--- COMBINING MULTIPLE FILTERS ---",
1072
+ "All conditions in tcrUdfFilter array use AND logic — runs must satisfy ALL conditions.",
1073
+ "Full example (all 7 types combined):",
1074
+ "[",
1075
+ ' {"type":"list","value":[5108701,5108697],"field":"8260LUP"},',
1076
+ ' {"type":"list","value":[5126503,5126502],"field":"PGTE_MULTILOOKUPLIST"},',
1077
+ ' {"type":"list","value":[5126498,5126499],"field":"cascade_vK","isCascading":true},',
1078
+ ' {"type":"string","field":"TRString","value":"str"},',
1079
+ ' {"type":"string","field":"vk_large_text","value":"large text"},',
1080
+ ' {"type":"date","field":"PGTE_DATEPICKER","comparison":"gt","value":"06-01-2026"},',
1081
+ ' {"type":"date","field":"PGTE_DATEPICKER","comparison":"lt","value":"06-30-2026"},',
1082
+ ' {"type":"numeric","value":2,"field":"NB_number_TR"}',
1083
+ "]",
1084
+ "--- FILTER PARAMETER SUMMARY ---",
1085
+ "tcrUdfFilter: filter by Test Run UDF fields (this section)",
1086
+ "udfFilter: filter by Test Case UDF fields (different from test run UDFs)",
1087
+ "filter: filter by standard execution fields (runStatus, executedBy, etc.)",
1088
+ "All three can be combined in a single request — they are independently applied with AND logic.",
1089
+ "",
1090
+ "hasTcRunUdf FLAG — IMPORTANT:",
1091
+ "The response contains a 'hasTcRunUdf' boolean flag at the top level.",
1092
+ "hasTcRunUdf: true → Project has Test Run UDFs configured; each record includes 'testRunUdfs' object.",
1093
+ "hasTcRunUdf: false → Project has NO Test Run UDFs configured.",
1094
+ " When hasTcRunUdf is false, the response includes a 'testRunUdfNote' with a professional explanation.",
1095
+ " Inform the user: 'No Test Run UDFs are configured for this project. Contact a project administrator to set up Test Run UDF fields.'",
1096
+ "NEVER attempt to read testRunUdfs from records when hasTcRunUdf is false — the field will not be present.",
1097
+ "",
1098
+ "TEST RUN UDF RESPONSE (testRunUdfs):",
1099
+ "When the API returns Test Run UDF data, each row will include a 'testRunUdfs' object.",
1100
+ "This is a key-value map of UDF field keys to their values, parsed from the API's 'udfjson' field.",
1101
+ "HTML is stripped from rich text (large text) UDF fields for readable LLM output.",
1102
+ "Example testRunUdfs in response:",
1103
+ " testRunUdfs: {",
1104
+ ' "8260LUP": "l1",',
1105
+ ' "look_554": "99",',
1106
+ ' "cascade_vK": {"child": "aa", "parent": "abc"},',
1107
+ ' "dateNJ": "06-02-2026",',
1108
+ ' "NB_Multilppup_TR": ["ahd"],',
1109
+ ' "Jal_Largetext": "asdef asdfads asdfasf asdf asdf asfd a sdfa"',
1110
+ " }",
846
1111
  "Use pagination for large result sets (start, page, limit parameters)",
847
1112
  "This tool is essential for detailed test execution analysis and reporting",
848
- "Critical for monitoring individual test case execution performance",
1113
+ "Critical for monitoring individual test case execution performance and UDF values",
849
1114
  "Use for compliance reporting and execution audit trails",
850
1115
  "Essential for test execution quality assurance and trend analysis"
851
1116
  ],
852
- outputDescription: "JSON object with test case runs array containing detailed execution information, status, tester details, and run metadata",
1117
+ outputDescription: "JSON object with test case runs array. Each row ALWAYS contains these mandatory identification fields: 'entityKey' (Test Case Key, e.g. 'MAC-TC-123'), 'summary' (Test Case Summary/name), 'latestVersion' (Executed Version, e.g. 'v1', 'v2'), 'runStatus' (Execution Status label, e.g. 'Passed', 'Failed', 'Not Run'), 'runStatusID' (numeric status ID), 'tcRunID' (numeric Test Run ID), and 'testRunUdfs' (object with Test Run UDF field keys mapped to their values, parsed from the raw 'udfjson' field; HTML stripped from rich text). UDF values can also be fetched in enriched form via FETCH_TEST_RUN_UDF_VALUES or field metadata via FETCH_TEST_RUN_UDF_METADATA. The top-level response includes 'hasTcRunUdf' (boolean), 'total' (count), and pagination metadata.",
853
1118
  readOnly: true,
854
1119
  idempotent: true
855
1120
  },