@browserstack/mcp-server 1.2.8 → 1.2.9-beta.1

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 (38) hide show
  1. package/README.md +0 -10
  2. package/dist/lib/utils.d.ts +38 -16
  3. package/dist/tools/accessibility.js +2 -3
  4. package/dist/tools/appautomate-utils/appium-sdk/constants.d.ts +13 -23
  5. package/dist/tools/appautomate-utils/appium-sdk/formatter.js +0 -1
  6. package/dist/tools/appautomate-utils/appium-sdk/handler.js +0 -1
  7. package/dist/tools/appautomate-utils/native-execution/constants.d.ts +11 -21
  8. package/dist/tools/appautomate.js +0 -2
  9. package/dist/tools/applive.js +0 -1
  10. package/dist/tools/automate.js +1 -2
  11. package/dist/tools/get-failure-logs.js +1 -3
  12. package/dist/tools/live.js +0 -1
  13. package/dist/tools/observability.js +0 -1
  14. package/dist/tools/rca-agent-utils/constants.d.ts +2 -2
  15. package/dist/tools/sdk-utils/common/schema.d.ts +40 -90
  16. package/dist/tools/sdk-utils/handler.js +1 -1
  17. package/dist/tools/testmanagement-utils/TCG-utils/types.d.ts +1 -9
  18. package/dist/tools/testmanagement-utils/add-test-result.d.ts +2 -24
  19. package/dist/tools/testmanagement-utils/create-lca-steps.d.ts +4 -72
  20. package/dist/tools/testmanagement-utils/create-lca-steps.js +0 -1
  21. package/dist/tools/testmanagement-utils/create-project-folder.d.ts +1 -15
  22. package/dist/tools/testmanagement-utils/create-testcase.d.ts +5 -55
  23. package/dist/tools/testmanagement-utils/create-testcase.js +0 -1
  24. package/dist/tools/testmanagement-utils/create-testrun.d.ts +14 -63
  25. package/dist/tools/testmanagement-utils/list-testcases.d.ts +1 -13
  26. package/dist/tools/testmanagement-utils/list-testcases.js +0 -1
  27. package/dist/tools/testmanagement-utils/list-testruns.d.ts +1 -7
  28. package/dist/tools/testmanagement-utils/list-testruns.js +0 -1
  29. package/dist/tools/testmanagement-utils/testcase-from-file.js +0 -1
  30. package/dist/tools/testmanagement-utils/update-testcase.d.ts +29 -0
  31. package/dist/tools/testmanagement-utils/update-testcase.js +138 -0
  32. package/dist/tools/testmanagement-utils/update-testrun.d.ts +10 -23
  33. package/dist/tools/testmanagement-utils/update-testrun.js +0 -1
  34. package/dist/tools/testmanagement-utils/upload-file.d.ts +1 -7
  35. package/dist/tools/testmanagement-utils/upload-file.js +0 -2
  36. package/dist/tools/testmanagement.d.ts +5 -0
  37. package/dist/tools/testmanagement.js +24 -10
  38. package/package.json +24 -24
@@ -11,13 +11,7 @@ export declare const CreateLCAStepsSchema: z.ZodObject<{
11
11
  credentials: z.ZodOptional<z.ZodObject<{
12
12
  username: z.ZodString;
13
13
  password: z.ZodString;
14
- }, "strip", z.ZodTypeAny, {
15
- username: string;
16
- password: string;
17
- }, {
18
- username: string;
19
- password: string;
20
- }>>;
14
+ }, z.core.$strip>>;
21
15
  local_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22
16
  test_name: z.ZodString;
23
17
  test_case_details: z.ZodObject<{
@@ -27,72 +21,10 @@ export declare const CreateLCAStepsSchema: z.ZodObject<{
27
21
  test_case_steps: z.ZodArray<z.ZodObject<{
28
22
  step: z.ZodString;
29
23
  result: z.ZodString;
30
- }, "strip", z.ZodTypeAny, {
31
- step: string;
32
- result: string;
33
- }, {
34
- step: string;
35
- result: string;
36
- }>, "many">;
37
- }, "strip", z.ZodTypeAny, {
38
- name: string;
39
- description: string;
40
- test_case_steps: {
41
- step: string;
42
- result: string;
43
- }[];
44
- preconditions: string;
45
- }, {
46
- name: string;
47
- description: string;
48
- test_case_steps: {
49
- step: string;
50
- result: string;
51
- }[];
52
- preconditions: string;
53
- }>;
24
+ }, z.core.$strip>>;
25
+ }, z.core.$strip>;
54
26
  wait_for_completion: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
55
- }, "strip", z.ZodTypeAny, {
56
- project_identifier: string;
57
- test_case_identifier: string;
58
- base_url: string;
59
- local_enabled: boolean;
60
- test_name: string;
61
- test_case_details: {
62
- name: string;
63
- description: string;
64
- test_case_steps: {
65
- step: string;
66
- result: string;
67
- }[];
68
- preconditions: string;
69
- };
70
- wait_for_completion: boolean;
71
- credentials?: {
72
- username: string;
73
- password: string;
74
- } | undefined;
75
- }, {
76
- project_identifier: string;
77
- test_case_identifier: string;
78
- base_url: string;
79
- test_name: string;
80
- test_case_details: {
81
- name: string;
82
- description: string;
83
- test_case_steps: {
84
- step: string;
85
- result: string;
86
- }[];
87
- preconditions: string;
88
- };
89
- credentials?: {
90
- username: string;
91
- password: string;
92
- } | undefined;
93
- local_enabled?: boolean | undefined;
94
- wait_for_completion?: boolean | undefined;
95
- }>;
27
+ }, z.core.$strip>;
96
28
  export type CreateLCAStepsArgs = z.infer<typeof CreateLCAStepsSchema>;
97
29
  /**
98
30
  * Creates LCA (Low Code Automation) steps for a test case in BrowserStack Test Management
@@ -153,7 +153,6 @@ export async function createLCASteps(args, context, config) {
153
153
  {
154
154
  type: "text",
155
155
  text: `Error: ${error.message}. Please verify that the project identifier "${args.project_identifier}" and test case identifier "${args.test_case_identifier}" are correct.`,
156
- isError: true,
157
156
  },
158
157
  ],
159
158
  isError: true,
@@ -8,21 +8,7 @@ export declare const CreateProjFoldSchema: z.ZodObject<{
8
8
  folder_name: z.ZodOptional<z.ZodString>;
9
9
  folder_description: z.ZodOptional<z.ZodString>;
10
10
  parent_id: z.ZodOptional<z.ZodNumber>;
11
- }, "strip", z.ZodTypeAny, {
12
- project_name?: string | undefined;
13
- project_description?: string | undefined;
14
- project_identifier?: string | undefined;
15
- folder_name?: string | undefined;
16
- folder_description?: string | undefined;
17
- parent_id?: number | undefined;
18
- }, {
19
- project_name?: string | undefined;
20
- project_description?: string | undefined;
21
- project_identifier?: string | undefined;
22
- folder_name?: string | undefined;
23
- folder_description?: string | undefined;
24
- parent_id?: number | undefined;
25
- }>;
11
+ }, z.core.$strip>;
26
12
  type CreateProjFoldArgs = z.infer<typeof CreateProjFoldSchema>;
27
13
  /**
28
14
  * Creates a project and/or folder in BrowserStack Test Management.
@@ -61,66 +61,16 @@ export declare const CreateTestCaseSchema: z.ZodObject<{
61
61
  test_case_steps: z.ZodArray<z.ZodObject<{
62
62
  step: z.ZodString;
63
63
  result: z.ZodString;
64
- }, "strip", z.ZodTypeAny, {
65
- step: string;
66
- result: string;
67
- }, {
68
- step: string;
69
- result: string;
70
- }>, "many">;
71
- issues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
64
+ }, z.core.$strip>>;
65
+ issues: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
66
  issue_tracker: z.ZodOptional<z.ZodObject<{
73
67
  name: z.ZodString;
74
68
  host: z.ZodString;
75
- }, "strip", z.ZodTypeAny, {
76
- name: string;
77
- host: string;
78
- }, {
79
- name: string;
80
- host: string;
81
- }>>;
82
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
69
+ }, z.core.$strip>>;
70
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
83
71
  custom_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
84
72
  automation_status: z.ZodOptional<z.ZodString>;
85
- }, "strip", z.ZodTypeAny, {
86
- name: string;
87
- test_case_steps: {
88
- step: string;
89
- result: string;
90
- }[];
91
- project_identifier: string;
92
- folder_id: string;
93
- issues?: string[] | undefined;
94
- description?: string | undefined;
95
- automation_status?: string | undefined;
96
- tags?: string[] | undefined;
97
- custom_fields?: Record<string, string> | undefined;
98
- preconditions?: string | undefined;
99
- owner?: string | undefined;
100
- issue_tracker?: {
101
- name: string;
102
- host: string;
103
- } | undefined;
104
- }, {
105
- name: string;
106
- test_case_steps: {
107
- step: string;
108
- result: string;
109
- }[];
110
- project_identifier: string;
111
- folder_id: string;
112
- issues?: string[] | undefined;
113
- description?: string | undefined;
114
- automation_status?: string | undefined;
115
- tags?: string[] | undefined;
116
- custom_fields?: Record<string, string> | undefined;
117
- preconditions?: string | undefined;
118
- owner?: string | undefined;
119
- issue_tracker?: {
120
- name: string;
121
- host: string;
122
- } | undefined;
123
- }>;
73
+ }, z.core.$strip>;
124
74
  export declare function sanitizeArgs(args: any): any;
125
75
  export declare function createTestCase(params: TestCaseCreateRequest, config: BrowserStackConfig): Promise<CallToolResult>;
126
76
  export {};
@@ -95,7 +95,6 @@ export async function createTestCase(params, config) {
95
95
  {
96
96
  type: "text",
97
97
  text: `Failed to create test case: ${JSON.stringify(response.data)}`,
98
- isError: true,
99
98
  },
100
99
  ],
101
100
  isError: true,
@@ -9,72 +9,23 @@ export declare const CreateTestRunSchema: z.ZodObject<{
9
9
  test_run: z.ZodObject<{
10
10
  name: z.ZodString;
11
11
  description: z.ZodOptional<z.ZodString>;
12
- run_state: z.ZodOptional<z.ZodEnum<["new_run", "in_progress", "under_review", "rejected", "done", "closed"]>>;
13
- issues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
12
+ run_state: z.ZodOptional<z.ZodEnum<{
13
+ done: "done";
14
+ new_run: "new_run";
15
+ in_progress: "in_progress";
16
+ under_review: "under_review";
17
+ rejected: "rejected";
18
+ closed: "closed";
19
+ }>>;
20
+ issues: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
21
  issue_tracker: z.ZodOptional<z.ZodObject<{
15
22
  name: z.ZodString;
16
23
  host: z.ZodString;
17
- }, "strip", z.ZodTypeAny, {
18
- name: string;
19
- host: string;
20
- }, {
21
- name: string;
22
- host: string;
23
- }>>;
24
- test_cases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
25
- folder_ids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
26
- }, "strip", z.ZodTypeAny, {
27
- name: string;
28
- issues?: string[] | undefined;
29
- description?: string | undefined;
30
- issue_tracker?: {
31
- name: string;
32
- host: string;
33
- } | undefined;
34
- test_cases?: string[] | undefined;
35
- run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
36
- folder_ids?: number[] | undefined;
37
- }, {
38
- name: string;
39
- issues?: string[] | undefined;
40
- description?: string | undefined;
41
- issue_tracker?: {
42
- name: string;
43
- host: string;
44
- } | undefined;
45
- test_cases?: string[] | undefined;
46
- run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
47
- folder_ids?: number[] | undefined;
48
- }>;
49
- }, "strip", z.ZodTypeAny, {
50
- project_identifier: string;
51
- test_run: {
52
- name: string;
53
- issues?: string[] | undefined;
54
- description?: string | undefined;
55
- issue_tracker?: {
56
- name: string;
57
- host: string;
58
- } | undefined;
59
- test_cases?: string[] | undefined;
60
- run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
61
- folder_ids?: number[] | undefined;
62
- };
63
- }, {
64
- project_identifier: string;
65
- test_run: {
66
- name: string;
67
- issues?: string[] | undefined;
68
- description?: string | undefined;
69
- issue_tracker?: {
70
- name: string;
71
- host: string;
72
- } | undefined;
73
- test_cases?: string[] | undefined;
74
- run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
75
- folder_ids?: number[] | undefined;
76
- };
77
- }>;
24
+ }, z.core.$strip>>;
25
+ test_cases: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
+ folder_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
27
+ }, z.core.$strip>;
28
+ }, z.core.$strip>;
78
29
  export type CreateTestRunArgs = z.infer<typeof CreateTestRunSchema>;
79
30
  /**
80
31
  * Creates a test run via BrowserStack Test Management API.
@@ -10,19 +10,7 @@ export declare const ListTestCasesSchema: z.ZodObject<{
10
10
  case_type: z.ZodOptional<z.ZodString>;
11
11
  priority: z.ZodOptional<z.ZodString>;
12
12
  p: z.ZodOptional<z.ZodNumber>;
13
- }, "strip", z.ZodTypeAny, {
14
- project_identifier: string;
15
- priority?: string | undefined;
16
- case_type?: string | undefined;
17
- folder_id?: string | undefined;
18
- p?: number | undefined;
19
- }, {
20
- project_identifier: string;
21
- priority?: string | undefined;
22
- case_type?: string | undefined;
23
- folder_id?: string | undefined;
24
- p?: number | undefined;
25
- }>;
13
+ }, z.core.$strip>;
26
14
  export type ListTestCasesArgs = z.infer<typeof ListTestCasesSchema>;
27
15
  /**
28
16
  * Calls BrowserStack Test Management to list test cases with filters.
@@ -56,7 +56,6 @@ export async function listTestCases(args, config) {
56
56
  {
57
57
  type: "text",
58
58
  text: `Failed to list test cases: ${JSON.stringify(resp_data)}`,
59
- isError: true,
60
59
  },
61
60
  ],
62
61
  isError: true,
@@ -7,13 +7,7 @@ import { BrowserStackConfig } from "../../lib/types.js";
7
7
  export declare const ListTestRunsSchema: z.ZodObject<{
8
8
  project_identifier: z.ZodString;
9
9
  run_state: z.ZodOptional<z.ZodString>;
10
- }, "strip", z.ZodTypeAny, {
11
- project_identifier: string;
12
- run_state?: string | undefined;
13
- }, {
14
- project_identifier: string;
15
- run_state?: string | undefined;
16
- }>;
10
+ }, z.core.$strip>;
17
11
  type ListTestRunsArgs = z.infer<typeof ListTestRunsSchema>;
18
12
  /**
19
13
  * Fetches and formats the list of test runs for a project.
@@ -41,7 +41,6 @@ export async function listTestRuns(args, config) {
41
41
  {
42
42
  type: "text",
43
43
  text: `Failed to list test runs: ${JSON.stringify(data)}`,
44
- isError: true,
45
44
  },
46
45
  ],
47
46
  isError: true,
@@ -19,7 +19,6 @@ export async function createTestCasesFromFile(args, context, config) {
19
19
  {
20
20
  type: "text",
21
21
  text: `Document with ID ${args.documentId} not found.`,
22
- isError: true,
23
22
  },
24
23
  ],
25
24
  isError: true,
@@ -0,0 +1,29 @@
1
+ import { z } from "zod";
2
+ import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
3
+ import { BrowserStackConfig } from "../../lib/types.js";
4
+ export interface TestCaseUpdateRequest {
5
+ project_identifier: string;
6
+ test_case_identifier: string;
7
+ name?: string;
8
+ description?: string;
9
+ preconditions?: string;
10
+ test_case_steps?: Array<{
11
+ step: string;
12
+ result: string;
13
+ }>;
14
+ }
15
+ export declare const UpdateTestCaseSchema: z.ZodObject<{
16
+ project_identifier: z.ZodString;
17
+ test_case_identifier: z.ZodString;
18
+ name: z.ZodOptional<z.ZodString>;
19
+ description: z.ZodOptional<z.ZodString>;
20
+ preconditions: z.ZodOptional<z.ZodString>;
21
+ test_case_steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
22
+ step: z.ZodString;
23
+ result: z.ZodString;
24
+ }, z.core.$strip>>>;
25
+ }, z.core.$strip>;
26
+ /**
27
+ * Updates an existing test case in BrowserStack Test Management.
28
+ */
29
+ export declare function updateTestCase(params: TestCaseUpdateRequest, config: BrowserStackConfig): Promise<CallToolResult>;
@@ -0,0 +1,138 @@
1
+ import { apiClient } from "../../lib/apiClient.js";
2
+ import { z } from "zod";
3
+ import { formatAxiosError } from "../../lib/error.js";
4
+ import { projectIdentifierToId } from "./TCG-utils/api.js";
5
+ import { getTMBaseURL } from "../../lib/tm-base-url.js";
6
+ import { getBrowserStackAuth } from "../../lib/get-auth.js";
7
+ import logger from "../../logger.js";
8
+ export const UpdateTestCaseSchema = z.object({
9
+ project_identifier: z
10
+ .string()
11
+ .describe("The ID of the BrowserStack project containing the test case to update."),
12
+ test_case_identifier: z
13
+ .string()
14
+ .describe("The ID of the test case to update. This can be found using the listTestCases tool."),
15
+ name: z.string().optional().describe("Updated name of the test case."),
16
+ description: z
17
+ .string()
18
+ .optional()
19
+ .describe("Updated brief description of the test case."),
20
+ preconditions: z
21
+ .string()
22
+ .optional()
23
+ .describe("Updated preconditions for the test case."),
24
+ test_case_steps: z
25
+ .array(z.object({
26
+ step: z.string().describe("The action to perform in this step."),
27
+ result: z.string().describe("The expected result of this step."),
28
+ }))
29
+ .optional()
30
+ .describe("Updated list of test case steps with expected results."),
31
+ });
32
+ /**
33
+ * Updates an existing test case in BrowserStack Test Management.
34
+ */
35
+ export async function updateTestCase(params, config) {
36
+ const authString = getBrowserStackAuth(config);
37
+ const [username, password] = authString.split(":");
38
+ // Build the request body with only the fields to update
39
+ const testCaseBody = {};
40
+ if (params.name !== undefined) {
41
+ testCaseBody.name = params.name;
42
+ }
43
+ if (params.description !== undefined) {
44
+ testCaseBody.description = params.description;
45
+ }
46
+ if (params.preconditions !== undefined) {
47
+ testCaseBody.preconditions = params.preconditions;
48
+ }
49
+ if (params.test_case_steps !== undefined) {
50
+ testCaseBody.steps = params.test_case_steps;
51
+ }
52
+ const body = { test_case: testCaseBody };
53
+ try {
54
+ const tmBaseUrl = await getTMBaseURL(config);
55
+ const response = await apiClient.patch({
56
+ url: `${tmBaseUrl}/api/v2/projects/${encodeURIComponent(params.project_identifier)}/test-cases/${encodeURIComponent(params.test_case_identifier)}`,
57
+ headers: {
58
+ "Content-Type": "application/json",
59
+ Authorization: "Basic " + Buffer.from(`${username}:${password}`).toString("base64"),
60
+ },
61
+ body,
62
+ });
63
+ const { data } = response.data;
64
+ if (!data.success) {
65
+ return {
66
+ content: [
67
+ {
68
+ type: "text",
69
+ text: `Failed to update test case: ${JSON.stringify(response.data)}`,
70
+ },
71
+ ],
72
+ isError: true,
73
+ };
74
+ }
75
+ const tc = data.test_case;
76
+ // Convert project identifier to project ID for dashboard URL
77
+ const projectId = await projectIdentifierToId(params.project_identifier, config);
78
+ return {
79
+ content: [
80
+ {
81
+ type: "text",
82
+ text: `Test case successfully updated:
83
+
84
+ **Test Case Details:**
85
+ - **ID**: ${tc.identifier}
86
+ - **Name**: ${tc.title}
87
+ - **Description**: ${tc.description || "N/A"}
88
+ - **Case Type**: ${tc.case_type}
89
+ - **Priority**: ${tc.priority}
90
+ - **Status**: ${tc.status}
91
+
92
+ **View on BrowserStack Dashboard:**
93
+ https://test-management.browserstack.com/projects/${projectId}/folders/${tc.folder_id}/test-cases/${tc.identifier}
94
+
95
+ The test case has been updated successfully and is now available in your BrowserStack Test Management project.`,
96
+ },
97
+ ],
98
+ };
99
+ }
100
+ catch (err) {
101
+ logger.error("Failed to update test case: %s", err);
102
+ logger.error("Error details:", JSON.stringify(err.response?.data || err.message));
103
+ if (err.response?.status === 404) {
104
+ return {
105
+ content: [
106
+ {
107
+ type: "text",
108
+ text: `Test case not found. Please verify the project_identifier ("${params.project_identifier}") and test_case_identifier ("${params.test_case_identifier}") are correct. Make sure to use actual values, not placeholders like "your_project_id".
109
+
110
+ Error details: ${JSON.stringify(err.response?.data || err.message)}`,
111
+ },
112
+ ],
113
+ isError: true,
114
+ };
115
+ }
116
+ if (err.response?.status === 403) {
117
+ return {
118
+ content: [
119
+ {
120
+ type: "text",
121
+ text: "Access denied. You don't have permission to update this test case.",
122
+ },
123
+ ],
124
+ isError: true,
125
+ };
126
+ }
127
+ const errorMessage = formatAxiosError(err, "Failed to update test case");
128
+ return {
129
+ content: [
130
+ {
131
+ type: "text",
132
+ text: `Failed to update test case: ${errorMessage}. Please verify your credentials and try again.`,
133
+ },
134
+ ],
135
+ isError: true,
136
+ };
137
+ }
138
+ }
@@ -9,29 +9,16 @@ export declare const UpdateTestRunSchema: z.ZodObject<{
9
9
  test_run_id: z.ZodString;
10
10
  test_run: z.ZodObject<{
11
11
  name: z.ZodOptional<z.ZodString>;
12
- run_state: z.ZodOptional<z.ZodEnum<["new_run", "in_progress", "under_review", "rejected", "done", "closed"]>>;
13
- }, "strip", z.ZodTypeAny, {
14
- name?: string | undefined;
15
- run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
16
- }, {
17
- name?: string | undefined;
18
- run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
19
- }>;
20
- }, "strip", z.ZodTypeAny, {
21
- project_identifier: string;
22
- test_run: {
23
- name?: string | undefined;
24
- run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
25
- };
26
- test_run_id: string;
27
- }, {
28
- project_identifier: string;
29
- test_run: {
30
- name?: string | undefined;
31
- run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
32
- };
33
- test_run_id: string;
34
- }>;
12
+ run_state: z.ZodOptional<z.ZodEnum<{
13
+ done: "done";
14
+ new_run: "new_run";
15
+ in_progress: "in_progress";
16
+ under_review: "under_review";
17
+ rejected: "rejected";
18
+ closed: "closed";
19
+ }>>;
20
+ }, z.core.$strip>;
21
+ }, z.core.$strip>;
35
22
  type UpdateTestRunArgs = z.infer<typeof UpdateTestRunSchema>;
36
23
  /**
37
24
  * Partially updates an existing test run.
@@ -51,7 +51,6 @@ export async function updateTestRun(args, config) {
51
51
  {
52
52
  type: "text",
53
53
  text: `Failed to update test run: ${JSON.stringify(data)}`,
54
- isError: true,
55
54
  },
56
55
  ],
57
56
  isError: true,
@@ -7,13 +7,7 @@ import { BrowserStackConfig } from "../../lib/types.js";
7
7
  export declare const UploadFileSchema: z.ZodObject<{
8
8
  project_identifier: z.ZodString;
9
9
  file_path: z.ZodString;
10
- }, "strip", z.ZodTypeAny, {
11
- project_identifier: string;
12
- file_path: string;
13
- }, {
14
- project_identifier: string;
15
- file_path: string;
16
- }>;
10
+ }, z.core.$strip>;
17
11
  /**
18
12
  * Uploads a file to BrowserStack Test Management and returns the signed URL.
19
13
  */
@@ -32,7 +32,6 @@ export async function uploadFile(args, config) {
32
32
  {
33
33
  type: "text",
34
34
  text: `File ${file_path} does not exist.`,
35
- isError: true,
36
35
  },
37
36
  ],
38
37
  isError: true,
@@ -96,7 +95,6 @@ export async function uploadFile(args, config) {
96
95
  {
97
96
  type: "text",
98
97
  text: `Failed to upload file: ${error instanceof Error ? error.message : "Unknown error"}. Please check your credentials and try again.`,
99
- isError: true,
100
98
  },
101
99
  ],
102
100
  isError: true,
@@ -3,6 +3,7 @@ import { z } from "zod";
3
3
  import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
4
4
  import { CreateProjFoldSchema } from "./testmanagement-utils/create-project-folder.js";
5
5
  import { TestCaseCreateRequest } from "./testmanagement-utils/create-testcase.js";
6
+ import { TestCaseUpdateRequest } from "./testmanagement-utils/update-testcase.js";
6
7
  import { ListTestCasesSchema } from "./testmanagement-utils/list-testcases.js";
7
8
  import { CreateTestRunSchema } from "./testmanagement-utils/create-testrun.js";
8
9
  import { ListTestRunsSchema } from "./testmanagement-utils/list-testruns.js";
@@ -20,6 +21,10 @@ export declare function createProjectOrFolderTool(args: z.infer<typeof CreatePro
20
21
  * Creates a test case in BrowserStack Test Management.
21
22
  */
22
23
  export declare function createTestCaseTool(args: TestCaseCreateRequest, config: BrowserStackConfig, server: McpServer): Promise<CallToolResult>;
24
+ /**
25
+ * Updates an existing test case in BrowserStack Test Management.
26
+ */
27
+ export declare function updateTestCaseTool(args: TestCaseUpdateRequest, config: BrowserStackConfig, server: McpServer): Promise<CallToolResult>;
23
28
  /**
24
29
  * Lists test cases in a project with optional filters (status, priority, custom fields, etc.)
25
30
  */