Skip to main content
Glama
leorosignoli

JIRA Zephyr MCP Server

by leorosignoli

execute_test

Update test execution results in JIRA Zephyr by specifying status, adding comments, and linking defects to track testing progress.

Instructions

Update test execution results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
executionIdYesTest execution ID
statusYesExecution status
commentNoExecution comment (optional)
defectsNoLinked defect keys (optional)

Implementation Reference

  • Main handler function that validates input and calls ZephyrClient to update test execution status, returning success/error with execution details.
    export const executeTest = async (input: ExecuteTestInput) => {
      const validatedInput = executeTestSchema.parse(input);
      
      try {
        const execution = await getZephyrClient().updateTestExecution({
          executionId: validatedInput.executionId,
          status: validatedInput.status,
          comment: validatedInput.comment,
          defects: validatedInput.defects,
        });
        
        return {
          success: true,
          data: {
            id: execution.id,
            key: execution.key,
            cycleId: execution.cycleId,
            testCaseId: execution.testCaseId,
            status: execution.status,
            comment: execution.comment,
            executedOn: execution.executedOn,
            executedBy: execution.executedBy?.displayName,
            defects: execution.defects.map(defect => ({
              key: defect.key,
              summary: defect.summary,
            })),
          },
        };
      } catch (error: any) {
        return {
          success: false,
          error: error.response?.data?.message || error.message,
        };
      }
    };
  • Zod schema defining the input structure and validation for execute_test tool.
    export const executeTestSchema = z.object({
      executionId: z.string().min(1, 'Execution ID is required'),
      status: z.enum(['PASS', 'FAIL', 'WIP', 'BLOCKED']),
      comment: z.string().optional(),
      defects: z.array(z.string()).optional(),
    });
  • src/index.ts:135-147 (registration)
    Tool registration in the TOOLS array, including name, description, and MCP inputSchema.
      name: 'execute_test',
      description: 'Update test execution results',
      inputSchema: {
        type: 'object',
        properties: {
          executionId: { type: 'string', description: 'Test execution ID' },
          status: { type: 'string', enum: ['PASS', 'FAIL', 'WIP', 'BLOCKED'], description: 'Execution status' },
          comment: { type: 'string', description: 'Execution comment (optional)' },
          defects: { type: 'array', items: { type: 'string' }, description: 'Linked defect keys (optional)' },
        },
        required: ['executionId', 'status'],
      },
    },
  • src/index.ts:389-399 (registration)
    MCP callToolRequest handler switch case that validates arguments using executeTestSchema and invokes the executeTest handler.
    case 'execute_test': {
      const validatedArgs = validateInput<ExecuteTestInput>(executeTestSchema, args, 'execute_test');
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(await executeTest(validatedArgs), null, 2),
          },
        ],
      };
    }
  • TypeScript type inferred from executeTestSchema for type-safe input handling.
    export type ExecuteTestInput = z.infer<typeof executeTestSchema>;
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Update' implies a mutation operation, but the description doesn't state whether this requires specific permissions, whether changes are reversible, what happens to existing data not mentioned, or any rate limits. It lacks critical context for a mutation tool, such as side effects or error conditions.

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 with zero waste. It's front-loaded with the core action ('Update test execution results'), making it easy to scan. Every word earns its place by conveying the essential purpose without redundancy.

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?

Given the tool's complexity (mutation with 4 parameters) and lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like permissions, side effects, or error handling, nor does it explain return values or usage context. For a mutation tool, this leaves significant gaps in understanding how to invoke it correctly.

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 parameters (executionId, status, comment, defects) with descriptions and constraints. The description adds no additional meaning beyond what's in the schema, such as explaining relationships between parameters or usage examples. Baseline 3 is appropriate when schema does the heavy lifting.

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 'Update test execution results' clearly states the verb (update) and resource (test execution results). It distinguishes from sibling tools like 'get_test_execution_status' (read-only) and 'create_test_cycle' (creation rather than updating). However, it doesn't specify what aspects are updated beyond 'results' (e.g., status, comments, defects), which prevents a perfect score.

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. It doesn't mention prerequisites (e.g., needing an existing executionId), when not to use it (e.g., for creating new executions), or explicit alternatives among siblings like 'get_test_execution_status' for reading status or 'link_tests_to_issues' for linking defects. Usage is implied only by the verb 'update'.

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