Skip to main content
Glama
leorosignoli

JIRA Zephyr MCP Server

by leorosignoli

create_test_cycle

Create a new test execution cycle in JIRA Zephyr to organize and track testing activities for specific project versions.

Instructions

Create a new test execution cycle

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesTest cycle name
descriptionNoTest cycle description (optional)
projectKeyYesJIRA project key
versionIdYesJIRA version ID
environmentNoTest environment (optional)
startDateNoPlanned start date (ISO format, optional)
endDateNoPlanned end date (ISO format, optional)

Implementation Reference

  • The main handler function for the create_test_cycle tool. Validates input using Zod schema, calls ZephyrClient.createTestCycle, formats response or error.
    export const createTestCycle = async (input: CreateTestCycleInput) => { const validatedInput = createTestCycleSchema.parse(input); try { const testCycle = await getZephyrClient().createTestCycle({ name: validatedInput.name, description: validatedInput.description, projectKey: validatedInput.projectKey, versionId: validatedInput.versionId, environment: validatedInput.environment, startDate: validatedInput.startDate, endDate: validatedInput.endDate, }); return { success: true, data: { id: testCycle.id, key: testCycle.key, name: testCycle.name, description: testCycle.description, projectId: testCycle.projectId, versionId: testCycle.versionId, environment: testCycle.environment, status: testCycle.status, plannedStartDate: testCycle.plannedStartDate, plannedEndDate: testCycle.plannedEndDate, createdOn: testCycle.createdOn, executionSummary: testCycle.executionSummary, }, }; } catch (error: any) { return { success: false, error: error.response?.data?.message || error.message, }; } };
  • Zod schema defining the input validation for create_test_cycle tool, including required fields like name, projectKey, versionId.
    export const createTestCycleSchema = z.object({ name: z.string().min(1, 'Name is required'), description: z.string().optional(), projectKey: z.string().min(1, 'Project key is required'), versionId: z.string().min(1, 'Version ID is required'), environment: z.string().optional(), startDate: z.string().optional(), endDate: z.string().optional(), });
  • src/index.ts:105-120 (registration)
    Registration of the create_test_cycle tool in the MCP server's TOOLS array, specifying name, description, and input schema.
    name: 'create_test_cycle', description: 'Create a new test execution cycle', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Test cycle name' }, description: { type: 'string', description: 'Test cycle description (optional)' }, projectKey: { type: 'string', description: 'JIRA project key' }, versionId: { type: 'string', description: 'JIRA version ID' }, environment: { type: 'string', description: 'Test environment (optional)' }, startDate: { type: 'string', description: 'Planned start date (ISO format, optional)' }, endDate: { type: 'string', description: 'Planned end date (ISO format, optional)' }, }, required: ['name', 'projectKey', 'versionId'], }, },
  • src/index.ts:365-375 (registration)
    Dispatch handler in CallToolRequestSchema that validates args and invokes createTestCycle for the create_test_cycle tool.
    case 'create_test_cycle': { const validatedArgs = validateInput<CreateTestCycleInput>(createTestCycleSchema, args, 'create_test_cycle'); return { content: [ { type: 'text', text: JSON.stringify(await createTestCycle(validatedArgs), null, 2), }, ], }; }
  • ZephyrClient helper method that makes the actual API POST request to create a test cycle in Zephyr Scale.
    async createTestCycle(data: { name: string; description?: string; projectKey: string; versionId: string; environment?: string; startDate?: string; endDate?: string; }): Promise<ZephyrTestCycle> { const payload = { name: data.name, description: data.description, projectKey: data.projectKey, versionId: data.versionId, environment: data.environment, plannedStartDate: data.startDate, plannedEndDate: data.endDate, }; const response = await this.client.post('/testcycles', payload); return response.data; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/leorosignoli/jira-zephyr-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server