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>;

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