Skip to main content
Glama
leorosignoli

JIRA Zephyr MCP Server

by leorosignoli

get_test_case

Retrieve detailed information about a specific test case from JIRA's Zephyr test management system using its ID or key.

Instructions

Get detailed information about a specific test case

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testCaseIdYesTest case ID or key

Implementation Reference

  • The primary handler function that executes the 'get_test_case' tool logic: fetches test case data from Zephyr client and returns formatted response with error handling.
    export const getTestCase = async (input: { testCaseId: string }) => { try { const testCase = await getZephyrClient().getTestCase(input.testCaseId); return { success: true, data: { id: testCase.id, key: testCase.key, name: testCase.name, projectKey: testCase.project?.id, objective: testCase.objective, precondition: testCase.precondition, estimatedTime: testCase.estimatedTime, priority: testCase.priority, status: testCase.status, folder: testCase.folder, labels: testCase.labels || [], component: testCase.component, owner: testCase.owner, createdOn: testCase.createdOn, customFields: testCase.customFields, links: testCase.links, testScript: testCase.testScript, }, }; } catch (error: any) { return { success: false, error: error.response?.data?.message || error.message, }; } };
  • src/index.ts:240-250 (registration)
    Registers the 'get_test_case' tool in the MCP server's listTools response, defining its name, description, and input schema.
    { name: 'get_test_case', description: 'Get detailed information about a specific test case', inputSchema: { type: 'object', properties: { testCaseId: { type: 'string', description: 'Test case ID or key' }, }, required: ['testCaseId'], }, },
  • Central dispatch handler in MCP server that validates input for 'get_test_case' and calls the specific getTestCase function.
    case 'get_test_case': { const validatedArgs = validateInput<GetTestCaseInput>(getTestCaseSchema, args, 'get_test_case'); return { content: [ { type: 'text', text: JSON.stringify(await getTestCase(validatedArgs), null, 2), }, ], }; }
  • Zod schema for validating input to the 'get_test_case' tool, requiring testCaseId.
    export const getTestCaseSchema = z.object({ testCaseId: z.string().min(1, 'Test case ID is required'), });
  • TypeScript type inferred from getTestCaseSchema for input validation.
    export type GetTestCaseInput = z.infer<typeof getTestCaseSchema>;

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