Skip to main content
Glama
leorosignoli

JIRA Zephyr MCP Server

by leorosignoli

list_test_plans

Retrieve existing test plans from a JIRA project to view available testing strategies and organize test cycles.

Instructions

List existing test plans

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyYesJIRA project key
limitNoMaximum number of results (default: 50)
offsetNoNumber of results to skip (default: 0)

Implementation Reference

  • Core handler function that executes the list_test_plans tool logic: validates input with Zod, calls ZephyrClient.getTestPlans, maps and returns results or error.
    export const listTestPlans = async (input: ListTestPlansInput) => { const validatedInput = listTestPlansSchema.parse(input); try { const result = await getZephyrClient().getTestPlans( validatedInput.projectKey, validatedInput.limit, validatedInput.offset ); return { success: true, data: { total: result.total, testPlans: result.testPlans.map(plan => ({ id: plan.id, key: plan.key, name: plan.name, description: plan.description, status: plan.status, createdOn: plan.createdOn, updatedOn: plan.updatedOn, createdBy: plan.createdBy.displayName, })), }, }; } catch (error: any) { return { success: false, error: error.response?.data?.message || error.message, }; } };
  • Zod schema definition for listTestPlans input validation, used in the handler.
    export const listTestPlansSchema = z.object({ projectKey: z.string().min(1, 'Project key is required'), limit: z.number().min(1).max(100).default(50), offset: z.number().min(0).default(0), });
  • src/index.ts:91-103 (registration)
    Tool registration in the TOOLS array, defining name, description, and JSON input schema for MCP clients.
    { name: 'list_test_plans', description: 'List existing test plans', inputSchema: { type: 'object', properties: { projectKey: { type: 'string', description: 'JIRA project key' }, limit: { type: 'number', description: 'Maximum number of results (default: 50)' }, offset: { type: 'number', description: 'Number of results to skip (default: 0)' }, }, required: ['projectKey'], }, },
  • MCP server dispatch handler for 'list_test_plans': validates args using Zod schema and delegates to listTestPlans function.
    case 'list_test_plans': { const validatedArgs = validateInput<ListTestPlansInput>(listTestPlansSchema, args, 'list_test_plans'); return { content: [ { type: 'text', text: JSON.stringify(await listTestPlans(validatedArgs), null, 2), }, ], }; }

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