Skip to main content
Glama
leorosignoli

JIRA Zephyr MCP Server

by leorosignoli

list_test_cycles

Retrieve test cycles with execution status from JIRA Zephyr to monitor testing progress and manage quality assurance workflows.

Instructions

List existing test cycles with execution status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyYesJIRA project key
versionIdNoJIRA version ID (optional)
limitNoMaximum number of results (default: 50)

Implementation Reference

  • The core handler function that validates input using listTestCyclesSchema, fetches test cycles from ZephyrClient, maps and formats the response including execution summary with pass rate, and handles errors.
    export const listTestCycles = async (input: ListTestCyclesInput) => {
      const validatedInput = listTestCyclesSchema.parse(input);
      
      try {
        const result = await getZephyrClient().getTestCycles(
          validatedInput.projectKey,
          validatedInput.versionId,
          validatedInput.limit
        );
        
        return {
          success: true,
          data: {
            total: result.total,
            testCycles: result.testCycles.map(cycle => ({
              id: cycle.id,
              key: cycle.key,
              name: cycle.name,
              description: cycle.description,
              projectId: cycle.projectId,
              versionId: cycle.versionId,
              environment: cycle.environment,
              status: cycle.status,
              plannedStartDate: cycle.plannedStartDate,
              plannedEndDate: cycle.plannedEndDate,
              actualStartDate: cycle.actualStartDate,
              actualEndDate: cycle.actualEndDate,
              createdOn: cycle.createdOn,
              updatedOn: cycle.updatedOn,
              executionSummary: {
                total: cycle.executionSummary.total,
                passed: cycle.executionSummary.passed,
                failed: cycle.executionSummary.failed,
                blocked: cycle.executionSummary.blocked,
                inProgress: cycle.executionSummary.inProgress,
                notExecuted: cycle.executionSummary.notExecuted,
                passRate: cycle.executionSummary.total > 0 
                  ? Math.round((cycle.executionSummary.passed / cycle.executionSummary.total) * 100)
                  : 0,
              },
            })),
          },
        };
      } catch (error: any) {
        return {
          success: false,
          error: error.response?.data?.message || error.message,
        };
      }
    };
  • Zod schema defining the input structure for list_test_cycles tool: projectKey (required), versionId (optional), limit (default 50, max 100).
    export const listTestCyclesSchema = z.object({
      projectKey: z.string().min(1, 'Project key is required'),
      versionId: z.string().optional(),
      limit: z.number().min(1).max(100).default(50),
    });
  • src/index.ts:121-133 (registration)
    MCP tool registration in the TOOLS array, specifying name, description, and inputSchema matching the Zod schema.
    {
      name: 'list_test_cycles',
      description: 'List existing test cycles with execution status',
      inputSchema: {
        type: 'object',
        properties: {
          projectKey: { type: 'string', description: 'JIRA project key' },
          versionId: { type: 'string', description: 'JIRA version ID (optional)' },
          limit: { type: 'number', description: 'Maximum number of results (default: 50)' },
        },
        required: ['projectKey'],
      },
    },
  • src/index.ts:377-387 (registration)
    Switch case dispatcher in CallToolRequest handler that validates args with listTestCyclesSchema and calls the listTestCycles handler function.
    case 'list_test_cycles': {
      const validatedArgs = validateInput<ListTestCyclesInput>(listTestCyclesSchema, args, 'list_test_cycles');
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(await listTestCycles(validatedArgs), null, 2),
          },
        ],
      };
    }
  • Helper function to lazily initialize and return the shared ZephyrClient instance used by listTestCycles.
    const getZephyrClient = (): ZephyrClient => {
      if (!zephyrClient) {
        zephyrClient = new ZephyrClient();
      }
      return zephyrClient;
    };
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'List' implies a read operation, it doesn't specify whether this requires authentication, has rate limits, returns paginated results, or what format the execution status information takes. The description is minimal and lacks important behavioral context.

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 listing 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 tool with 3 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what 'execution status' entails, doesn't mention authentication requirements, and provides no guidance on result format or limitations. The description should do more to compensate for the lack of structured metadata.

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?

The schema description coverage is 100%, with all parameters well-documented in the schema itself. The description doesn't add any parameter-specific information beyond what's already in the schema, so it meets the baseline for high schema coverage without providing additional value.

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 verb ('List') and resource ('existing test cycles') with the additional qualifier 'with execution status', which provides specific functionality. However, it doesn't explicitly differentiate from sibling tools like 'list_test_plans' or 'search_test_cases', which would require more specific scope definition.

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 on when to use this tool versus alternatives like 'list_test_plans' or 'search_test_cases'. There's no mention of prerequisites, context, or exclusions that would help an agent choose between these similar listing/searching tools.

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