UNPKG

@smartbear/mcp

Version:

MCP server for interacting SmartBear Products

40 lines (39 loc) 1.29 kB
import { getTestCaseParams, getTestCaseResponse, } from "../../common/rest-api-schemas.js"; export class GetTestCase { apiClient; constructor(apiClient) { this.apiClient = apiClient; } specification = { title: "Get Test Case", summary: "Get details of test case specified by key in Zephyr", readOnly: true, idempotent: true, inputSchema: getTestCaseParams, outputSchema: getTestCaseResponse, examples: [ { description: "Get the test case with key 'SA-T10'", parameters: { testCaseKey: "SA-T10", }, expectedOutput: "The test case with its details", }, { description: "Get the test case with key 'MM2-T1'", parameters: { testCaseKey: "MM2-T1", }, expectedOutput: "The test case with its details", }, ], }; handle = async (args) => { const { testCaseKey } = getTestCaseParams.parse(args); const response = await this.apiClient.get(`/testcases/${testCaseKey}`); return { structuredContent: response, content: [], }; }; }