UNPKG

@smartbear/mcp

Version:

MCP server for interacting SmartBear Products

40 lines (39 loc) 1.39 kB
import { getTestExecutionParams, getTestExecutionResponse, } from "../../common/rest-api-schemas.js"; export class GetTestExecution { apiClient; constructor(apiClient) { this.apiClient = apiClient; } specification = { title: "Get Test Execution", summary: "Get details of test execution specified by id or key in Zephyr", readOnly: true, idempotent: true, inputSchema: getTestExecutionParams, outputSchema: getTestExecutionResponse, examples: [ { description: "Get the test execution with id 1", parameters: { testExecutionIdOrKey: "1", }, expectedOutput: "The test execution with its details", }, { description: "Get the test execution with key 'PROJ-E123'", parameters: { testExecutionIdOrKey: "PROJ-E123", }, expectedOutput: "The test execution with its details", }, ], }; handle = async (args) => { const { testExecutionIdOrKey } = getTestExecutionParams.parse(args); const response = await this.apiClient.get(`/testexecutions/${testExecutionIdOrKey}`); return { structuredContent: response, content: [], }; }; }