Skip to main content
Glama
leorosignoli

JIRA Zephyr MCP Server

by leorosignoli

create_test_plan

Create structured test plans in JIRA Zephyr to organize testing activities, define scope, and track progress for software quality assurance.

Instructions

Create a new test plan in Zephyr

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesTest plan name
descriptionNoTest plan description (optional)
projectKeyYesJIRA project key
startDateNoPlanned start date (ISO format, optional)
endDateNoPlanned end date (ISO format, optional)

Implementation Reference

  • Main tool handler: validates input using Zod schema, calls ZephyrClient to create test plan, formats and returns success/error response.
    export const createTestPlan = async (input: CreateTestPlanInput) => { const validatedInput = createTestPlanSchema.parse(input); try { const testPlan = await getZephyrClient().createTestPlan({ name: validatedInput.name, description: validatedInput.description, projectKey: validatedInput.projectKey, startDate: validatedInput.startDate, endDate: validatedInput.endDate, }); return { success: true, data: { id: testPlan.id, key: testPlan.key, name: testPlan.name, description: testPlan.description, projectId: testPlan.projectId, status: testPlan.status, createdOn: testPlan.createdOn, createdBy: testPlan.createdBy.displayName, }, }; } catch (error: any) { return { success: false, error: error.response?.data?.message || error.message, }; } };
  • Zod schema for input validation and TypeScript type inference for CreateTestPlanInput.
    export const createTestPlanSchema = z.object({ name: z.string().min(1, 'Name is required'), description: z.string().optional(), projectKey: z.string().min(1, 'Project key is required'), startDate: z.string().optional(), endDate: z.string().optional(), });
  • src/index.ts:77-90 (registration)
    Tool registration in MCP server's TOOLS list, including name, description, and static JSON inputSchema for discovery.
    name: 'create_test_plan', description: 'Create a new test plan in Zephyr', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Test plan name' }, description: { type: 'string', description: 'Test plan description (optional)' }, projectKey: { type: 'string', description: 'JIRA project key' }, startDate: { type: 'string', description: 'Planned start date (ISO format, optional)' }, endDate: { type: 'string', description: 'Planned end date (ISO format, optional)' }, }, required: ['name', 'projectKey'], }, },
  • src/index.ts:341-351 (registration)
    MCP CallToolRequest handler switch case that validates args and invokes the createTestPlan tool function.
    case 'create_test_plan': { const validatedArgs = validateInput<CreateTestPlanInput>(createTestPlanSchema, args, 'create_test_plan'); return { content: [ { type: 'text', text: JSON.stringify(await createTestPlan(validatedArgs), null, 2), }, ], }; }
  • ZephyrClient helper method that performs the actual HTTP POST to Zephyr Scale API to create the test plan.
    async createTestPlan(data: { name: string; description?: string; projectKey: string; startDate?: string; endDate?: string; }): Promise<ZephyrTestPlan> { const payload = { name: data.name, objective: data.description, projectKey: data.projectKey, plannedStartDate: data.startDate, plannedEndDate: data.endDate, }; const response = await this.client.post('/testplans', 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