@smartbear/mcp 0.29.0 → 0.31.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.
@@ -1,31 +0,0 @@
1
- import { z } from "zod";
2
- import { Tool, ToolError } from "../../../common/tools.js";
3
- const inputSchema = z.object({
4
- testCaseIds: z.array(z.number().int().positive()).min(1).describe("IDs of BearQ draft test cases to refine.")
5
- });
6
- class RefineTestCases extends Tool {
7
- specification = {
8
- title: "Refine Test Cases",
9
- toolset: "Tasks",
10
- summary: "Refines specific BearQ draft test cases — improves their steps so they can eventually be promoted to regression tests. Use when a draft is incomplete or has drifted from its intent.",
11
- inputSchema
12
- };
13
- handle = async (args) => {
14
- const { testCaseIds } = inputSchema.parse(args);
15
- const res = await fetch(`${this.client.getBaseUrl()}/tasks`, {
16
- method: "POST",
17
- headers: this.client.getHeaders(),
18
- body: JSON.stringify({ agent: "tester", mode: "refine", testCaseIds })
19
- });
20
- if (!res.ok)
21
- throw new ToolError(
22
- `POST /tasks failed: ${res.status} ${res.statusText}`
23
- );
24
- return {
25
- content: [{ type: "text", text: JSON.stringify(await res.json()) }]
26
- };
27
- };
28
- }
29
- export {
30
- RefineTestCases
31
- };
@@ -1,35 +0,0 @@
1
- import { z } from "zod";
2
- import { Tool, ToolError } from "../../../common/tools.js";
3
- const inputSchema = z.object({
4
- functionalAreas: z.array(z.union([z.number().int().positive(), z.string().min(1)])).min(1).describe("Functional areas to target, by ID or name.")
5
- });
6
- class RefineTestsInFunctionalAreas extends Tool {
7
- specification = {
8
- title: "Refine Tests in Functional Areas",
9
- toolset: "Tasks",
10
- summary: "Refines every draft test case tagged with one or more functional areas. Functional areas can be given by ID or name. May take multiple passes before drafts are ready to be promoted to regression tests.",
11
- inputSchema
12
- };
13
- handle = async (args) => {
14
- const { functionalAreas } = inputSchema.parse(args);
15
- const res = await fetch(`${this.client.getBaseUrl()}/tasks`, {
16
- method: "POST",
17
- headers: this.client.getHeaders(),
18
- body: JSON.stringify({
19
- agent: "tester",
20
- mode: "refine",
21
- functionalAreas
22
- })
23
- });
24
- if (!res.ok)
25
- throw new ToolError(
26
- `POST /tasks failed: ${res.status} ${res.statusText}`
27
- );
28
- return {
29
- content: [{ type: "text", text: JSON.stringify(await res.json()) }]
30
- };
31
- };
32
- }
33
- export {
34
- RefineTestsInFunctionalAreas
35
- };