@smartbear/mcp
Version:
MCP server for interacting SmartBear Products
40 lines (39 loc) • 1.31 kB
JavaScript
import { getTestCycleParams, getTestCycleResponse, } from "../../common/rest-api-schemas.js";
export class GetTestCycle {
apiClient;
constructor(apiClient) {
this.apiClient = apiClient;
}
specification = {
title: "Get Test Cycle",
summary: "Get details of test cycle specified by id or key in Zephyr",
readOnly: true,
idempotent: true,
inputSchema: getTestCycleParams,
outputSchema: getTestCycleResponse,
examples: [
{
description: "Get the test cycle with id 1",
parameters: {
testCycleIdOrKey: "1",
},
expectedOutput: "The test cycle with its details",
},
{
description: "Get the test cycle with key 'SA-R40'",
parameters: {
testCycleIdOrKey: "SA-R40",
},
expectedOutput: "The test cycle with its details",
},
],
};
handle = async (args) => {
const { testCycleIdOrKey } = getTestCycleParams.parse(args);
const response = await this.apiClient.get(`/testcycles/${testCycleIdOrKey}`);
return {
structuredContent: response,
content: [],
};
};
}