UNPKG

@smartbear/mcp

Version:

MCP server for interacting SmartBear Products

50 lines (49 loc) 1.77 kB
import { listStatusesQueryParams, listStatusesResponse, } from "../../common/rest-api-schemas.js"; export class GetStatuses { apiClient; constructor(apiClient) { this.apiClient = apiClient; } specification = { title: "Get Statuses", summary: "Get statuses of different types of test artifacts in Zephyr", readOnly: true, idempotent: true, inputSchema: listStatusesQueryParams, outputSchema: listStatusesResponse, examples: [ { description: "Get the first 10 statuses", parameters: { maxResults: 10, startAt: 0, }, expectedOutput: "The first 10 statuses with their details from different projects and test artifact types", }, { description: "Get 10 test case statuses", parameters: { maxResults: 10, statusType: "TEST_CASE", }, expectedOutput: "A list of statuses related to test cases with their details", }, { description: "Get five statuses from the project PROJ", parameters: { maxResults: 5, projectKey: "PROJ", }, expectedOutput: "The first five statuses from the project PROJ with their details", }, ], }; handle = async (args) => { const getStatusesInput = listStatusesQueryParams.parse(args); const response = await this.apiClient.get("/statuses", getStatusesInput); return { structuredContent: response, content: [], }; }; }