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;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It states this is a creation operation but doesn't mention permission requirements, whether this creates a draft or active cycle, what happens on duplicate names, or what the expected response looks like. For a mutation tool with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point without any wasted words. It's appropriately sized for a creation tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with 7 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what a test cycle is in this system, what happens after creation, or how this fits into the broader testing workflow. The agent would need to guess about behavioral aspects and expected outcomes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description adds no additional parameter context beyond what's in the schema, such as explaining relationships between parameters (e.g., how projectKey and versionId relate) or providing examples. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('create') and resource ('new test execution cycle'), making the purpose immediately understandable. However, it doesn't distinguish this tool from its sibling 'create_test_plan' or explain what differentiates a test cycle from other test artifacts in the system.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance about when to use this tool versus alternatives like 'create_test_plan' or 'list_test_cycles'. It doesn't mention prerequisites, sequencing (e.g., should a test plan exist first?), or typical workflow context, leaving the agent to infer usage patterns from tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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